2018-10-22         Madge

ASP.NET: external custom config file in a virtual directory - how to?

I know that there at least two approaches to leverage the web.config file:using the configSource attribute which was introduced in .NET 2.0 - here is a good blog entry about it.The file attribute of the appSettings tag which lets you point to an external file with a relative path. Described in the MSDN documentation on the appSettings element.Now, my problem is that both approaches work well only for physical paths. But I need to address a config file which is in a virtual directory.Which other method could I use to put my config resources in a virtual directory?Note: I wan...

 asp.net                     3 answers                     24 view
 2018-10-22         Madge

One node decision tree in matlab

Im using matlab 2014a and I cant find how to do 1 node decision tree (and 2 nodes, 3 nodes ext.) Itried to use: "MaxNumSplits",and "MaxDepth" but I got MaxNumSplits is not a valid parameter name.thanks ahead Your version of Matlab is too old for manipulating the MaxNumSplits parameter.Matlab's way of implementing algorithms changes along time. This is the case here for fitctree (fit classification tree) when the R2015a version was released. See the following 'new features' page introducing 2 new parameters for the fitctree function Additional option to control ...

 matlab                     1 answers                     104 view
 2018-10-22         Madge

Makefile automatic variables

I'm working on a library of (more or less random ) c functions that I use in projects. The previous incarnation of it had every .c, .o file listed and manually compiled in target:$(CC) $(SRCDIR)/somefoo.c $(CFLAGS) ... -c -o $(OBJDIR)/somefoo.oThis became tiresome, inaccurate and a pain, and I wanted to create a friendlier, better Makefile I could use for any project. After googling, reading( O'Reily's "Managing Projects with GNU Make ) and thinking I came up with:BIN = /usr/binSH = $(BIN)/bashCC = $(BIN)/ccAR = $(BIN)/arRL = $(BIN)/ranlibRM = $(BIN)/rmCP = $(BIN)/cpR...

 makefile                     1 answers                     34 view
 2018-10-22         Madge

error when docker build python django app in alpine linux

DockerfileFROM python:3.6.5-alpine3.7WORKDIR /appADD . /appRUN pip install --no-cache-dir -r requirements.txtEXPOSE 10021CMD ["python", "manage.py", "runserver", "0.0.0.0:10021"]Requirements openpyxl==2.4.11 requests==2.18.4 Django==2.0.2 mysqlclient==1.3.12 Build ErrorCollecting mysqlclient==1.3.12 (from -r requirements.txt (line 4)) Downloading https://mirrors.aliyun.com/pypi/packages/6f/86/bad31f1c1bb0cc99e88ca2adb7cb5c71f7a6540c1bb001480513de76a931/mysqlclient-1.3.12.tar.gz (89kB) Complete output from command python setup.py egg_info: /bin/sh: mysql_config: ...

 mysql                     1 answers                     9 view
 2018-10-22         Madge

Handle missing data for a dataframe column of datatype object

I have a pandas dataframe and one of the column is of datatype object . There is a blank element present in this column, so I tried to check if there are other empty element in this column by using df['colname'].isnull().sum() but it is giving me 0. How can I replace the above value(empty) with some arbitrary value(numeric) so that I can convert this column into a column of float datatype for further computation. pandas.to_numericdf['colname'] = pd.to_numeric(df['colname'], errors='coerce')This will produce np.nan for any thing it can't convert to a number. After this, ...

 python-3.x                     1 answers                     26 view
 2018-10-22         Madge

C# Convert Date To Double

I have written a function in VBA which creates a code from the properties of a file.I need a developer to do the same in C# on their end.The developer says it is not possible to do the same in c#.So in VBA, part of my process is to convert a date to a double. The way VBA does this is to basically count the number of days between the given date and 1 Jan 1900. So 19 Mar 2014 would be a double value of 41,717.How would I say write a function in C# (not a language I am familiar with) that would convert a date data type to the number of days that have passed since 1 January 190...

 c#                     4 answers                     19 view
 2018-10-22         Madge

Reverse a line that has multiple values

