text stringlengths 74 309k |
|---|
{"title":"NetBeans shortcut key for collapsing\/expanding a method","tags":["java","netbeans","code-organization","expand","collapse"],"question_text":"JAVA - NETBEANS\nThis is an IDE question\nI am always working with collapsed methods, because I want to be able to see my methods all together. This is a little time co... |
{"title":"Modify and replay MongoDB oplog","tags":["mongodb"],"question_text":"Is it possible to modify the MongoDB oplog and replay it?\nA bug caused an update to be applied to more documents than it was supposed to be, overwriting some data. Data was recovered from backup and reintegrated, so nothing was actually los... |
{"title":"dropzone.js - how to do something after ALL files are uploaded","tags":["javascript","jquery","dropzone.js"],"question_text":"I am using dropzone.js for my drag-drop file upload solution. I am stuck at something where I need to call a function after\nall\nthe files are uploaded. In this case,\n`Dropzone.optio... |
{"title":"How to create a TRIE in Python","tags":["python","python-2.7","trie"],"question_text":"I am new to Python and trying to learn and advance. I am interested in TRIEs and DAWGs and I have been reading a lot about it but I don't understand what should the output TRIE or DAWG file look like.\nShould a TRIE be an o... |
{"title":"Check if a div does NOT exist with javascript","tags":["javascript","html","if-statement"],"question_text":"Checking if a div exists is fairly simple\n`if(document.getif(document.getElementById('if')){\n}`\nBut how can I check if a div with the given id does not exist?","answer_text":"`var myElem = document.g... |
{"title":"What is App.config in C#.NET? How to use it?","tags":["c#",".net","app-config"],"question_text":"I have done a project in C#.NET where my database file is an Excel workbook. Since the location of the connection string is hard coded in my coding, there is no problem for installing it in my system, but for othe... |
{"title":"Post Commit Hook Not Running","tags":["git","bash","github","post-commit","githooks"],"question_text":"My post commit hook is not running after git. I have verified that the hook does work if I just run it from the terminal. The code in the hook is:\n`#!\/bin\/sh\n#.git\/hooks\/post-commit\n# An example hook ... |
{"title":"Newtonsoft JSON Deserialize","tags":["c#","json.net","deserialization"],"question_text":"My JSON is as follows:\n`{\"t\":\"1339886\",\"a\":true,\"data\":[],\"Type\":[['Ants','Biz','Tro']]}`\nI found the Newtonsoft JSON.NET deserialize library for C#. I tried to use it as follow:\n`object JsonDe = JsonConvert.... |
{"title":"What does -z mean in Bash?","tags":["bash"],"question_text":"I'm looking at the following code:\n`if [ -z $2 ]; then\n echo \"usage: ...`\n(The 3 dots are irrelevant usage details.)\nMaybe I'm googling it wrong, but I couldn't find an explanation for the\n`-z`\noption.","answer_text":"`-z string`\nTrue if the... |
{"title":"How to have at least two datepickers of ui-bootstrap on a single page?","tags":["angularjs","datepicker","angular-ui-bootstrap"],"question_text":"I want to have several datepickers on a page. But with the default solution from UI-Bootstrap it is not possible, no one of datepickers may be opened. The conflict ... |
{"title":"How to customize tableView separator in iPhone","tags":["iphone","uitableview"],"question_text":"By default there is a single line separator in uitableview.\nBut I want to put my customized line as a separator.\nIs it possible? How?","answer_text":"If you want to do more than change the color of the separator... |
{"title":"What is the proper way to detect if code is running on the main thread in Objective-C? (iOS)","tags":["iphone","objective-c","multithreading","ios"],"question_text":"My code needs to guarantee a certain operation run on the main thread, but calls may come from background threads.\nTo detect situations in the ... |
{"title":"How to capitalize the first character of each word, or the first character of a whole string, with C#?","tags":["c#","string","humanize"],"question_text":"I could write my own algorithm to do it, but I feel there should be the equivalent to\nruby's humanize\nin C#.\nI googled it but only found ways to humaniz... |
{"title":"Select multiple records based on list of Id's with linq","tags":["c#","linq"],"question_text":"I have a list containing Id's of my\n`UserProfile`\ntable. How can i select all\n`UserProfiles`\nbased on the list of Id's i got in a\n`var`\nusing\n`LINQ`\n?\n`var idList = new int[1, 2, 3, 4, 5];\nvar userProfiles... |
{"title":"CURL - Getting HTTP code","tags":["php","performance","curl","http-headers"],"question_text":"Im using CURL to get the status of a site, if its up\/down or redirecting to another site. I want to get it as streamlined as possible, but it's not working well.\n`<?php\n$ch = curl_init($url);\ncurl_setopt($ch,CURL... |
{"title":"PNG Transparency with PHP","tags":["php","png","transparency"],"question_text":"Hey having some trouble trying to maintain transparency on a png when i create a thumbnail from it, anyone any experience with this? any help would be great, here's what i am currently doing:\n`$fileName= \"..\/js\/ajaxupload\/tee... |
{"title":"How do I create a Ruby date object from a string?","tags":["ruby","date"],"question_text":"How do I create a Ruby date object from the following string?\n`DD-MM-YYYY`","answer_text":"`Date.parse('31-12-2010')`\nAlternatively\n`Date#strptime(str, format)`\n.","question_code":[" DD-MM-YYYY\n"],"answer_code":["D... |
{"title":"What is MYSQL Partitioning?","tags":["mysql","database","partitioning"],"question_text":"I have read the documentation (\nhttp:\/\/dev.mysql.com\/doc\/refman\/5.1\/en\/partitioning.html\n), but I would like, in your own words, what it is and why it is used.\nIs it mainly used for multiple servers so it doesn'... |
{"title":"What does the \"|\" (single pipe) do in JavaScript?","tags":["javascript"],"question_text":"`console.log(0.5 | 0); \/\/ 0\nconsole.log(-1 | 0); \/\/ -1\nconsole.log(1 | 0); \/\/ 1`\nWhy does\n`0.5 | 0`\nreturn zero, but any integer (including negative) returns the input integer? What does the single pipe (\"|... |
{"title":"This BackgroundWorker is currently busy and cannot run multiple tasks concurrently","tags":["c#","backgroundworker"],"question_text":"I get this error if I click a button that starts the backgroundworker twice.\n`This BackgroundWorker is currently busy and cannot run multiple tasks concurrently`\nHow can I av... |
{"title":"Why can't we declare a std::vector<AbstractClass>?","tags":["c++","stl","abstract-class"],"question_text":"Having spent quite some time developping in C#, I noticed that if you declare an abstract class for the purpose of using it as an interface you cannot instantiate a vector of this abstract class to store... |
{"title":"How to print NSMutableURLRequest?","tags":["iphone","objective-c","nslog","nsmutableurlrequest"],"question_text":"How to print NSMutableURLRequest using NSLog ?","answer_text":"`.allHTTPHeaderFields`\nreturns a dictionary with the header content:\n`NSLog(@\"%@\", [request allHTTPHeaderFields]);\n\/\/ {\n\/\/ ... |
{"title":"How to interactively (visually) resolve conflicts in SourceTree \/ git","tags":["git","git-merge","merge-conflict-resolution","atlassian-sourcetree"],"question_text":"I'm using (Windows) SourceTree for my git project. I can do it in either command prompt or Linux terminal.\nBut, I'm wondering whether there is... |
{"title":"Razor-based view doesn't see referenced assemblies","tags":["asp.net-mvc","asp.net-mvc-3","razor"],"question_text":"I'm attempting to create a strongly-typed view based on a class from another assembly. For whatever reason though, my Razor view doesn't seem to have any visibility of other assemblies reference... |
{"title":"I NetBeans, can I somehow store the RSA key fingerprint of the remote server or not have NetBeans confirm the key before taking action?","tags":["php","netbeans","netbeans-6.9","rsa-key-fingerprint"],"question_text":"I'm currently using NetBeans 6.9 with the PHP plugin and a PHP Application from Remote Server... |
{"title":"How to escape indicator characters (i.e. : or - ) in YAML","tags":["yaml","delimiter"],"question_text":"In a config file, I have a key to which I wish to assign a URL. The problem is that YAML interprets : and - characters as either creating mappings or lists, so it has a problem with the line\n`url: http:\/\... |
{"title":"DOMDocument::loadHTML error","tags":["php","html5","domdocument"],"question_text":"I build a script that combines all css on a page together to use it in my cms. It worked fine for a long time now i i get this error:\nWarning\n: DOMDocument::loadHTML()\n [domdocument.loadhtml]: Tag header invalid in Entity, l... |
{"title":"private property in Objective C","tags":["objective-c"],"question_text":"Is there a way to declare a private property in Objective C? The goal is to benefit from synthesized getters and setters implementing a certain memory management scheme, yet not exposed to public.\nAn attempt to declare a property within... |
{"title":"Annotation Configuration Replacement for mvc:resources - Spring","tags":["java","spring","spring-mvc","configuration"],"question_text":"I'm trying to upgrade my spring mvc project to utilize the new annotations and get rid of my xml. Previously I was loading my static resources in my\n`web.xml`\nwith the line... |
{"title":"What does yellow tinting represent when using \"color misaligned images\" on iPhone\/iOS","tags":["iphone","ios","core-animation","core-graphics","instruments"],"question_text":"so--i switched on \"color misaligned images\" to improve drawing performance in our app. The documentation states:\nPuts a magenta o... |
{"title":"Have jshint ignore certain files when building Twitter Bootstrap","tags":["twitter-bootstrap","build","makefile","jslint","jshint"],"question_text":"I often have this problem when using Twitter Bootstrap with other 3rd-party JS libraries, such as\n`html5.js`\nfrom WordPress' \"Twenty Twelve\" theme, where the... |
{"title":"Convert DateTime to TimeSpan","tags":["c#",".net","wpf"],"question_text":"Good Day Guys,\nI want to convert a DateTime instance into a TimeSpan instance, is it possible? I've looked around but I couldn't find what I want, I only find time difference. More specefically, A want to convert DateTime instance into... |
{"title":"Most efficient way to get next letter in the alphabet using PHP","tags":["php","string","alphabet"],"question_text":"Given any character from a to z, what is the most efficient way to get the next letter in the alphabet using PHP?","answer_text":"The most efficient way of doing this in\nmy\nopinion is to\njus... |
{"title":"SQL WHERE.. IN clause multiple columns","tags":["sql-server"],"question_text":"I need to implement the following query in SQL Server:\n`select *\nfrom table1\nWHERE (CM_PLAN_ID,Individual_ID)\nIN\n(\n Select CM_PLAN_ID, Individual_ID\n From CRM_VCM_CURRENT_LEAD_STATUS\n Where Lead_Key = :_Lead_Key\n)`\nBut th... |
{"title":"How to darken a background using CSS?","tags":["html","css","opacity"],"question_text":"I have an element with text in it. Whenever I decrease the opacity, then I decrease the opacity of the WHOLE body. Is there any way I can just make the\n`background-image`\ndarker, and not everything else?\n`background-ima... |
{"title":"Decoding base64 in batch","tags":["windows","batch-file","base64"],"question_text":"I am trying to make an installer using batch. Of course, an installer needs to consist of files that will be installed, so I'm thinking of encoding the files in base64, and simply decode them and write them to their destinatio... |
{"title":"Using someone else's repo as a Git Submodule on GitHub","tags":["git","version-control","repository","github","git-submodules"],"question_text":"I am trying to find out if it is possible to use someone else's repository (or branch of a repository) as a Submodule in your own Git repository. Documentation on gi... |
{"title":"How can I stop Filezilla changing my linebreaks?","tags":["ftp","line-breaks","filezilla"],"question_text":"I'm downloading a perl CGI file from a Linux web server.\nIt has Unix linebreaks. I edit it on a Windows PC with a decent text-editor (Geany) which preserves those linebreaks.\nI then upload it again wi... |
{"title":"How do Linux binary installers (.bin, .sh) work?","tags":["linux","installer"],"question_text":"Some software (for ex. the\nNetBeans IDE\n) ship the Linux installers in .sh files. Curious about how exactly they 'package' a whole IDE into a 'shell script', I opened the file in an editor. I saw some plain text ... |
{"title":"Why does \/bin\/sh behave differently to \/bin\/bash even if one points to the other?","tags":["linux","bash","shell","sh"],"question_text":"While I was playing around in my shell investigating the answer to\nthis question\n, I noticed that, even though\n`\/bin\/sh`\nwas pointing to\n`\/bin\/bash`\non my syst... |
{"title":"Content of div is longer then div itself when width is set to 100%?","tags":["html","css","firefox"],"question_text":"I have\n`div`\nof fixed width containing only\n`input`\ntext box and\n`width`\nof that\n`input`\nis set to\n`100%`\n. I expect it to fill the\n`div`\nbut instead it is slightly longer.\nDemons... |
{"title":"Disable DataGrid current cell border in FullRow selection mode","tags":["wpf","wpfdatagrid","wpf-4.0"],"question_text":"I am using a DataGrid in row selection mode (i.e.,\n`SelectionUnit=\"FullRow\"`\n). I simply want to remove the border that is being placed around the current cell when the user highlights a... |
{"title":"Creating executable files in Linux","tags":["linux","executable","file-permissions","chmod","gedit"],"question_text":"One thing I plan to be doing is writing (painfully simple) Perl scripts, and I'd like to be able to run them without explicitly calling Perl from the terminal. I appreciate that, to do this, I... |
{"title":"What are some resources for getting started in operating system development?","tags":["operating-system","kernel","osdev"],"question_text":"One thing I've always wanted to do is develop my very own operating system (not necessarily fancy like Linux or Windows, but better than a simple boot loader which I've a... |
{"title":"Difference between Constructor and ngOnInit","tags":["angular2"],"question_text":"I've started learning Angular 2 Beta version. Angular 2 provides life cycle hook\n`ngOnInit`\nby default. Could anyone tell me about the usage of\n`ngOnInit`\n?\nWhy do we use this if we already have a constructor?","answer_text... |
{"title":"Can I load an entire HTML document into a document fragment in Internet Explorer?","tags":["javascript","html","internet-explorer","dom"],"question_text":"Here's something I've been having a little bit of difficulty with. I have a local client-side script that needs to allow a user to fetch a remote web page ... |
{"title":"how to remove empty strings from list, then remove duplicate values from a list","tags":["c#","linq","coding-style"],"question_text":"Lets say I have a list of some column values coming from a table, how do I remove empty strings and duplicate values. Please see the following code:\n`List<string> dtList = dtR... |
{"title":"Best way to list files in Java, sorted by Date Modified?","tags":["java","file","sorting"],"question_text":"I want to get a list of files in a directory, but I want to sort it such that the oldest files are first. My solution was to call File.listFiles and just resort the list based on File.lastModified, but ... |
{"title":"Is const_cast safe?","tags":["c++","casting"],"question_text":"I can't find much information on const_cast. The only info I could find (on Stack Overflow) is:\nThe const_cast<>() is used to add\/remove const(ness) (or volatile-ness) of a variable.\nThis makes me nervous. Could using a const_cast cause unexpec... |
{"title":"Why an expression instead of a constant, in a C for-loop's conditional?","tags":["c","for-loop","coding-style","expression","constantfolding"],"question_text":"In many programming competitions I have seen people write this type of\n`for`\n-loop\n`for(i = 0; i < (1 << 7); i++)`\nUnless I am missing something, ... |
{"title":"PHP cUrl vs file_get_contents","tags":["php","curl","file-get-contents"],"question_text":"Here is a question.\nHow these 2 pieces of code differ when accessing REST API?\n`$result = file_get_contents('http:\/\/api.bitly.com\/v3\/shorten?login=user&apiKey=key&longUrl=url');\n$ch = curl_init('http:\/\/api.bitly... |
{"title":"Is it ok to use \"classic\" malloc()\/free() in Objective-C\/iPhone apps?","tags":["c","objective-c","memory-management"],"question_text":"I've been playing around with iPhone development for a while, and although it feels a bit awkward when you're a \"hard core\" .NET developer, it's not all that bad once yo... |
{"title":"POST an array from an HTML form without javascript","tags":["html","forms","post"],"question_text":"I have a form that is a little complex and I am hoping to simplify the server-side (PHP) processing by natively POSTing an array of tuples.\nThe first part of the form represents a\nUser\n:\nFirst Name\nLast Na... |
{"title":"How to parse a JSON file in swift?","tags":["ios","swift"],"question_text":"I have a JSON file, want to parse and use list of objects in table view. Can any one share the code to parse JSON file in swift.","answer_text":"Couldn't be more simple:\n`import Foundation\nvar error: NSError?\nlet jsonData: NSData =... |
{"title":"How to disable a global filter in ASP.Net MVC selectively","tags":["asp.net-mvc","actionfilterattribute","global-filter"],"question_text":"I have set up a global filter for all my controller actions in which I open and close NHibernate sessions. 95% of these action need some database access, but 5% don't. Is ... |
{"title":"Hibernate Criteria returns children multiple times with FetchType.EAGER","tags":["java","hibernate"],"question_text":"I have an\n`Order`\nclass that has a list of\n`OrderTransactions`\nand I mapped it with a one-to-many Hibernate mapping like so:\n`@OneToMany(targetEntity = OrderTransaction.class, cascade = C... |
{"title":"Play an audio file using jQuery when a button is clicked","tags":["javascript","jquery","html"],"question_text":"I am trying to play an audio file when I click the button, but it's not working, my html code is:\n`<html> \n <body>\n <div id=\"container\">\n <button id=\"play\">\n Play Music\n <\/button>\n <\/d... |
{"title":"How can I read a text file without locking it?","tags":["c#","file-io"],"question_text":"I have a windows service writes its log in a text file in a simple format.\nNow, I'm going to create a small application to read the service's log and shows both the existing log and the added one as live view.\nThe probl... |
{"title":"Delay :Hover in CSS3?","tags":["css","css3","hover","delay"],"question_text":"Is there a way to delay the :Hover event without using javascript? I know there is a way to delay animations, but I haven't seen anything on delaying the :Hover event.\nEdited...\nSorry, I should have included this to begin with... ... |
{"title":"Allow access permission to write in Program Files of Windows 7","tags":["c#"],"question_text":"My application throws 'Access denied' errors when writing temporary files in the installation directory where the executable resides. However it works perfectly well in XP. How to provide access rights to Program Fi... |
{"title":"CSS3 property webkit-overflow-scrolling:touch ERROR","tags":["css3","webkit","overflow","ios5"],"question_text":"iOS 5 released web designers a new property -webkit-overflow-scrolling:touch that uses the iOS devices hardware accelerator to provide native scrolling for a scrollable div.\nWhen implemented on ou... |
{"title":"Launch Failed Binary not found Eclipse for C in Windows","tags":["c","windows","eclipse"],"question_text":"I installed Eclipse CDT plugin and also the following packages:\nMinSys\nMinGW\nI have also added paths to their bin in the PATH environment variable. Even then I am unable to compile and run any sample ... |
{"title":"Will a using statement rollback a database transaction if an error occurs?","tags":["c#","transactions","rollback","using-statement"],"question_text":"I've got an IDbTransaction in a using statement but I'm unsure if it will be rolled back if an exception is thrown in a using statement. I know that a using st... |
{"title":"Must every ivar be a property?","tags":["objective-c","ios","properties","instance-variables"],"question_text":"I see it recommended all over the place when coding for iOS that properties should be used for accessing instance variables because of the benefits this lends to memory management, among other thing... |
{"title":"Changing font colour in Textboxes in IE which are disabled","tags":["css"],"question_text":"I noticed that you can change the colour of text in textboxes which are disabled in Firefox applying a simple class but could not get a way to do it in IE 6\/7. Does anyone out there have a elegant solution to achieve ... |
{"title":"What is the purpose of the extra braces in Switch case?","tags":["c#","switch-statement"],"question_text":"I'm curious about this thing... see example:\n`switch(x)\n{\n case(a):\n {\n \/\/do stuff\n }\n break;\n case(b):\n \/\/do stuff\n break;\n}`\nAll my life I've done it like case b, but since C# allows me... |
{"title":"How to update and order by using ms sql","tags":["sql","sql-server","tsql","sql-order-by","sql-update"],"question_text":"Ideally I want to do this:\n`UPDATE TOP (10) messages SET status=10 WHERE status=0 ORDER BY priority DESC;`\nIn English: I want to get the top 10 available (status=0) messages from the DB a... |
{"title":"Does overloading '==' get you '!='?","tags":["c++"],"question_text":"If I manually overload the\n`==`\noperator for a structure, do I get the\n`!=`\noperator for free (presumably defined to be the boolean opposite), or do I have to overload it manually (even if to just\n`return !(this == rhs)`\n?\nEdit-The qu... |
{"title":"UICollectionView current visible cell index","tags":["ios","objective-c","ipad","uicollectionview"],"question_text":"I am using\n`UICollectionView`\nfirst time in my iPad application.\nI have set\n`UICollectionView`\nsuch that its size and cell size is same, means only once cell is displayed at a time.\nProbl... |
{"title":"Is it possible to cast a Stream in Java 8?","tags":["java","java-8","java-stream"],"question_text":"Is it possible to cast a stream in Java 8? Say I have a list of objects, I can do something like this to filter out all the additional objects:\n`Stream.of(objects).filter(c -> c instanceof Client)`\nAfter this... |
{"title":"Noop for Swift's Exhaustive Switch Statements","tags":["swift"],"question_text":"Swift requires exhaustive switch statements, and that each case have executable code. Has anybody settled on a good way to handle the cases where you don't want to actually do anything? I can put a println() in there, but that fe... |
{"title":"How to create index on json field in Postgres 9.3","tags":["postgresql","postgresql-9.3"],"question_text":"In PostgreSQL 9.3 Beta 2 (?), how do I create an index on a JSON field? I tried it using the\n`->`\noperator used for\n`hstore`\nbut got the following error:\n`CREATE TABLE publishers(id INT, info JSON);... |
{"title":"new types may not define a return type - C++","tags":["c++","class-design","compilation"],"question_text":"I am confused I think on C++ class structure.\nI have a .h called FxMathFunctions.h and a .cpp called FxMathFunctions.cpp\nthe .h starts like:\n`class FxMathFunctions\n{\n public:\n FxMathFunctions();\n ... |
{"title":"detect numbers or letters with jquery\/javascript?","tags":["javascript","jquery"],"question_text":"i want to use an if-statement to run a code only if the user types in a letter or a number.\ni could use\n`if(event.keyCode == 48 || event.keyCode == 49 || event.keyCode == 50..) {\n \/\/ run code\n }`\nbut is ... |
{"title":"When to use Genetic Algorithms vs. when to use Neural Networks?","tags":["artificial-intelligence","machine-learning","neural-network","genetic-algorithm"],"question_text":"Is there a rule of thumb or set of examples to determine when to use Genetic Algorithms versus when to use Neural Networks to solve a pro... |
{"title":"Print Currency Number Format in PHP","tags":["php","formatting","money"],"question_text":"I have some price values to display in my page.\nI am writing a function which takes the float price and returns the formatted currency val with currency code too..\nFor example,\n`fnPrice(1001.01)`\nshould print\n`$ 1,0... |
{"title":"\"protected\" methods in C#?","tags":["c#",".net","visual-studio"],"question_text":"What are the benefits to defining methods as \"protected\" in C#?\nlike :\n`protected void KeyDemo_KeyPress( object sender, KeyPressEventArgs e ) \n{\n \/\/ some code\n}`\nAs compared to something like this:\n`private void For... |
{"title":"Access python nested dictionary items via a list of keys","tags":["python","list","dictionary","python-2.7"],"question_text":"I have a complex dictionary structure which I would like to access via a list of keys to address the correct item.\n`dataDict = {\n \"a\":{\n \"r\": 1,\n \"s\": 2,\n \"t\": 3\n },\n \"... |
{"title":"How to check \"hasRole\" in Java Code with Spring Security?","tags":["java","spring-security"],"question_text":"How to check user authority or permission in Java Code ? For example - I want to show or hide button for user depending on role. There are annotations like:\n`@PreAuthorize(\"hasRole('ROLE_USER')\")... |
{"title":"Rails 4.2 Server port forwarding on Vagrant does not work","tags":["ruby-on-rails","ruby-on-rails-4","vagrant","ruby-on-rails-4.2"],"question_text":"I have a Vagrant VM with Rails installed with a sample app. The VM is configured to forward the port 3000 (of Rails Webrick server) to my host 3000 port.\n`confi... |
{"title":"mysql update query with sub query","tags":["mysql","sql"],"question_text":"Can anyone see what is wrong with the below query?\nWhen I run it I get:\n#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use\n near 'a where a.Compet... |
{"title":"How do getters and setters work?","tags":["java","setter","getter"],"question_text":"I'm from the php world. Could you explain what getters and setters are and could give you some examples?","answer_text":"Tutorial is not really required for this. Read up on\nencapsulation\n`private String myField; \/\/\"priv... |
{"title":"emacs zoom in\/zoom out","tags":["emacs"],"question_text":"Is there a way to zoom in and out (dynamically change the font size, quite smoothly) on emacs?","answer_text":"Try\nC-x\nC-+\nand\nC-x\nC--\n; that is,\nControl\n-\nx\nControl\n-\nMinus\n\/\nControl\n-\nPlus\n.\nAfter one combination (\nC-x\nC-+\nor\n... |
{"title":"How can I create a product key for my C# application?","tags":["c#",".net","license-key"],"question_text":"How can I create a product key for my C# Application?\nI need to create a product (or license) key that I update annually. Additionally I need to create one for trial versions.\nRelated:\nHow do I best o... |
{"title":"What is the meaning of \"non temporal\" memory accesses in x86","tags":["x86","sse","assembly"],"question_text":"This is a somewhat low-level question. In x86 assembly there are two SSE instructions:\n`MOVDQAxmmi, m128`\nand\n`MOVNTDQAxmmi, m128`\nThe IA-32 Software Developer's Manual says that the\nNT\nin MO... |
{"title":"C# Shorthand Property Question","tags":["c#","properties"],"question_text":"So here is a bit of syntax that I have never seen before, can someone tell me what this means? Not sure if this is supposed to be some shorthand for an abstract property declaration or something or what.\n`public Class1 myVar { get; s... |
{"title":"lock(new object()) -- Cargo cult or some crazy \"language special case\"?","tags":["c#","thread-safety","locking"],"question_text":"I'm reviewing some code written by a consultant, and while dozens of red flags have already popped up, I can't wrap my head around the following snippet:\n`private void foo()\n{\... |
{"title":"how to increment integer Columns value by 1 in SQL","tags":["sql-server-2005"],"question_text":"My questions is\nhow to increment a column's value by 1.\nFor example, suppose a column\n`ID`\nhas values 1,2,3,4, ..\nNow when I update this table then\n`ID`\ncolumn should increment by 1,\nNow\n`ID`\nwill become ... |
{"title":"How to automatically convert strongly typed enum into int?","tags":["c++","c++11","strongly-typed-enum"],"question_text":"`#include <iostream>\nstruct a\n{\n enum LOCAL_A\n {\n A1,\n A2\n };\n};\nenum class b\n{\n B1,\n B2\n};\nint foo( int input )\n{\n return input;\n}\nint main(void)\n{\n std::cout<<foo(a::... |
{"title":"Heroku Postgres Error: PGError: ERROR: relation \"organizations\" does not exist (ActiveRecord::StatementInvalid)","tags":["ruby-on-rails","postgresql","heroku","rails-activerecord"],"question_text":"I'm having a problem deploying my Rails app to Heroku, where this error is thrown when trying to access the ap... |
{"title":"Cast List<T> to List<Interface>","tags":["c#",".net","interface","casting"],"question_text":"`public interface IDic\n{\n int Id { get; set; }\n string Name { get; set; }\n}\npublic class Client : IDic\n{\n}`\nHow can I cast\n`List<Client>`\nto\n`List<IDic>`\n?","answer_text":"You can't\ncast\nit (preserving r... |
{"title":"Why are 0d arrays in Numpy not considered scalar?","tags":["python","numpy"],"question_text":"Surely a 0d array is scalar, but Numpy does not seem to think so... am I missing something or am I just misunderstanding the concept?\n`>>> foo = numpy.array(1.11111111111, numpy.float64)\n>>> numpy.ndim(foo)\n0\n>>>... |
{"title":"C++11: Replace all non-owning raw pointers with std::shared_ptr()?","tags":["c++","memory","c++11","smart-pointers"],"question_text":"With the advent of\n`std::unique_ptr`\n, the blemished\n`std::auto_ptr`\ncan finally be put to rest. So for the last several days, I have been changing my code to use smart poi... |
{"title":"How can I protect my .NET assemblies from decompilation?","tags":["c#",".net","decompiling","reflector"],"question_text":"One if the first things I learned when I started with C# was the most important one. You can decompile any .NET assembly with Reflector or other tools. Many developers are not aware of thi... |
{"title":"Enum.values() vs EnumSet.allOf( ). Which one is more preferable?","tags":["java","enums"],"question_text":"I looked under the hood for\n`EnumSet.allOf`\nand it looks very efficient, especially for enums with less than 64 values.\nBasically all sets share the single array of all possible enum values and the on... |
{"title":"Hidden Columns in jqGrid","tags":["javascript","jquery","jqgrid"],"question_text":"Is there any way to hide a column in a jqGrid table, but have it show as read-only when the row is edited in the form editor modal dialog?","answer_text":"This feature is built into jqGrid.\nsetup your grid function as follows.... |
{"title":"Javascript - insert an array inside another array","tags":["javascript","arrays","performance"],"question_text":"What is the more efficient way to insert an array inside another array.\n`a1 = [1,2,3,4,5];\na2 = [21,22];\nnewArray - a1.insertAt(2,a2) -> [1,2, 21,22, 3,4,5];`\nIterating a2 using splice looks a ... |
{"title":"How to round the minute of a datetime object python","tags":["python"],"question_text":"I have a datetime object produced using strptime().\n`>>> tm\ndatetime.datetime(2010, 6, 10, 3, 56, 23)`\nWhat I need to do is round the minute to the closest 10th minute. What I have been doing up to this point was taking... |
{"title":"Why is this name with an underscore not CLS Compliant?","tags":["c#",".net","cls-compliant"],"question_text":"Why do I get the compiler warning\nIdentifier 'Logic.DomainObjectBase._isNew' is not CLS-compliant\nfor the following code?\n`public abstract class DomainObjectBase\n{\n protected bool _isNew;\n}`","a... |
{"title":"MongoDB C#: ID Serialization best pattern","tags":["c#","mongodb"],"question_text":"I have a class\n`User`\nand I need to work with them in web services.\nThen problem is that if I try to serialize\n`Id`\nthat is type of\n`BsonObjectId`\n, I see\nthat have an empty property, that have an empty property, and s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.