integration

Integrating 2D data over an irregular grid in python

▼魔方 西西 提交于 2019-12-24 01:08:18
问题 So I have 2D function which is sampled irregularly over a domain, and I want to calculate the volume underneath the surface. The data is organised in terms of [x,y,z] , taking a simple example: def f(x,y): return np.cos(10*x*y) * np.exp(-x**2 - y**2) datrange1 = np.linspace(-5,5,1000) datrange2 = np.linspace(-0.5,0.5,1000) ar = [] for x in datrange1: for y in datrange2: ar += [[x,y, f(x,y)]] for x in xrange2: for y in yrange2: ar += [[x,y, f(x,y)]] val_arr1 = np.array(ar) data = np.unique(val

How can I set the SVN password with Emacs 23.1 built-in integration?

本小妞迷上赌 提交于 2019-12-23 21:31:12
问题 I am doing a project on CentOS 6.2 with the distribution supplied Emacs 23.1.1 and subversion using svnserver. I cannot find anywhere how to set the password for repository access. [There is another question here about this (SVN for Emacs: how do you set author name and save password?) but no usable answer for my circumstances.] BACKGROUND: Due to client delivery requirements I need to add as little extra to the installation as possible - using yum install wherever possible, finding non-yum

symbolic derivative and integral

只愿长相守 提交于 2019-12-23 20:58:52
问题 I would like to integrate function f4 with respect to x and then find the derivative of the new function with respect to t . I can calculate the integral numerically. Is there any way to calculate this integral and derivative symbolically in R? lambda=1 ci=1 aa <- function(u,k,t){ f4 <- function(x){ f1 <- function(x){ lambda*exp(2*sqrt(lambda)*ci*t*cos(x)- (1+lambda)*ci*t +u*(sqrt(lambda)*cos(x)-1)) } f2 <- function(x){cos(u*sqrt(lambda)*sin(x)) - cos(u*sqrt(lambda)*sin(x) + 2*x) } f3 <-

Android: Implement admob on surfaceview

本小妞迷上赌 提交于 2019-12-23 19:09:09
问题 I have an activity in form of a small game which uses SurfaceView. Below are the code snippets.. I am confused how to implement admob on surfaceview. Please suggest. public class DroidzActivity extends Activity { private static final String TAG = DroidzActivity.class.getSimpleName(); @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // requesting to turn the title OFF requestWindowFeature(Window.FEATURE_NO_TITLE); // making it full screen

Spring Integration - Inbound file endpoint. How to process a file correctly.

我怕爱的太早我们不能终老 提交于 2019-12-23 18:30:04
问题 I have a Spring integration flow as following. <int-file:inbound-channel-adapter id="filesIn" directory="file:${incomingDir}" filename-pattern="*.txt" prevent-duplicates="true"> <int:poller id="poller" fixed-delay="5000"/> </int-file:inbound-channel-adapter> <int:splitter input-channel="filesIn" ref="filesSplitterService" method="splitFilesToReportContent" output-channel="reportProcessIn" /> <int:channel id="reportProcessIn"/> <int:chain input-channel="reportProcessIn" output-channel=

Install Custom Control in VS Toolbox

天涯浪子 提交于 2019-12-23 15:37:57
问题 Our company provides 3rd party components installed the Inno Setup. We use VS Package to put our component into Visual Studio Toolbox automatically. But it sometimes fail. The VS Package also need something called " Package Load Key " - even though we test it, the Visual Studio refuses to integrate our component on some machines. Are there any alternatives that work with at least both VS 2008 and VS 2010 ? I spent whole day researching for these, but no solution seems complete: use EnvDTE

T-SQL and CLR types for return value do not match

旧巷老猫 提交于 2019-12-23 12:28:44
问题 I'm trying to create a custom SQL Function by CLR Integration but I'm having a T-SQL and CLR types mismatch error. DLL: Imports System Imports System.Data Imports Microsoft.SqlServer.Server Public Class Encrypter_Decrypter <SqlFunction(DataAccess:=DataAccessKind.Read)> _ Public Shared Function EncryptString(ByVal strItem As String) Dim strPassPhrase As String = "***********" Dim strInitVector As String = "***********" Dim objEncryption = New PCI.Encryption() objEncryption.Initialise

Spring context dirty after each integration test

僤鯓⒐⒋嵵緔 提交于 2019-12-23 09:39:07
问题 I recently started as a freelancer on my current project. One of the thing I threw myself on, was the failing Jenkins build (it was failing starting from April 8th, a week before I started here). Generally speaking, you could see a buttload of DI issues in the log. First thing I did, was get all tests to work in the same way, starting from the same application context. They also implemented their own "mocking" thing, which seemed to fail to work correctly. After a discussion with the lead dev

Reddit integration to android app

丶灬走出姿态 提交于 2019-12-23 02:08:07
问题 I need to integrate Reddit to android app. I don't need much. Only log in and post a new link. (something like a share on Facebook). But I am struggling on the very beginning. Any help will b appreciated. EDIT: Here is what I made so far, I get the modhash and captcha but when I try to submit new link it gives me this: {"json": {"errors": [["USER_REQUIRED", "please login to do that", null]]}} private void getModhash(){ modhash = dbHandler.getUserModahash(); if(modhash.equals("")){ String

Best way to integrate Ember.js with external code (e.g., Android's WebView)

做~自己de王妃 提交于 2019-12-23 02:04:36
问题 I'd like to know what is the best practice when developing an Ember.js app when it needs to react to external code (e.g.,called from and Android app through a WebView, or other pieces of code out of the scope of the Ember Application). In such scenario having a public interface between the JavaScript world and the Java world is a necessity. That interface may be a an encapsulated object but it needs to be able to make Ember.js router react to change the application state. This kind of use