I am working on a program that allows the user to input an integer, double, character, and a string. I have used variables to store the numbers in I am using BlueJ as my IDE, and my question is how I can reverse a system.out.println line that has variables in it?Here is my code below:import java.util.Scanner;import java.lang.String;public class Lab1{ public static void main(String[] args) { Scanner input = new Scanner(System.in); //Entering a integer int money = 0; System.out.println("Enter an integer:"); money = input.nextInt(); ...

 java                     1 answers                     45 view
 2018-10-22         Madge

Can the Android native CardView be used in Xamarin Forms XAML?

I've messed around as best I can but I can't find a way to embed the native xamarin.android CardView control within xamarin.forms xaml. Following is my code:my namespacesxmlns:androidWidget="clr-namespace:Android.Widget;assembly=Mono.Android;targetPlatform=Android" xmlns:androidWidgetv7="clr-namespace:Android.Support.V7.Widget;assembly=Xamarin.Android.Support.v7.CardView;targetPlatform=Android"xmlns:androidLocal="clr-namespace:MyApp.Droid;assembly=MyApp.Android;targetPlatform=Android"My Xaml<androidWidgetv7:CardView x:Arguments="{x:Static androidLocal:MainActivity.In...

 xaml                     1 answers                     14 view
 2018-10-22         Madge

Established connection to database but rendering a blank page

I am simply trying to display data from a table in my database.For some reason, it keeps rendering a blank page. I have no training at all. SO I am sure my code looks like crap. But I can usually get it to work. I researched but all I could find were connection problems. I get a 'connected successfully' message but no data and no error message.<?php$db_host = 'localhost'; $db_user = 'user'; $db_pass = ''; $db_name = ''; $conn = mysqli_connect($db_host, $db_user, $db_pass, $db_name);if ($conn->connect_error) {die("Connection failed: " . $conn->connect_error);}echo "...

 php                     6 answers                     99 view
 2018-10-22         Madge

SQL Server: +(unary) operator on non-numeric Strings

I am surprised! This statement below is valid in SQL SERVER:SELECT +'ABCDEF'Has SQL Server defined + as a Unary operator for string types? Here is my own answer to this question (Please also see the update at the end):No, there isn't such unary operator defined on the String expressions. It is possible that this is a bug. Explanation:The given statement is valid and it generates the below result:(No column name) ----------------ABCDEF(1 row(s) affected)which is equivalent to doing the SELECT statement without using the + sign:SELECT 'ABCDEF'Being compiled without givin...

 sql                     1 answers                     63 view
 2018-10-22         Madge

How to obtain service packs for SQL Server 2008 R2?

Where to find the information about service packs already released or planned for SQL Server 2008 R2? SQL Update information, for all versions, all types (Service packs and the monthly cumulative updates) is published at...http://blogs.msdn.com/b/sqlreleaseservices/ [XXX]I believe that only Cumulative Updates are released for the SQL 2008 R2.The current SQL Server 2008 SP is SP2, but it does not apply to R2. R2 is a separate release. [XXX]If you go towards the bottom of this KB article it is updated with the latest SP/CU for each version of SQL Server as it is rele...

 sql                     4 answers                     75 view
 2018-10-22         Madge

NullPointer when I try to obtain list of objects

In this question NullPointer when call entity Manager suggested to add @Autowire DAO into controller. I did it and it is working fine. Then I added the @Transactional anntotation in DaoImpl and every operation insert/delete/update was available except select statement. When I call this method I see NPE. Can anyone help?public List<Object[]> showAll() { return filmDao.getAllFilms(); }This is full code of Controller: https://pastebin.com/BNi5EH86Select looks like:public List<Object[]> getAllFilms() { List<Object[]> all; EntityManager manager ...

 java                     1 answers                     55 view
 2018-10-22         Madge

XAMPP when configured to port 8080 and hosts file (and WordPress-mu install) issue

I am trying to install WordPress MU in my XAMPP localhost server (that is configured to port 8080).Using this address in the browser >>http://localhost:8080/wordpress-mu/<<gets this response >>WPMU only works without the port number in the URL.<<This is the last line in my hosts file:127.0.0.1 localhost.localdomain(This points to my IIS7 localhost server not to my XAMPP local host)I am guessing I need to add another entry in this hosts file to configure this for XAMPP and WordPress MU but am not sure what it should be? Are you using IIS at all?If not, just S...

 xampp                     3 answers                     49 view
 2018-10-22         Madge

Maven 'resources' folder not found

On the first step, I have a dynamic web project in Eclipse with folder resources in WebContentNow I like to try Maven, I use the 'convert dynamic web project to maven' with right click on the project and configure => convert to mavenI set the pom.xml with dependence for the jar and it's ok.I run the application but I don't see the resources folder of project in my WebContent with all css, js, ....I changed the default folder src / app / resources for maven (i think) by WebContent / resources, but it's not workingDo you have an idea for me?my pom.xml<project xmlns="http:/...

 java                     1 answers                     82 view
 2018-10-22         Madge

How to search for a pattern in a file and store it in a variable using shell script? Please give an example

This question already has an answer here: How to set a variable to the output of a command in Bash? 13 answers Bash script store command output into variable 2 answers Save output in variable? [duplicate] 2 answers Store output of sed into a variable 4 answers ...

 bash                     1 answers                     39 view
 2018-10-22         Madge

SyntaxError: multiple statements found while compiling a single statement [Real Python Rookie]

This question already has an answer here: SyntaxError: multiple statements found while compiling a single statement 1 answer Behaviour of increment and decrement operators in Python 6 answers i-- doesn't work in python. -- is no existing operator. You could use i -= 1 for example. [XXX]

 python                     1 answers                     79 view

Page 1 of 146  |  Show More Pages:  Top Prev Next Last