text stringlengths 74 309k |
|---|
{"title":"A non well formed numeric value encountered","tags":["php","validation","date","time"],"question_text":"I have a form that passes two dates (start and finish) to a PHP script that will add those to a DB. I am having problems validating this. I keep getting the following errors\nA non well formed numeric value... |
{"title":"Bundler throws uninitialized constant Gem::SilentUI (NameError) error after upgrading to Rubygems 1.5.0","tags":["ruby","rubygems","bundler"],"question_text":"I ran\n`gem update --system`\nto update to Rubygems 1.5.0 and after every time I run any\n`bundle`\ncommands I get:\n`rvm\/gems\/ruby-1.8.7-p249\/gems\... |
{"title":"Quitting node.js gracefully","tags":["node.js"],"question_text":"I'm reading through the excellent online book\nhttp:\/\/nodebeginner.org\/\nand trying out the simple code\n`var http = require(\"http\");\nfunction onRequest(request, response) {\n response.writeHead(200, {\"Content-Type\": \"text\/plain\"});\n... |
{"title":"Should I use \"camel case\" or underscores in python?","tags":["python","camelcasing","pep8","underscores"],"question_text":"So which is better and why?\n`def my_function():`\nor\n`def myFunction():`","answer_text":"for everything related to Python's style guide: i'd recommend you read\nPEP8\n.\nTo answer you... |
{"title":"How to flatten nested objects with linq expression","tags":["c#",".net","vb.net","linq"],"question_text":"I am trying to flatten nested objects like this:\n`public class Book\n{\n public string Name { get; set; }\n public IList<Chapter> Chapters { get; set; }\n}\npublic class Chapter\n{\n public string Name {... |
{"title":"Load WPF styles or other Static Resources from an external file or assembly","tags":["wpf","xaml","assemblies","styles","resourcedictionary"],"question_text":"I have a few WPF applications and I want all my styles to be in a shared assembly instead of declaring them in each application separately.\nI am looki... |
{"title":"How to get access token from FB.login method in javascript SDK","tags":["facebook","facebook-javascript-sdk"],"question_text":"I need to get the access token from\n`FB.login`\nmethod in Javascript SDK. My login code is\n`FB.login(function(response) {\n if (response.session) {\n if (response.perms) {\n } else ... |
{"title":"MySQL: Invalid use of group function","tags":["mysql","sql","mysql-error-1111"],"question_text":"I am using MySQL. Here is my schema:\nSuppliers(\nsid: integer\n, sname: string, address string)\nParts(\npid: integer\n, pname: string, color: string)\nCatalog(\nsid: integer, pid: integer\n, cost: real)\n(primar... |
{"title":"What rules does software version numbering follow?","tags":["version-control"],"question_text":"I have been developing some software and want to give it version numbers.\nHow do I do this?\nHow is it that some software gets two versions like 1.3v1.1\nor some have 3 numbers - 4.0.1\nWhat is the method behind a... |
{"title":"NoSQL Use Case Scenarios or WHEN to use NoSQL","tags":["nosql","use-case"],"question_text":"With all the hype I'm find it really hard to find reliable information on when to use this. So I pose the following questions, and I'm sorry if these are really dumb questions in advance:\nShould I use NoSQL for user d... |
{"title":"In bash, how do I bind a function key to a command?","tags":["bash","shell","binding"],"question_text":"Example: I want to bind the\nF12\nkey to the command\n`echo \"foobar\"`\nsuch that every time I hit\nF12\nthe message \"foobar\" will be printed to screen. Ideally it could be any arbitrary shell command, n... |
{"title":"Programmatically detect if app is being run on device or simulator","tags":["iphone","ios","simulator","detect"],"question_text":"I'd like to know whether my app is being run on device or simulator at run time. Is there a way to detect this?\nReason being to test bluetooth api with simulator:\nhttp:\/\/volcor... |
{"title":"How to remove specific elements in a numpy array","tags":["python","arrays","numpy"],"question_text":"How can I remove some specific elements from a numpy array? Say I have\n`import numpy as np\na = np.array([1,2,3,4,5,6,7,8,9])`\nI then want to remove\n`3,4,7`\nfrom\n`a`\n. All I know is the index of the val... |
{"title":"IntelliJ IDEA hint parameters of method","tags":["intellij-idea"],"question_text":"I'm just swapping from eclipse to IntelliJ, and I can't find this particular feature.\nIn Eclipse, when the cursor is inside the brackets of a method-call and I press Ctrl+Space, it tells me which parameters this method takes. ... |
{"title":"How to copy text to clipboard\/pasteboard with Swift","tags":["ios","swift","cocoa-touch","copy","uipasteboard"],"question_text":"I'm a Swift newbie looking for a clean example of how to copy text to iOS clipboard that can then be used\/pasted in other apps.\nThe benefit of this function is that the text can ... |
{"title":"\u00e2\u0080\u009ctag already exists in the remote\" error after recreating the git tag","tags":["git","tags","repository"],"question_text":"I get the following error after I run the steps below:\n`To git@provider.com:username\/repo-name.git\n ! [rejected] dev -> dev (already exists)\nerror: failed to push so... |
{"title":"git: How to diff changed files versus previous versions after a pull?","tags":["git"],"question_text":"When I run \"git pull\" I often want to know what changed between the last version of a file and the new one. Say I want to know what someone else committed to a particular file.\nHow is that done?\nI'm assu... |
{"title":"Stop comboBox's selectedIndexChanged event from firing when the form loads","tags":["winforms","data-binding","combobox"],"question_text":"I have a form with a\n`ComboBox`\nthat provides a dropdownlist. On the comboBox's\n`SelectedIndexChanged event`\n, am running some code, but I don't want that code to run ... |
{"title":"ASP.Net Master Page and File path issues","tags":["asp.net","javascript","jquery","runatserver"],"question_text":"I'm trying to add a script reference to jQuery in my master page so that it will work for any page. It currently looks like this\n`<script type=\"text\/javascript\" src=\"jquery.js\"><\/script>`\n... |
{"title":"Can you list the keyword arguments a Python function receives?","tags":["python","arguments","introspection"],"question_text":"I have a dict, which I need to pass key\/values as keyword arguments.. For example..\n`d_args = {'kw1': 'value1', 'kw2': 'value2'}\nexample(**d_args)`\nThis works fine,\nbut\nif there... |
{"title":"What are the specific differences between .msi and setup.exe file?","tags":["windows-services","installer","windows-installer"],"question_text":"I searched a lot, but all are guessed answers. Help me to find the exact answer.","answer_text":"An MSI is a Windows Installer database. Windows Installer (a service... |
{"title":"extern inline","tags":["c++","c","extern","inline-functions"],"question_text":"I understand that \"inline\" by itself is a suggestion to the compiler, and at its descretion it may or may not inline the function, and it will also produce linkable object code.\nI think that \"static inline\" does the same (may ... |
{"title":"How to multiply duration by integer?","tags":["go"],"question_text":"To test concurrent goroutines, I added a line to a function to make it take a random time to return (up to one second)\n`time.Sleep(rand.Int31n(1000) * time.Millisecond)`\nHowever when I compiled, I got this error\n.\\crawler.go:49: invalid ... |
{"title":"Need to perform Wildcard (*,?, etc) search on a string using Regex","tags":["c#",".net","regex","string","wildcard"],"question_text":"I need to perform Wildcard (\n`*`\n,\n`?`\n, etc.) search on a string.\nThis is what I have done:\n`string input = \"Message\";\nstring pattern = \"d*\";\nRegex regex = new Reg... |
{"title":"Why use bzero over memset?","tags":["c","memset","systems-programming"],"question_text":"In a Systems Programming class I took this previous semester, we had to implement a basic client\/server in C. When initializing the structs, like\n`sock_addr_in`\n, or char buffers (that we used to send data back and for... |
{"title":"Azure Storage Emulator error and does not start","tags":["azure","azure-storage-tables","azure-table-storage"],"question_text":"This error is really driving me crazy. (Terminal running in administrator mode)\nInitialization of azure storage emulator in sql server 2014:\n`C:\\Program Files (x86)\\Microsoft SDK... |
{"title":"Using Spring 3 autowire in a standalone Java application","tags":["java","spring","dependency-injection","main","autowired"],"question_text":"Here is my code:\n`public class Main {\n public static void main(String[] args) {\n Main p = new Main();\n p.start(args);\n }\n @Autowired\n private MyBean myBean;\n pr... |
{"title":"Find an element in DOM based on an attribute value","tags":["javascript","dom"],"question_text":"Can you please tell me if there is any DOM API which search for an element with given attribute name and attribute value:\nSomething like:\n`doc.findElementByAttribute(\"myAttribute\", \"aValue\");`","answer_text"... |
{"title":"How to create a string or char from an ASCII value in JavaScript?","tags":["javascript","ascii"],"question_text":"In JavaScript, how to get a string representation of an ASCII value, e.g. how to turn\n`65`\ninto\n`A`\n?","answer_text":"The\nfromCharCode\nmethod converts ASCII to a string:\n`<script type=\"tex... |
{"title":"Java Initialize an int array in a constructor","tags":["java"],"question_text":"I have a class and in that class I have this:\n`\/\/some code\n private int[] data = new int[3];\n \/\/some code`\nThen in my constructor:\n`public Date(){\n data[0] = 0;\n data[1] = 0;\n data[2] = 0;\n}`\nIf I do this, everything... |
{"title":"Install specific git commit with pip","tags":["git","install","commit","pip"],"question_text":"I'm developing a django app and I'm using pip to manage my requirements. How can I do to install a specific git's commit?\nIn my case I need to install this commit:\nhttps:\/\/github.com\/aladagemre\/django-notifica... |
{"title":"C++ where to initialize static const","tags":["c++","static","initialization","constants"],"question_text":"I have a class\n`class foo {\npublic:\n foo();\n foo( int );\nprivate:\n static const string s;\n};`\nWhere is the best place to initialize the string s in the source file?","answer_text":"Anywhere in\n... |
{"title":"Captured variable in a loop in C#","tags":["c#","closures","captured-variable"],"question_text":"I met an interesting issue about C#. I have code like below.\n`List<Func<int>> actions = new List<Func<int>>();\nint variable = 0;\nwhile (variable < 5)\n{\n actions.Add(() => variable * 2);\n ++ variable;\n}\nfor... |
{"title":"Find all duplicate documents in a MongoDB collection by a key field","tags":["mongodb","mapreduce","duplicates","group","aggregation-framework"],"question_text":"Suppose I have a collection with some set of documents. something like this.\n`{ \"_id\" : ObjectId(\"4f127fa55e7242718200002d\"), \"id\":1, \"name\... |
{"title":"Illustrating usage of the volatile keyword in C#","tags":["c#",".net","volatile"],"question_text":"I would like to code a little program which visually illustrates the behavior of the\n`volatile`\nkeyword. Ideally, it should be a program which performs concurrent access to a non volatile static field and whic... |
{"title":"PHP __get and __set magic methods","tags":["php","magic-methods"],"question_text":"Unless I'm completely mistaken, the\n`__get`\nand\n`__set`\nmethods are supposed to allow overloading of the \u2192\n`get`\nand\n`set`\n.\nFor example, the following statements should invoke the\n`__get`\nmethod:\n`echo $foo->b... |
{"title":"How do I create a commit without a parent in Git?","tags":["git"],"question_text":"Possible Duplicate:\nIn git, is there a simple way of introducing an unrelated branch to a repository?\nI have a small project I was working on without any kind of version control software, and I ended up with three different v... |
{"title":"Object doesn't support this property or method Rails Windows 64bit","tags":["javascript","ruby-on-rails"],"question_text":"I installed Rails on my Surface Pro 3 and run into this error after trying to view a page. I have tried several suggestions such as installing rubyracer with libv8 but it didn't help.\nTy... |
{"title":"Naming Conventions For Partial Class Files","tags":["c#","naming-conventions","code-generation","partial-classes"],"question_text":"I'm generating the bulk of my ASP.NET MVC scaffolding code. All generated files are partial classes which use standard naming conventions. For example, my employee controller fil... |
{"title":"Speed difference in using inline strings vs concatenation in php5?","tags":["php","optimization","performance"],"question_text":"(assume php5) consider\n`<?php\n $foo = 'some words';\n \/\/case 1\n print \"these are $foo\";\n \/\/case 2\n print \"these are {$foo}\";\n \/\/case 3\n print 'these are ' . $foo;\n... |
{"title":"How can I choose folders to be ignored during search?","tags":["vscode"],"question_text":"Right now when I use\n`\u00e2\u008c\u0098O`\nto search for files the fuzzy matching appears to operate over all files in the current project. Unfortunately this includes a number of less than completely obvious build and... |
{"title":"How does the Brainfuck Hello World actually work?","tags":["brainfuck"],"question_text":"Someone sent this to me and claimed it is a hello world in Brainfuck (and I hope so...)\n++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.\nI know the basics t... |
{"title":"Debugging Package Manager Console Update-Database Seed Method","tags":["entity-framework-5"],"question_text":"I wanted to debug the Seed() method in my Entity Framework database configuration class when I run update-database from the Package Manager Console but didn't know how to do it. I wanted to share the ... |
{"title":"what are the differences between node.js and node?","tags":["node.js","apt-get","apt","linuxmint"],"question_text":"I have installed node.js in my machine (linux mint 15), when I run\n`node example.js`\n, it says:\n`The program 'node' can be found in the following packages:\n * node\n * nodejs-legacy\nTry: su... |
{"title":"How to configure ckeditor to not wrap content in <p> block?","tags":["ckeditor","wrap"],"question_text":"I am using\nckeditor\non my website to make it easier for users to input HTML.\nHowever, the data I get back from ckeditor is wrapped in\n`<p><\/p>`\nblocks. (Which I don't want.)\nIs there some configurat... |
{"title":"Why do C++11-deleted functions participate in overload resolution?","tags":["c++","c++11"],"question_text":"Why does C++11 make\n\"\n`delete`\nd\" functions participate in overload resolution\n?\nWhy is this useful? Or in other words, why are they hidden instead of being deleted entirely?","answer_text":"Half... |
{"title":"Quick way to find if a port is open on Linux","tags":["linux","bash","shell","port"],"question_text":"From a bash script how can I quickly find out whether a port\n`445`\nis open\/listening on a server.\nI have tried a couple of options, but I want something quick:\n1.\n`lsof -i :445`\n(Takes seconds)\n2.\n`n... |
{"title":"How can I catch a 404?","tags":["c#",".net","exception-handling","error-handling","http-status-code-404"],"question_text":"I have the following code:\n`HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);\nrequest.Method = \"HEAD\";\nrequest.Credentials = MyCredentialCache;\ntry\n{\n request.GetRe... |
{"title":"Why are all fields in an interface implicitly static and final?","tags":["java","interface","static","final","language-implementation"],"question_text":"I am just trying to understand why all fields defined in an Interface are implicitly\n`static`\nand\n`final`\n. The idea of keeping fields\n`static`\nmakes s... |
{"title":"Can I invoke an instance method on a Ruby module without including it?","tags":["ruby","module","methods"],"question_text":"Background:\nI have a module which declares a number of instance methods\n`module UsefulThings\n def get_file; ...\n def delete_file; ...\n def format_text(x); ...\nend`\nAnd I want to c... |
{"title":"Completion block for popViewController","tags":["ios","cocoa-touch","uiview","uiviewcontroller","uiviewanimation"],"question_text":"When dismissing a modal view controller using\n`dismissViewController`\n, there is the option to provide a completion block. Is there a similar equivalent for\n`popViewController... |
{"title":"Windows service template missing?","tags":["c#","visual-studio"],"question_text":"When I go to create a new project, the \"Windows Service\" template isn't there!\nCan someone please either tell me where I can get it, or provide a download link to it?","answer_text":"In Visual Studio 2015 I could not find the... |
{"title":"Can I specify maxlength in css?","tags":["html","css"],"question_text":"Can I replace the maxlength attribute with something in CSS?\n`<input type='text' id=\"phone_extension\" maxlength=\"4\" \/>`","answer_text":"No.\nmaxlength is for behavior.\nCSS is for styling.\nThat is why.","question_code":["<input typ... |
{"title":"How to run shell commands on server in Capistrano v3?","tags":["ruby","capistrano3"],"question_text":"I'm new to Capistrano and I've tried using Capistrano's DSL to run shell commands on the server ('run', 'execute', etc.), but it appears that it was deprecated. After searching and searching for a functional ... |
{"title":"Sublime Text 3 how to change the font size of the file sidebar?","tags":["sublimetext","sublimetext3"],"question_text":"Though I have tried to modify \"font.size\" in classes like \"Label_control\" and \"sidebar_control\" in the Package \"Theme-Default\", the font size of the editor does not change at all. Is... |
{"title":"Correct way to pause Python program","tags":["python"],"question_text":"I've been using the input function as a way to pause my scripts\n`print(\"something\")\nwait = input(\"PRESS ENTER TO CONTINUE.\")\nprint(\"something\")`\nis there a formal way to do this?","answer_text":"Seems fine to me (or\n`raw_input(... |
{"title":"How do I restrict my EditText input to numerical (possibly decimal and signed) input?","tags":["android","android-edittext"],"question_text":"I have read\nAndroid: Limiting EditText to numbers\nand\nHow do I show the number keyboard on an EditText in android\n. Unfortunately, none of them seems to fit my need... |
{"title":"Unexpected CFBundleExecutable key","tags":["ios","itunesconnect","cocoapods","ios9","xcode7-beta5"],"question_text":"After spending some time googling, something tells me that the issue is new.\nWe had a fully functional project supporting iOS7-8. Of course it was multiple times successfully submitted to AppS... |
{"title":"Appcompatv7 - v21 Navigation drawer not showing hamburger icon","tags":["android","android-layout","android-support-library","android-navigation"],"question_text":"I am implementing the lollipop style navigation drawer with latest appcompat support library but the problem is the hamburger icon is never displa... |
{"title":"Invoke a callback at the end of a transition","tags":["javascript","d3.js","transition"],"question_text":"I need to make a FadeOut method (similar to jQuery) using\nD3.js\n. What I need to do is to set the opacity to 0 using\n`transition()`\n.\n`d3.select(\"#myid\").transition().style(\"opacity\", \"0\");`\nT... |
{"title":"Showing\/hiding navigation bar with smooth animation","tags":["iphone","objective-c","cocoa-touch","uinavigationcontroller"],"question_text":"I have a navigation based app. The first view (rootcontroller) starts with three large buttons only. No navigationbar. From there, everything else is tableviews and hav... |
{"title":"What is the time complexity of my function?","tags":["c","algorithm","time-complexity"],"question_text":"Started studying about complexity, I'm struggling with this one:\n`void what(int n) {\n int i;\n for (i = 1; i <= n; i++) {\n int x = n;\n while (x > 0)\n x -= i;\n }\n}`\nWell, the first for loop is clear... |
{"title":"Interview question - Search in sorted array X for index i such that X[i] = i","tags":["java","c++","arrays","algorithm"],"question_text":"I was asked the following question in my interview yesterday:\nConsider a Java or C++ array say\n`X`\nwhich is sorted and no two elements in it are same. How best can you f... |
{"title":"Using python \"with\" statement with try-except block","tags":["python","finally","with-statement","try-catch","except"],"question_text":"Is this the right way to use the python \"with\" statement in combination with a try-except block?:\n`try:\n with open(\"file\", \"r\") as f:\n line = f.readline()\nexcept ... |
{"title":"Should try...catch go inside or outside a loop?","tags":["java","performance","loops","try-catch"],"question_text":"I have a loop that looks something like this:\n`for (int i = 0; i < max; i++) {\n String myString = ...;\n float myNum = Float.parseFloat(myString);\n myFloats[i] = myNum;\n}`\nThis is the main ... |
{"title":"Split a column of a data frame to multiple columns","tags":["r","r-faq"],"question_text":"I'd like to take data of the form\n`before = data.frame(attr = c(1,30,4,6), type=c('foo_and_bar','foo_and_bar_2'))\n attr type\n1 1 foo_and_bar\n2 30 foo_and_bar_2\n3 4 foo_and_bar\n4 6 foo_and_bar_2`\nand use split the ... |
{"title":"How to get a Token from a Lucene TokenStream?","tags":["java","attributes","lucene","token","tokenize"],"question_text":"I'm trying to use Apache Lucene for tokenizing, and I am baffled at the process to obtain Tokens from a\n`TokenStream`\n.\nThe worst part is that I'm looking at the comments in the JavaDocs... |
{"title":"How do I link to part of a page? (hash?)","tags":["html","xhtml"],"question_text":"How do you link (with\n`<a>`\n) so that the browser goes to certain subheading on the target page as opposed to the top?","answer_text":"If there is an\n`<a name=\"foo\">`\ntag or any tag with an\n`id`\n(e.g.,\n`<div id=\"foo\"... |
{"title":"Stop form from submitting , Using Jquery","tags":["jquery","asp.net-mvc-3","validation","preventdefault"],"question_text":"I'm trying to stop my form from submitting if a validation fails. I tried following this\nprevious post\nbut I doesn't work for me. What am I missing?\n`<input id=\"saveButton\" type=\"su... |
{"title":"How do different retention policies affect my annotations?","tags":["java","annotations"],"question_text":"Can anyone explain in a clear way the practical differences between the\n`java.lang.annotation.RetentionPolicy`\nconstants\n`SOURCE`\n,\n`CLASS`\n, and\n`RUNTIME`\n?\nI'm also not exactly sure what the p... |
{"title":"Java 8: Lambda-Streams, Filter by Method with Exception","tags":["java","exception-handling","lambda","java-8"],"question_text":"I have a problem tryingout the Lambda expressions of Java 8.\nUsually it works fine, but now i have methods that throw IOException's. \nIt's best if you look at the code following:\... |
{"title":"How to get all files under a specific directory in MATLAB?","tags":["matlab","file-io"],"question_text":"I need to get all those files under\n`D:\\dic`\nand loop over them to further process individually.\nDoes MATLAB support this kind of operations?\nIt can be done in other scripts like PHP,Python...","answe... |
{"title":"Git - Undo pushed commits","tags":["git"],"question_text":"I have a project in a remote repository, synchronized with a local repository (development) and the server one (prod). I've been making some commited changes already pushed to remote and pulled from the server. Now, I want to undo those changes. So I ... |
{"title":"using python logging in multiple modules","tags":["python","logging","config"],"question_text":"I have a small python project that has the following structure -\n`Project \n -- pkg01\n -- test01.py\n -- pkg02\n -- test02.py\n -- logging.conf`\nI plan to use the default logging module to print messages to stdo... |
{"title":"Compare equality between two objects in NUnit","tags":["unit-testing","nunit","automated-tests"],"question_text":"I'm trying to assert that one object is \"equal\" to another object.\nThe objects are just instances of a class with a bunch of public properties. Is there an easy way to have NUnit assert equalit... |
{"title":"Importing data from a JSON file into R","tags":["json","r"],"question_text":"Is there a way to import data from a JSON file into R? More specifically, the file is an array of JSON objects with string fields, objects, and arrays. The RJSON Package isn't very clear on how to deal with this\nhttp:\/\/cran.r-proj... |
{"title":"MVC Razor @foreach","tags":["asp.net-mvc","razor"],"question_text":"I heard that having @foreach inside of a view is a no-no. Meaning, the view should not have any logic in it. What is the best practice on where the logic for the @foreach should be at?\n`@foreach..`","answer_text":"What is the best practice o... |
{"title":"How do you create a Distinct query in HQL","tags":["hibernate","hql","distinct"],"question_text":"Is there a way to create a Distinct query in HQL. Either by using the \"distinct\" keyword or some other method. I am not sure if distinct is a valid keywork for HQL, but I am looking for the HQL equivalent of th... |
{"title":"android how to create my own Activity and extend it?","tags":["android","android-activity","extends","custom-activity"],"question_text":"I need to create a base class that extends\n`Activity`\nwhich does some common tasks in my application and extend my\nactivities\nfrom it,in the following form:\npublic Base... |
{"title":"Game Center authentication doesn't work in iOS 8","tags":["ios","iphone","ios8","game-center"],"question_text":"I am trying to implement Game Center in my game. I've tried it on the iOS 8 GM.\nI'm not able to get the authentication to work on device, but it works fine in the simulator. I'm using the code prov... |
{"title":"The bare minimum needed to write a MSMQ sample application","tags":["c#","msmq"],"question_text":"I have been researching for over an hour and finding great samples of how to use MSMQ in C# and even one full chapter of a book about Message Queue...But for a quick test all I need is to cover is this scenario, ... |
{"title":"Which MySQL datatype to use for an IP address?","tags":["php","mysql","types","ip-address"],"question_text":"Possible Duplicate:\nHow to store an IP in mySQL\nI want to get the IP address from\n`$_SERVER['REMOTE_ADDR']`\nand some other\n`$_SERVER`\nvariables, which datatype is the right one for this?\nIs it\n... |
{"title":"CSS styling in Django forms","tags":["css","django"],"question_text":"How do I style the following:\nin forms.py --\n`from django import forms\nclass ContactForm(forms.Form):\n subject = forms.CharField(max_length=100)\n email = forms.EmailField(required=False)\n message = forms.CharField(widget=forms.Textare... |
{"title":"iOS 9 Xcode 7 - Application appears with black bars on top and bottom","tags":["ios","ios9","xcode7"],"question_text":"Installed the app on iPhone 6 iOS9 and here is what happened. Notice black bars on top and bottom. It works just fine on iOS8. How I can fix it?\nI've tried building with Xcode 6.4 & 7. Same ... |
{"title":"Set timeout for socket","tags":["java"],"question_text":"When I create a socket:\n`Socket socket = new Socket(ipAddress, port);`\nIt throws an exception, which is OK, because the IP address is not available. (The test variables where\n`String ipAddress = \"192.168.0.3\"`\nand\n`int port = 300`\n.)\nThe proble... |
{"title":"Android View shadow","tags":["android","shadow","dropshadow"],"question_text":"I searched around, and I could not find a proper way to do this. I want to have the following shadow effects on my views:\nTo be honest, I do not know if this second one is done by applying shadow effect. Any ideas?","answer_text":... |
{"title":"How do I create an MD5 Hash of a string in Cocoa?","tags":["objective-c","cocoa","hash","md5"],"question_text":"I know SHA-1 is preferred, but this project requires I use MD5.\n`#include <openssl\/md5.h>\n- (NSString*) MD5Hasher: (NSString*) query {\n NSData* hashed = [query dataUsingEncoding:NSUTF8StringEnco... |
{"title":"Error android.content.res.Resources$NotFoundException: File from xml type layout resource ID #0x102000a","tags":["android","android-layout","android-source"],"question_text":"Hey, I'm trying to create a design for a list that looks like (and mostly behaves like) the call log, like shown here:\nFor this I down... |
{"title":"Arrow triangles on my SVG line","tags":["svg","lines"],"question_text":"I am new to SVG and I am trying to draw a straight line between two points. I managed so far by using this command:\n`<line x1=\"50\" y1=\"50\" x2=\"150\" y2=\"150\" style=\"stroke:rgb(255,255,0); stroke-width:2\" stroke-dasharray=\"5,3\"... |
{"title":"How can I make links in fromHTML clickable? (Android)","tags":["html","android","hyperlink"],"question_text":"This seems like a trivial problem, but is has me kind of stumped. I want to load an HTML string using Html.fromHtml(), and have any links in the string to be clickable and open in the browser.\nBasic ... |
{"title":"Deleting a folder from svn repository","tags":["linux","svn","terminal"],"question_text":"I sometimes make mistakes with svn and have folders stuck in my repository. I want to remove these folders but I cannot figure out a way to do this. Keep in mind I am very new with SVN. I am running this command from app... |
{"title":"How to delete ALL FILES in a specified directory on the app?","tags":["iphone","objective-c","cocoa-touch","filesystems"],"question_text":"Given a directory\n`[[self documentsDirectory] stringByAppendingPathComponent:@\"Photos\/\"]`\nhow do I delete ALL FILES in this folder?\n(assume a correct documents direc... |
{"title":"Git merging using Meld","tags":["git","git-merge","meld"],"question_text":"When there's a collison during\n`git merge`\n, I open a mergetool called\nMeld\n. It opens three files LOCAL, BASE and REMOTE. As I've read LOCAL is my local branch, BASE is common ancestor and REMOTE is the branch to be merged.\nNow t... |
{"title":"The EXECUTE permission is denied on the user-defined table types?","tags":["asp.net","security","sql-server-2008","stored-procedures","user-defined-types"],"question_text":"I have a question about\nUser-Defined Table Types\nin SQL Server 2008.\nFor the need of one of the ASP.NET application we defined our own... |
{"title":"Helvetica Neue Light,iOS","tags":["ios","objective-c","arrays","fonts"],"question_text":"Surprisingly I can't seem to find another question on this... sorry if I'm missing something obvious.\nI'm trying to use Helvetica Neue Light programatically in my iPhone app. It seems that the system doesn't have this bu... |
{"title":"How do I pass values to the constructor on my wcf service?","tags":["wcf","dependency-injection","factory-pattern"],"question_text":"I would like to pass values into the constructor on the class that implements my service.\nHowever ServiceHost only lets me pass in the name of the type to create, not what argu... |
{"title":"How do I fix a merge conflict due to removal of a file in a branch?","tags":["git","git-merge","merge-conflict-resolution"],"question_text":"I have create a\n`dialog`\nbranch and when I try to merge it to\n`master`\nbranch. There are 2 conflicts. I don't know how to resolve\n`CONFLICT (delete\/modify)`\n. Can... |
{"title":"How to do an INNER JOIN on multiple columns","tags":["sql","database"],"question_text":"I'm working on a homework project and I'm supposed to perform a database query which finds flights either by the city name or the airport code, but the\n`flights`\ntable only contains the airport codes so if I want to sear... |
{"title":"How do I insert datetime value into a SQLite database?","tags":["sql","datetime","sqlite"],"question_text":"I am trying to insert a datetime value into a\nSQLite\ndatabase. It seems to be sucsessful but when I try to retrieve the value there is an error:\n<Unable to read data>\nThe SQL statements are:\n`creat... |
{"title":"How can I disable the Design-Mode in VisualStudio options","tags":["visual-studio","xaml"],"question_text":"How can I use only the XAML-Code-View without Visual Studio\nload\nthe Design-Mode?\nI need every Time disable the designMode, i cant find this in my options...","answer_text":"In\nvs2015\ngoto:\nTools ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.