text
stringlengths
64
89.7k
meta
dict
Q: Incanter for real world statistical projects I'm interested in statistical computing. R is a leader platform obviously but what about Incanter? Incanter is at the top of my list since I'm a Clojure and JVM guy. Do you have any real world projects with Incanter? Is it a proven platform or I have to fall back to R? ...
{ "pile_set_name": "StackExchange" }
Q: Using logarithmic differentiation to find the derivative of the function $y=x^{x+1}(x+1)^x$ Using logarithmic differentiation, find the derivative of the function $y=x^{x+1}(x+1)^x$. I knew one may begin with this step. $$\ln(y)=\ln(x^{x+1})+\ln(x+1)^x$$ But how to differentiate this? A: $ln(y)=ln(x^{x+1})+ln(...
{ "pile_set_name": "StackExchange" }
Q: Installing rails is failing: Unable to download data I'm trying to install rails on a new machine and am running to the following command issue: gem install rails ERROR: Could not find a valid gem 'rails' (>= 0), here is why: Unable to download data from http://gems.rubyforge.org/ - Errno::ETIMEDOUT: Op...
{ "pile_set_name": "StackExchange" }
Q: Swift Google Places in a tableview what I am trying to do is create a tableView that has the name of a bunch of different restaurants taken from Google's place api. Google recommends getting the place_id, which I am able to do, and use that place_id to get the name of the restaurants, which I am able to do. The pr...
{ "pile_set_name": "StackExchange" }
Q: Are difficult code tests when applying for jobs the norm? I just did the online tech test for Lionhead and found it a bit defeating. There were questions that required you to work out the answers to recursive algorithms that accepted arrays as arguments and made multiple calls each run through, thus splitting off ...
{ "pile_set_name": "StackExchange" }
Q: making service available in ngRoute This code is from the angularjs TodoMVC. You can see resolve object of the routeConfig that it fetches the todos from localStorage (if localStorage is used). The localStorage code is created in an service in another file todoStorage.js. My question is, how is that service (or ho...
{ "pile_set_name": "StackExchange" }
Q: ListDefinition and ListInstance failures with custom content type In VisualStudio 2012 I have a custom content type that I want to use in a ListInstance. When I create a ListDefinition or ListInstance using VisualStudio and add my ContentType I get feature activation errors. Yet if I create a generic ListInstanc...
{ "pile_set_name": "StackExchange" }
Q: Checking for a new day using sql.timestamp I'm working with some legacy code and I'm iterating through some values, the legacy code is checking for the start of a new day using an sql.timestamp value: public static final long MILLIS_PER_SECOND = 1000; public static final long MILLIS_PER_MINUTE = 60 * MILLIS_PER_SE...
{ "pile_set_name": "StackExchange" }
Q: What is the meaning of >> and & in this code context and what they are trying to accomplish? I am following a tutorial on YouTube for making a 2D game. There is no clear explanation on what its actually doing. I get bit-shifting and & operator but I don't know what they mean in this context and I understand basic ...
{ "pile_set_name": "StackExchange" }
Q: android setVisibility(LinearLayout.VISIBLE) not work in WebView @JavascriptInterface Function activity_main.xml content <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-au...
{ "pile_set_name": "StackExchange" }
Q: Android Universe library showImageOnLoading issue I have some issues with DisplayImageOptions.Builder().showImageOnLoading(R.drawable.ic_stub) The method showImageOnLoading(int) is undefined for the type DisplayImageOptions.Builder Other options, like: .showStubImage(R.drawable.ic_stub) .showImageForEmptyUr...
{ "pile_set_name": "StackExchange" }
Q: How do I activate database settings from my settings.py DATABASES array based on environment? I'm using Django with Python 3.7. I have a settings.py file, which includes some database settings ... DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', 'NAME': 'mainpage', ...
{ "pile_set_name": "StackExchange" }
Q: Typeahead in a Model return empty value to form input field I create a table with a button. When a user switch the button it will open a Bootstrap-Modal. Inside the Modal is a form wite a typeahed select field. The list works and all items are selectable. My Problem: If i select a item it shows on form on post t...
{ "pile_set_name": "StackExchange" }
Q: jquery mobile pagecontent beforeshow not working I have this checkbox that when it's checked, it should add some text/content to a favourites page. I've trying to find a way to make it happen, but no luck so far. I've been trying to go around this code: Javascript: $( document ).on( "pagecontainerbeforeshow", func...
{ "pile_set_name": "StackExchange" }
Q: Dot product in LookAt Matrix implementation I was going through an implementation of lookAt matrix for creating view matrix in OpenGL. This particular implementation is from glm math library. When calculating the lookAt matrix the position vector of the transform is calculated as the dot product of respective orie...
{ "pile_set_name": "StackExchange" }
Q: Setting content-type of response in Spring 3.1 mvc webservice I'm trying to set up a spring 3.1 mvc webservice that will return xml. I have a method which returns the xml as a string already called getxmlforparam(). Below is a snippet of the code I have so far which always returns the correct content but with the ...
{ "pile_set_name": "StackExchange" }
Q: Sharing object by reference or pointer Say I have an object of type A having Initialize() method. The method receives object B, which are kept as the object data member. B object is shared between several objects, thus A should contain the originally received B object and not its copy. class A { publ...
{ "pile_set_name": "StackExchange" }
Q: Execute function multiple times without using a loop I have a simple table with IDs: ObjectId ---------- 100 101 102 I'd would like to execute a function fn_GetStuff(Id) multiple times like this: fn_GetStuff(100) fn_GetStuff(101) fn_GetStuff(102) Is it possible to do this without using a loop? I tried this it do...
{ "pile_set_name": "StackExchange" }
Q: Why is "dir-or-file-in-usr-local" an error rather than a warning? I'm building some rpm packages and checking for standards and style conformance using rpmlint. The packages are specific to systems at my place of work and they won't get pushed upstream. Our packages include a variety of software, including in-ho...
{ "pile_set_name": "StackExchange" }
Q: Relation between chemical kinetics and chemical equilibrium In my chemistry book, the law of chemical equilibrium is derived from the law of mass action: For a reversible chemical reaction $$\ce{aA +bB\rightleftharpoons cC + dD}$$ where $a$, $b$, $c$ and $d$ are stoichiometric coefficients in the balanced equatio...
{ "pile_set_name": "StackExchange" }
Q: Draw to an Image I'm new to GDI+ and I don't know how to draw to an Image. I've a matrix ( game map ) and tiles, Can I create an Image or a Bitmap, then I draw everything on it, so I can work with it likes an Image I load from resources. Thanks so much :) A: It sounds like the bit you're missing is that you cre...
{ "pile_set_name": "StackExchange" }
Q: Difference between "the very first" and "first" I have the sentence: Who wrote the very first dictionary ever? Is it any different from Who wrote the first dictionary ever? I don't get how something could be more first. A: Typically, the "very" will be used to add emphasis (such as in your example), but it c...
{ "pile_set_name": "StackExchange" }
Q: React Drag and Drop - react-dnd - make component draggable and droppable at the same time (apply both roles - drag and drop) I created a simplified version of my app. It is here: https://codesandbox.io/s/quirky-glade-x4h51 Current version has bookmarks (top row) and places for them. When used drags bookmark from ...
{ "pile_set_name": "StackExchange" }
Q: Adding none extjs controls to extjs toolbar menu Am trying to add a none extjs element to a toolbar menu items, let's say for example I want to add a jquery ui element to the extjs menu items. Is this possible or doable? Thanks A: You can wrap the jQuery component as a ExtJS Component and use it inside the toolb...
{ "pile_set_name": "StackExchange" }
Q: Some questions about fiber optic cable I'm curious: How fast is fiber in traditional Kbps/Mbps/Gbps language? 100Gbps? Is it possible to set up a private fiber network in an office? What hardware would be required? Is there such a thing as a LAN router or switch that uses fiber optic cable rather than ethernet/t...
{ "pile_set_name": "StackExchange" }
Q: How to show Lists Fields stacked (not tabular) I was wondering how to show a public view of my list data in a stacked form rather than tabular form. That is, the fields in the list should be displayed top to bottom and not left to right... kind of the way an index page of a blog is displayed. When I say 'displayed...
{ "pile_set_name": "StackExchange" }
Q: Django multiple models, one form I have a model that looks like this: class Movie(models.Model): title = models.CharField(max_length=200) slug = models.SlugField(max_length=200) user = models.ForeignKey(User) created_on = models.DateTimeField(default=datetime.datetime.now()) class Meta: ...
{ "pile_set_name": "StackExchange" }
Q: Forbidden Tripartite Graphs I was looking at extremal graph theory. I have understood the proofs of upper bounds for the Zarankiewicz problem which basically states: What can you say about the edges of a graph with $n$ vertices and no $K_{s,t}$ subgraph. However, I was unable to find anything about the tripartite ...
{ "pile_set_name": "StackExchange" }
Q: Sum of series $\frac{x}{1-x^2} + \frac{x^2}{1-x^4} + \frac{x^4}{1-x^8} +\ldots$ The problem is to find the sum of series $$\frac{x}{1-x^2} + \frac{x^2}{1-x^4} + \frac{x^4}{1-x^8} +\ldots$$ to infinite terms, if $|x|<1$ I tried taking $\frac{x}{1-x^2}$ outside but could not solve it. How to proceed further? A:...
{ "pile_set_name": "StackExchange" }
Q: Editing Devise user in one view and requiring password only for some fields I am using Devise with Ruby on Rails and I would like to set up a view for editing user in which I have to provide current password only if I want to have a new password. In other words - if I want to change my name or birthdate, I can sim...
{ "pile_set_name": "StackExchange" }
Q: Count Specific word on ArrayList Imagine that you have this situation: List<String> al = new ArrayList<>(); al.add("[I] am"); al.add("you are"); al.add("I"); al.add("[I] like java"); Now I want to count the sequence [I] (in this case it will count 2 times). The Link How to count the number of occu...
{ "pile_set_name": "StackExchange" }
Q: Swift compiler error: segmentation fault: 11 on Archive When archiving my iOS app prior to submission for App Store release, I get an error that says Command failed due to signal: Segmentation fault: 11 Then there's a huge block of paths and whatnot and at the end is a mention of a function that I have in the ap...
{ "pile_set_name": "StackExchange" }
Q: Are nested enumerables bad practice? In my view I'm generating a a number of restaurant menus that are divided into menu categories and within those categories are dishes. Right now I have my template setup as so: <% @menus.each do |menu| %> <h2><%= menu.name %></h2> ... <% menu.categories.each do |categ...
{ "pile_set_name": "StackExchange" }
Q: JQuery Validation message shows on page load I have the following view: @model GRCWebApp.ViewModels.NewClubInterestsViewModel @{ ViewBag.Title = "Add Club Interests"; } <div class="col-md-10 col-offset-md-1"> <h2 class ="text-success">Add Club Interests for @Html.DisplayFor(model => model.Name)</h2> </div> @usin...
{ "pile_set_name": "StackExchange" }
Q: Ext.util.Format.number - how do I preserve decimal places when adding thousand separator? I've got a bunch of numbers in different units of measure requiring different decimal precision. They all are rendered in the same component. In this component - I need to format numbers to include a thousand separator. This...
{ "pile_set_name": "StackExchange" }
Q: ANTLR Is takes one line of tokens as a single token I'm new to ANTLR and I tried to write a simple parser. I used a valid rules, but when I run the TestRig (grun) with -gui argument on 'var' rule and entered this: var myVar = 13 the debugger tolds me that: line 1:0 mismatched input 'var myVar = 13' expecting 'var...
{ "pile_set_name": "StackExchange" }
Q: Could high-rep users help with clearing comment flags? I have to start this question with a simple assumption: there are a lot of comment flags raised by users: We get a lot of comment flags. A lot. We see a lot of comments. We delete comments all the time. I also realise that clearing comment flags is, probably...
{ "pile_set_name": "StackExchange" }
Q: Why won't these two UIViews fade in and out using my animation? I have two views that I would like to fade in and out. I tried the code below, but it does not seem to work, the transition only happens once. Can anyone tell me the right way to accomplish what I am trying to do? vView1.alpha = 0.0; vView2.alpha =...
{ "pile_set_name": "StackExchange" }
Q: Scan a document and convert to key text I am trying to find a way to scan a "paper document" with my scanner and then, trying with a programming language, like C# or C++, to figure out what letters are printed on the page to convert them to normal text. In other words, I am trying to implement a "key from scanned ...
{ "pile_set_name": "StackExchange" }
Q: A way to determine browser width in PHP without javascript? First off is there one? Or would I have to use javascript? I'd like to be able to make changes to which CSS is used, so frex I could load smaller fonts for a mobile device, or whatever. A: Unfortunately there is no way to detect the users resolution wit...
{ "pile_set_name": "StackExchange" }
Q: Multiple instances of the same ResourceDictionary I have found this post about improving performance of ResourceDictionaries on the web, but the problem is that it's pretty old (2011). I was thinking about implementing something like this, but I'm wondering if Microsoft has not fixed this in the last releases of ....
{ "pile_set_name": "StackExchange" }
Q: Could not open ServletContext resource [/] when upgrade spring-boot-actuator 1.2.5.RELEASE I am using spring-boot-actuator dependency with version 1.1.2 with non spring boot application, now I want to upgrade to version 1.2.5.RELEASE to use the default chipped health endpoint in my application. When I upgrade to 1...
{ "pile_set_name": "StackExchange" }
Q: Bind DataGrid Columns to Nested Objects I have a main object that has properties, each their own object: Package { Name Date } Document { Name Package1 = Package() Package2 = Package() Package3 = Package() Package4 = Package() } Now in WPF datagrid, I'd like to bind each column to one of t...
{ "pile_set_name": "StackExchange" }
Q: How to prevent a child element from clipping if the parent's overflow is not visible? Once assigning overflow with a value other than visible, all its child elements will be clipped. It is the purpose of the overflow property. However, I have to make one of the child elements to be 'floated' and not clipped (like ...
{ "pile_set_name": "StackExchange" }
Q: Google App Engine: Can't import Go packages I'm attempting the Google App Engine "hello world" example found here. I'm using the Go language, and following exactly the steps given in the above-mentioned tutorial. Additionally, I've installed Go using the installer here. I'm running Windows 7 x64. When I run the sa...
{ "pile_set_name": "StackExchange" }
Q: approximating a geometric sum of exponentials by an integral Let $e(x) = e^{2 \pi i x}$. Let $I = [a,b]$ be a closed interval of real numbers. I am interested in the sum $$ S = \sum_{n \in I \cap \mathbb{Z}} e(\alpha n) $$ for some real number $\alpha.$ Do there exists constants $c_1, c_2>0$ such that we can appr...
{ "pile_set_name": "StackExchange" }
Q: How to select all list elemnets of a specific in jquery? //first ul <ul> <li></li> <li></li> <li></li> <li></li> <li></li> </ul> //second ul <ul > <li></li> <li></li> <li></li> <li><...
{ "pile_set_name": "StackExchange" }
Q: Disable IPv6 on Loopback address (Localhost, Computer name, ...) We tried installing a 3rd party software product on a new Windows Server 2008 R2 machine and found that everything works except for accessing local services through loopback addresses such as localhost or the computer name (ex: VPS-Web which resolves...
{ "pile_set_name": "StackExchange" }
Q: Что использовать для ежедневной отправки уведомлений? Мне нужно, чтобы приложение каждый день (когда оно закрыто) выполняла очень простые действия, по получению данных, и после этого отправляла уведомление. Подскажите, что лучше использовать? A: WorkManager - это API, который позволяет легко планировать отложенн...
{ "pile_set_name": "StackExchange" }