text stringlengths 74 309k |
|---|
{"title":"Performance penalty for working with interfaces in C++?","tags":["c++","performance","abstract-class","virtual-functions"],"question_text":"Is there a runtime performance penalty when using interfaces (abstract base classes) in C++?","answer_text":"Short Answer: No.\nLong Answer:\nIt is not the base class or ... |
{"title":"Proguard causing RuntimeException (Unmarshalling unknown type code) in Parcelable class","tags":["android"],"question_text":"I get this exception if I leave my app and open it after some time. My main activity consist of a ViewPager with three different fragments. I also do some stuff in Application class whi... |
{"title":"$http post in Angular.js","tags":["angularjs","angular-http"],"question_text":"I've just started learning Angular.js. How do I re-write the following code in Angular.js?\n`var postData = \"<RequestInfo> \"\n + \"<Event>GetPersons<\/Event> \" \n + \"<\/RequestInfo>\";\n var req = new XMLHttpRequest();\n req.on... |
{"title":"In C#, how do you one-way serialize the unserializable?","tags":["c#","serialization"],"question_text":"Oftentimes, I need to serialize an object, either for logging or debugging. This is a one-way serialization -- I don't need to get it back out later, I just need to turn an object into a string to write it ... |
{"title":"How to trigger enter key press of textbox?","tags":["javascript","javascript-events","textbox","keypress","onkeypress"],"question_text":"In my html page, I had a textbox for user to input keyword for searching. When they click the search button, the JavaScript function will generate a URL and run in new windo... |
{"title":"Get referrer after installing app from Android Market","tags":["android","google-play","install","google-play-services","referrer"],"question_text":"I am trying to register a Broadcast Receiver that catches \"com.android.vending.INSTALL_REFERRER\" intents launched by Android after an app is installed from the... |
{"title":"ActionBar (Support) with Fragment (support)","tags":["android","android-actionbar","fragment"],"question_text":"I need to use a combination of action bar and fragments in one of my android applications that targets Gingerbread too. So I have used the action bar from the v7 support library and fragments from t... |
{"title":"How can I customize the text color of the back button in a UINavigationController header view?","tags":["iphone","cocoa-touch"],"question_text":"I'm using a custom tintColor on my UINavigationController's navigation bar, and because the color is so light I need to use dark colored text. It's relatively easy t... |
{"title":"How to delete a perforce client with pending changelist","tags":["perforce"],"question_text":"I have a workspace in\nperforce\nin which I made some files mark for delete. Now I want to delete that workspace forcefully.\nBut I don't have admin rights. How can I achieve this?","answer_text":"Run\n`p4 opened`\nt... |
{"title":"Bluebird, promises and then()","tags":["javascript","node.js","promise","bluebird"],"question_text":"I've been only using bluebird for a few days but I want to go over all my old code and\n`promisify`\nit :)\nMy problem is that I still don't fully grasp the flow of\n`then()`\ncommands.\nConsider these two blo... |
{"title":"Is there an XSLT buddy available somewhere?","tags":["xml","xslt"],"question_text":"I think a lot of people know about tools like RegexBuddy. Is there something similar for XSLT?","answer_text":"XSLT IDEs\n(Interactive Development Environments):\nXSelerator\n(the one I've been using for 6-7 years). Free, has ... |
{"title":"How to include git changelog in Jenkins emails?","tags":["git","email","hudson","jenkins","changelog"],"question_text":"Is there any way to import the changelog that is generated by Jenkins to the subject of an email (either through the default email, or the\nemail-ext plugin\n)?\nI am new to Jenkins configur... |
{"title":"Jquery Flot pie charts show data value instead of percentage","tags":["jquery","flot","pie-chart"],"question_text":"I can't figure out how to get flot.pie to change the data shown in the labels from a percentage of the \"raw data\" to the actual data. In my example i've created a pie chart with the numbers of... |
{"title":"Which CSS tag creates a box like this with title?","tags":["html","css","fieldset","legend"],"question_text":"I want to create a box like this with title:\nCan any one please let me know if there is a default CSS tag to do this? Or do I need to create my custom style?","answer_text":"I believe you are looking... |
{"title":"Chromium's XSS auditor refused to execute a script","tags":["google-chrome","chromium"],"question_text":"This is a message from the Chrome Inspector:\nThe XSS Auditor refused to execute a script in\n`http:\/\/localhost\/Disposable Working NOTAS.php`\nbecause its source code was found within the request.\n The... |
{"title":"How does this work? Weird Towers of Hanoi Solution","tags":["algorithm","language-agnostic","bit-manipulation","towers-of-hanoi"],"question_text":"I was lost on the internet when I discovered\nthis\nunusual, iterative solution to the towers of Hanoi:\n`for (int x=1; x < (1 << nDisks); x++)\n {\n FromPole = (x... |
{"title":"How do I transfer a local Magento install onto my live server?","tags":["deployment","magento"],"question_text":"Uploading a Magento install\nI have spent a long time building a store with Magento on my local development PC.\nNow that I am happy with the result, I would like to upload it to my live production... |
{"title":"How exactly does !function(){}() work?","tags":["javascript"],"question_text":"I've seen:\n`!function(){ \/\/code }();`\nUsed in several places to immediately execute an anonymous function. Normally, it's used in lieu of:\n`(function(){ \/\/code }())`\nAnyone know how the\n`!`\nactually makes the function exe... |
{"title":"Adding a field to an existing Django model","tags":["django-models"],"question_text":"I have a little website with a few users and I'd like to add a field to one of my models (and hence tables.) The problem is that\n`syncdb`\nof course won't touch the existing models and I'm trying to figure out how to add th... |
{"title":"How do you manage your time as a team leader?","tags":["time-management"],"question_text":"Where I work, my role has been evolving from a pure development role to team leadership. I find that this suits me, and I'm generally enjoying it.\nOne aspect of the job that continually vexes me, though, is time manage... |
{"title":"How to iterate over range with negative step?","tags":["scala","loops","negative-number"],"question_text":"Is there a way to do something like:\n`0 to -10 map { i=>\n...\n}`\nrepl gives me:\n`scala.collection.immutable.IndexedSeq[Unit] = Vector()`","answer_text":"`0 to (-10, -1)`\nor\n`0 to -10 by -1`","quest... |
{"title":"Where to place the \"Core Data Stack\" in a Cocoa\/Cocoa Touch application","tags":["iphone","cocoa","cocoa-touch","core-data"],"question_text":"In the iPhone Core Data Template, Apple places the Core Data Stack in the App Delegate.\nMy initial inclination however is to move this code into it's own class whos... |
{"title":"Why am I getting the error: \"Not a JPEG file: starts with 0x89 0x50\"","tags":["image","png","jpeg","corruption"],"question_text":"Why am I getting the message \"Not a JPEG file: starts with 0x89 0x50\" when I try to open my jpg file?","answer_text":"Your file is not a JPEG file, it's just been renamed from ... |
{"title":"Powershell 2.0 Param Keyword Error","tags":["powershell"],"question_text":"I am running Windows 7 RTM. Powershell 2.0 is installed by default. I am using the excellent Windows Powershell ISE to edit my scripts. I have the following script:\n`Param($p)\nParam($d)\necho $p $d`\nI save the script as SayItAgain.p... |
{"title":"Java : how to check current Perm \/ PermGen Size?","tags":["java","jvm","jvm-crash"],"question_text":"Yesterday when I was running the WebLogic Application Server 11g installer, I encountered a OutOfMemory error, so I Googled for the answer:\n`java -Xms256m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=256m -jar... |
{"title":"How to config ESLint for React on Atom Editor","tags":["reactjs","atom-editor","react-jsx","eslint"],"question_text":"In Atom Editor I installed the following plugins\nlinter\nlinter-eslint\nIt seems they don't recognize the JSX syntaxis.\nI have it working on the command line but had to use other plugins lik... |
{"title":"How to replace Javascript of production website with local Javascript?","tags":["javascript","debugging"],"question_text":"On my production website, I have compiled Javascript.\n`<script src=\"\/js\/mycode.min.js\"><\/script>`\nIt would be very convient for debugging if I could make my browser replace that wi... |
{"title":"How can I know the day name from a selected date?","tags":["c#","datetime"],"question_text":"`I have this : Datetime.Now(); or 23\/10\/2009\nI want this : Friday`\nfor local datetime (GMT-5) and using gregorian calendar.\nThanks","answer_text":"`\/\/default locale\nSystem.DateTime.Now.DayOfWeek.ToString();\n\... |
{"title":"Rails newbie: about yield","tags":["ruby-on-rails","ruby-on-rails-3","ruby-on-rails-3.1"],"question_text":"I saw some code in a\nRails v2.3\napp.\nIn\n`layout\/car_general.html.erb`\n(this view is called by a method in cars_controller) , I saw the code :\n`<body>\n <%= yield %>\n <%= javascript_include_tag 'j... |
{"title":"Vim search for a pattern and if occurs delete to end of line","tags":["regex","vim"],"question_text":"I am trying to search a text file for a certain pattern. If this pattern occurs then it means that the rest of the line is not needed and therefore can be deleted.\nI have tried using the following commands, ... |
{"title":"Find the path of notepad.exe and mspaint.exe","tags":["winapi","search","filesystems","filepath"],"question_text":"What is the best way to find out where notepad.exe and mspaint.exe are that will work across various versions of Windows?\nShould I get the Windows directory via\n`SHGetFolderPath(NULL, CSIDL_WIN... |
{"title":"Git remove directory","tags":["git","version-control","github","dvcs"],"question_text":"I've got a repository on GitHub (http:\/\/github.com\/hrickards\/PHP-Crypto) for a little project me and a couple of others are working on. My development environment is Aptana Studio, and I use the EGit plugin as Aptana i... |
{"title":"checkSelfPermission method is not working in targetSdkVersion 22","tags":["android","android-permissions"],"question_text":"\"CheckSelfPermission\" method is not working as expected and it is always returning zero in android 6.0(Marshmallow). Because the target sdk is 22 and i am using http Client for network... |
{"title":"How can reference the last item in a list in a Django template? {{ list.-1.key }}","tags":["django","django-templates"],"question_text":"if I have a variable in the context of unknown length, for example;\n`list=[{'key':'A'},{'key':'B'},{'key':'C'}]`\nHow can I get the last object?\n`{{ list.0.key }}`\nworks ... |
{"title":"How Does sizeof(Array) work","tags":["c","arrays"],"question_text":"How does c find at run time the size of array? where is the information about array size or bounds of array stored ?","answer_text":"`sizeof(array)`\nis implemented entirely by the C compiler. By the time the program gets linked, what looks l... |
{"title":"C++ name mangling decoder for g++?","tags":["c++","name-mangling","name-decoration"],"question_text":"is there any C++ name-mangling decoder for g++?","answer_text":"You can use c++filt to demangle c++ symbols. For instance\n`$ c++filt -n _Z1fv\nf()`","question_code":[],"answer_code":["$ c++filt -n _Z1fv\nf()... |
{"title":"Capacity planning of the Cache size","tags":["caching"],"question_text":"How to do the capacity planning of the cache - for e.g. how much RAM to allocate for ehCache, memcache or dynacache?\nIs there any industry standard formula?\nFor e.g. I have about 60,000 Records in the database. This is the company data... |
{"title":"What is the relation between Iterable and Iterator?","tags":["scala","iterator"],"question_text":"What is the difference between\n`Iterator`\nand\n`Iterable`\nin scala?\nI thought that\n`Iterable`\nrepresents a set that I can iterate through, and\n`Iterator`\nis a \"pointer\" to one of the items in the iterab... |
{"title":"struct serialization in C and transfer over MPI","tags":["struct","mpi"],"question_text":"I am having a relatively simple problem.\nI have defined a custom struct and want to send it over to another\nMPI process using the MPI_Bsend (or MPI_Send).\nHere is my struct:\n`struct car{\n int shifts;\n int topSpeed;... |
{"title":"What does cifs_mount failed w\/return code = -22 indicate","tags":["mount","samba","cifs"],"question_text":"I am trying\n`sudo mount -t cifs \/\/<server>\/<share> -o username=user@domain,password=**** \/mnt\/<mountpoint>`\nerror message:\n`mount: wrong fs type, bad option, bad superblock on \/\/server\/share,... |
{"title":"How can I erase the current line printed on console in C ? I am working on a linux system","tags":["c","linux","console","erase"],"question_text":"How can I erase the current line printed on the console in C? I am working on a linux system\nexample -\n`printf(\"hello\");\nprintf(\"bye\");`\nI want to print by... |
{"title":"Android: class not found exception: android.support.v4.app.FragmentPager","tags":["android","classnotfoundexception"],"question_text":"In my code I\nimport\n`android.support.v4.view.ViewPager`\nbut I get a\n`ClassNotFoundException: android.support.v4.view.ViewPager`\nwhen I set content view to this xml file:\... |
{"title":"Reactive Programming - RxJS vs EventEmitter in Node.js","tags":["javascript","node.js","asynchronous","reactive-programming","rxjs"],"question_text":"Recently I've started looking at\nRxJS\nand RxJava(from Netflix) libraries which work on the concept of Reactive Programming.\nNode.js works on the basis of eve... |
{"title":"JavaScript: How does 'new' work internally","tags":["javascript"],"question_text":"Probably the least understood part of JavaScript, standing beside the prototype chain.\nSo the question is: how does...\n`new dataObj(args);`\n...actually create an object, and define its prototype chain\/constructors\/etc?\nBe... |
{"title":"Plotting interpolated data on map","tags":["r","maps","ggplot2","automap","spatial-interpolation"],"question_text":"I have survey data of species richness that was taken at various sites in the Chesapeake Bay, USA, and I would like to graphically present the data as a \"heat map.\"\nI have a dataframe of lat\... |
{"title":"What is a working copy and what does \"switching\" do for me in Tortoise SVN?","tags":["svn","tortoisesvn","working-copy","svn-switch"],"question_text":"I have a software app and I've hit an important milestone, version 2.0.\nI decided I want to tag this version as \"Version-2.0\" so I have named this snapsho... |
{"title":"Issue with ignoring subdirectory in git","tags":["git","gitignore"],"question_text":"I have a maven multi-modules project which has a depth of around 5 levels.\nI'm now moving to git and I see that a lot of the content of the\n`target`\nfolder is captured by git as \"Unstaged Changes\".\nI've googled a lot an... |
{"title":"ImportError: No module named mock","tags":["python","python-2.7","python-import","importerror"],"question_text":"So I am trying to use unittest.mock to mock some of my methods in my unit tests. I do:\n`from unittest.mock import MagicMock\nf = open(\"data\/static\/mock_ffprobe_response\")\nsubprocess.check_out... |
{"title":"Onclick event to remove default value in a text input field","tags":["javascript","html"],"question_text":"I have an input field:\n`<input name=\"Name\" value=\"Enter Your Name\">`\nHow would I get it to remove the pre-defined text (Enter Your Name) when the user clicks the box.\nAs far as I am aware Javascri... |
{"title":"Connection attempt failed with \"ECONNREFUSED - Connection refused by server\"","tags":["filezilla"],"question_text":"I am trying to connect to a networked machine's FileZilla server but my FileZilla Client is giving the following error while connecting. The error is:\n\"Connection attempt failed with ECONNRE... |
{"title":"async for loop in node.js","tags":["javascript","node.js"],"question_text":"I am new to this node.js ..I am little bit confused about this callback..In my app inside a for loop i am calling a asynchronous function call,i think my problem is that before i am getting response of async call my for loop get loope... |
{"title":"Libgdx: Is there an easy way to center text on each axis on a button?","tags":["java","libgdx"],"question_text":"I have been trying to figure out a way to center text on a button, but can't find an easy, multi-purpose way to. I can do it, but it will only work for a certain string, not for any string. i would... |
{"title":"Hide NavigationBar for one ViewController in Storyboard","tags":["iphone","ios","xcode","uinavigationcontroller","navbar"],"question_text":"I have found many posts, but still no solution. I am trying to hide a NavigationBar on the initial\n`UIViewController`\n, but i want to still show it on the second\n`UIVi... |
{"title":"R plot: size and resolution","tags":["r","png","plot"],"question_text":"I have stacked into the question: I need to plot the image with DPI=1200 and specific print size.\nBy default the png looks ok...\n`png(\"test.png\",width=3.25,height=3.25,units=\"in\",res=1200)\npar(mar=c(5,5,2,2),xaxs = \"i\",yaxs = \"i... |
{"title":"PHP function to evaluate string like \"2-1\" as arithmetic 2-1=1","tags":["php","math"],"question_text":"I was just wondering if PHP has a function what would take in the string like \"2-1\" and produce the arithmetic result of it? Or will I have to do this manually with explode() to get the values left and r... |
{"title":"Strip text from HTML document using Ruby","tags":["html","ruby","nokogiri","hpricot"],"question_text":"There are lots of examples of how to strip HTML tags from a document using Ruby, Hpricot and Nokogiri have inner_text methods that remove all HTML for you easily and quickly.\nWhat I am trying to do is the o... |
{"title":"Passing a function as an argument in a javascript function","tags":["javascript"],"question_text":"I was wondering whether this is legal to do. Could I have something like:\n`function funct(a, foo(x)) {\n ...\n}`\nwhere\n`a`\nis an array and\n`x`\nis an integer argument for another function called\n`foo`\n?\n... |
{"title":"Replace Google Now gesture","tags":["android","google-now"],"question_text":"If you want to start Google Now on Nexus devices, you swipe-up with a simple gesture from the navbar. I want go replace this feature with my own app. if you swipe the, app-picker comes and asks you which app do you want to start: my ... |
{"title":"Spring 4 and Java 8 Invalid byte tag exception","tags":["java","spring","java-ee","java-8"],"question_text":"I am trying to run a simple JUnit test using Spring and Java 8 JDK:\n`@RunWith(SpringJUnit4ClassRunner.class)\n@ContextConfiguration(locations = {\"classpath:applicationContext.xml\"})\n@WebAppConfigur... |
{"title":"Deleting part of a string in MYSQL","tags":["mysql","sql","string"],"question_text":"I want to delete part of a string found in a particular field.\nFor example, the entry in the field could be \"01365320\nAPS\n\". The \"APS\" is what I am looking at deleting.\nMy question is, should I use:\n`SELECT SUBSTRING... |
{"title":"XCode 6: can't connect any IBOutlet to ViewController","tags":["ios","objective-c","xcode","xcode6","uistoryboard"],"question_text":"After upgrading to Xcode 6, I opened an old project (that contains a subproject, so it has many targets)\nand I noticed that no link from my Storyboard ViewContoller to the rela... |
{"title":"How to let NSTextField grow with the text in auto layout?","tags":["cocoa","nstextfield","autolayout"],"question_text":"Auto layout in Lion should make it fairly simple to let a text field (and hence a label) grow with text it holds.\nThe text field is set to wrap in Interface Builder.\nWhat is a simple and r... |
{"title":"A Generic error occured in GDI+ in Bitmap.Save method","tags":["c#","gdi+","system.drawing"],"question_text":"I am working on to upload and same a thumnail copy of that image in a thumbnail forder.\nI am using following link:\nhttp:\/\/weblogs.asp.net\/markmcdonnell\/archive\/2008\/03\/09\/resize-image-before... |
{"title":"Regex AND operator","tags":["regex","and-operator"],"question_text":"Based on this answer\nhttp:\/\/stackoverflow.com\/questions\/469913\/regular-expressions-is-there-an-and-operator\nI tried the following on\nhttp:\/\/regexpal.com\/\nbut was unable to get it to work. What am missing? Does javascript not supp... |
{"title":"SimpleXML: Selecting Elements Which Have A Certain Attribute Value","tags":["php","xml","xpath","simplexml","netflix"],"question_text":"In an XML document, I have elements which share the same name, but the value of an attribute defines what type of data it is, and I want to select all of those elements which... |
{"title":"Python urllib vs httplib?","tags":["python","http","urllib","httplib"],"question_text":"When would someone use httplib and when urllib?\nWhat are the differences?\nI think I ready urllib uses httplib, I am planning to make an app that will need to make http request and so far I only used httplib.HTTPConnectio... |
{"title":"Syntax sugar: _* for treating Seq as method parameters","tags":["scala","syntactic-sugar"],"question_text":"I just noticed this construct somewhere on web:\n`val list = List(someCollection: _*)`\nWhat does\n`_*`\nmean? Is this a syntax sugar for some method call? What constraints should my custom class satisf... |
{"title":"Why Android Gradle preDexDebug \"Source and destination must be different\" build failed?","tags":["android","gradle","android-studio","android-gradle"],"question_text":"I have an Android application built with Android Studio 0.8.1 and facing the issue:\n`Error:Execution failed for task ':app:preDexDebug'.\n>... |
{"title":"Swift compiler error: \u00e2\u0080\u009cCannot invoke 'map' with an argument list of type '((_) -> _)'\u00e2\u0080\u009d","tags":["ios","swift","higher-order-functions"],"question_text":"I have a range that I'm trying to map on, but I'm getting the error\n`\u00e2\u0080\u009cCannot invoke 'map' with an argumen... |
{"title":"Conversion Error setting value for 'null Converter'","tags":["jsf","jsf-2","converter","selectonemenu"],"question_text":"I have problems understanding how to use selection in JSF 2 with POJO\/entity effectively. For example, I'm trying to select a\n`Warehouse`\nentity via the below dropdown:\n`<h:selectOneMen... |
{"title":"How to cut the last field from a shell string","tags":["string","shell","cut"],"question_text":"How to cut the last field in this shell string\n`LINE=\"\/string\/to\/cut.txt\"`\nSo that the string would look like this\n`LINE=\"\/string\/to\/\"`\nThanks in advance!","answer_text":"For what it's worth, a\n`cut`... |
{"title":"What tools does Linux programmer use to develop programs?","tags":["linux","ide"],"question_text":"I migrated from Windows, and have heard that Linux programmers do not use IDEs to develop programs, something like Visual Studio. Is this saying true? Do Linux programmers use IDE to do pratical development?\nTh... |
{"title":"How does HTML5 Geolocation Work?","tags":["browser","html5","geolocation"],"question_text":"Chrome and Firefox have HTML Geolocation implemented.\nMy question is: how does it work? Do they have a Database locally and get the information from the provider then try to match it?\nWhere is the DB stored ?\nCan it... |
{"title":"Android Gradle Project upgrading build tools to 21.0.1: aapt throws Exception","tags":["android","gradle","android-gradle","build-tools"],"question_text":"We have an android gradle project. Today I wanted to upgrade the android build tools version from 20 to 21.0.1, but now the aapt is failing.\n`* What went ... |
{"title":"What is the function of an asterisk before a function name?","tags":["c","function","pointers"],"question_text":"I've been confused with what I see on most C programs that has unfamiliar function declaration for me.\n`void *func_name(void *param){\n ...\n}`\nWhat does\n`*`\nimply for the function? My understa... |
{"title":"How many bytes does a string have","tags":["python"],"question_text":"Is there some function which will tell me how many bytes does a string occupy in memory?\nI need to set a size of a socket buffer in order to transfer the whole string at once.","answer_text":"`import sys\nsys.getsizeof(s)\n# getsizeof(obje... |
{"title":"How can I download an XML file using C#?","tags":["c#",".net","xml"],"question_text":"Given this URL:\nhttp:\/\/www.dreamincode.net\/forums\/xml.php?showuser=1253\nHow can I download the resulting XML file and have it loaded to memory so I can grab information from it using Linq?\nThanks for the help.","answe... |
{"title":"Check if first-time user of my App in Android","tags":["java","android"],"question_text":"In my App, first it shows a splash screen. After that another activity, then my main activity must be shown. This is my design plan. The second activity (i.e before main activity) must be shown for the first-time user of... |
{"title":"Scope in javascript acting weird","tags":["javascript","function","scope","pass-by-reference"],"question_text":"Object are passed with their reference in javascript. Meaning change in that object from any where should be reflected.\nIn this case, the expected output was {} for console.log(a)\n`function change... |
{"title":"Adding Date Picker to view programatically?","tags":["iphone","datepicker"],"question_text":"Can someone illustrate (or point me to a good tutorial) on how to add a Date Picker to a view programatically (i.e., without using the interface editor)?","answer_text":"It's very easy man.You can do it in seconds.\nJ... |
{"title":"Show GIF file with Glide (image loading and caching library)","tags":["android","imageview","gif","android-glide"],"question_text":"I try to show a GIF image as loading placeholder in image view - with\nGlide Library\n:\n`Glide.with(context)\n .load(ImageUrl())\n .placeholder(R.drawable.loading2)\n .asGif()\n... |
{"title":"ack: Excluding only one directory but keeping all others with the same name","tags":["ack"],"question_text":"My folder structure looks like this:\n`\/app\n\/app\/data\n...\n\/app\/secondary\n\/app\/secondary\/data`\nI want to recursively search\n`\/app`\n, including\n`\/app\/data`\n. I do not want to search\n... |
{"title":"How can WPF objects deriving from Freezable be frozen in XAML?","tags":["wpf","performance","xaml","freezable"],"question_text":"Many types in WPF derive from\n`Freezable`\n. It provides immutability to mutable POCO objects and allows for improved performance in certain situations.\nSo my question is, how can... |
{"title":"How to get UTC offset in seconds in android","tags":["android","timezone"],"question_text":"I'm trying to get the UTC offset in seconds in android. Since the emulator keeps returning 0, I can't tell if I'm doing this correctly or not.\n`Calendar c=Calendar.getInstance();\n TimeZone tz=c.getTimeZone();\n int o... |
{"title":"When should I create a new DbContext()","tags":["c#","asp.net-mvc","entity-framework","asp.net-mvc-4"],"question_text":"I am currently using a\n`DbContext`\nsimilar to this:\n`namespace Models\n{\n public class ContextDB: DbContext\n {\n public DbSet<User> Users { get; set; }\n public DbSet<UserRole> UserRole... |
{"title":"How do I change Android Studio editor's background color?","tags":["android","android-studio"],"question_text":"I want the grey shade as shown in previews but mine has white as default. I tried to search in file->settings but without much success. Also, I couldn't find Project->clean or any such option. Any h... |
{"title":"JQuery mouseup outside window \u00e2\u0080\u0093 possible?","tags":["jquery","mouseevent"],"question_text":"I am trying to accomplish a rudimentary drag. On mousedown the item starts dragging, but not at the same speed as the mouse, so i continue dragging when the mouse is outside the window, but if the mouse... |
{"title":"C# - For vs Foreach - Huge performance difference","tags":["c#","performance","for-loop","foreach"],"question_text":"i was making some optimizations to an algorithm that finds the smallest number that is bigger than X, in a given array, but then a i stumbled on a strange difference. On the code bellow, the \"... |
{"title":"Load content of a div on another page","tags":["jquery","html","hash","load"],"question_text":"You will see from this code that it loads the content URL from the hash tag. Is there anyway to load only a single div element from that external page.\n`$(function() {\n if(location.hash) $(\"#content_inload\").loa... |
{"title":"Download multiple files with a single action","tags":["http","web-applications","download"],"question_text":"I am not sure if this is possible using standard web technologies.\nI want the user to be able to download multiple files in a single action. That is click check boxes next to the files, and then get a... |
{"title":"Foursquare API for venue user image error","tags":["php","api","foursquare"],"question_text":"The Foursquare API has divided its photo tag for user as prefix and suffix. But if I merge them to form a full image URL and paste this in my browser, gives me errors that says the image can't be displayed because it... |
{"title":"Return value from nested function in Javascript","tags":["javascript","function","nested","return-value","return"],"question_text":"I have a function that is set up as follows\n`function mainFunction() {\n function subFunction() {\n var str = \"foo\";\n return str;\n }\n}\nvar test = mainFunction();\nalert(te... |
{"title":"C++ - Arguments for Exceptions over Return Codes","tags":["c++","exception"],"question_text":"I'm having a discussion about which way to go in a new C++ project. I favor exceptions over return codes (for exceptional cases only) for the following reasons -\nConstructors can't give a return code\nDecouples the ... |
{"title":"How to IF NOT inside of {{ #each }} template","tags":["meteor","meteor-blaze"],"question_text":"How can I render this Meteor Blaze Template ? I would like to use the negative of the IF, but I don't find anywhere how to use it.\n`<ul>\n{{#each pages}}\n {{#if (--NOT--) isCover }}\n <li> some content {{value}} ... |
{"title":"How to capture onclick event in disabled EditText in Android App","tags":["android","onclick","android-edittext"],"question_text":"I have a EditText which I am presenting as disabled so that user cannot edit the contents and also to avoid popping-up keyboard. But now I want to capture onclick event in the Edi... |
{"title":"how to do bitwise exclusive or of two strings in python?","tags":["python","string","bitwise-operators"],"question_text":"I would like to perform a bitwise exclusive or of two strings in python, but xor of strings are not allowed in python. How can I do it ?","answer_text":"You can convert the characters to i... |
{"title":"How to resolve \"abandoned transaction\" when I use \"hg push\"?","tags":["mercurial","sourceforge"],"question_text":"We work with a\nsourceforge\nproject. When we try to push, then mercurial abort :\n`$ hg push\npushing to ssh:\/\/<user>@hg.code.sf.net\/p\/loremipsum\/code\nsearching for changes\nremote: abo... |
{"title":"How to Align Two Divs Horizontally","tags":["html","css"],"question_text":"I need to align 2 divs next to each other, so that each contains a title and a list of items, similar to\n`<div>\n <span>source list<\/span>\n <select size=\"10\">\n <option \/>\n <option \/>\n <option \/>\n <\/select>\n<\/div>\n<div>\... |
{"title":"Azure WebSites - Can't Scale Sites Individually (New Web Hosting Plan Groups)","tags":["azure","azure-web-sites"],"question_text":"Just this morning, the management portal for Azure WebSites no longer lets me scale individually. It looks as though all my websites have been grouped into a \"Web Hosting Plan\".... |
{"title":"Servlet: java.lang.ClassNotFoundException: org.json.simple.parser.ParseException","tags":["java","android","push-notification"],"question_text":"I am implementing Google Cloud Messaging service for android. I have created a test server which sends push notifications to application users. But the server I have... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.