Questions Tagged with #Crystal reports

Crystal Reports is a report writer that operates as a stand-alone report designer, an integrated part of Visual Studio, or part of SAP's Business Objects Enterprise suite.

Mixed mode assembly is built against version ‘v2.0.50727' of the runtime

I'm getting the following exception: Mixed mode assembly is built against version ‘v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information..

Are there any Open Source alternatives to Crystal Reports?

Are there any Open Source alternatives to Crystal Reports?..

Difference between chr(13) and chr(10)

What is the difference between chr(13) and chr(10) in Crystal Reports? I know chr(13) is used as a line break. But one of our reports uses this line: {Address1} + chr(13) + chr(10) + {Address2} ..

Formatting a field using ToText in a Crystal Reports formula field

I'm trying to create a Crystal Reports formula field (to calculate the percentage change in a price) that will return "N/A" if a particular report field is null, but return a number to two decimal pla..

How do I point Crystal Reports at a new database

I have a Crystal Reports 2008 user that has over 100 custom developed reports. The reports all query Sql Server databases (SQL 2005). This database server is getting replaced with a new system (runnin..

Could not load file or assembly CrystalDecisions.ReportAppServer.ClientDoc

I've looked at similar questions on SO, but nothing quite matches my issue as far as I can tell. The exception message: Could not load file or assembly 'CrystalDecisions.ReportAppServer.ClientDoc..

SAP Crystal Reports runtime for .Net 4.0 (64-bit)

I need a runtime for SAP Crystal Reports for .Net 4.0 (64-bit). I have been searching from the web but not getting any success. Can I get the URL from where can i download this..

Crystal Reports for VS2012 - VS2013 - VS2015 - VS2017 - VS2019

I have installed VS2012 Ultimate on a fresh PC. I tried adding the Crystal Reports file in my project but there is no crystal report .crt Item avaliable into Add New Item menu of the VS2012 Is there ..

Number to String in a formula field

I am using a formula field to concatonate 2 decimal values separated by a dash. However, I want the result to trim all unneccesary trailing zeros and decimal points for both values. For example, I wa..

Convert string to number field

I have a Database field whose datatype is String in Crystal Reports. How can I convert it to a number value?..

Crystal Reports 13 And Asp.Net 3.5

I'm developing a website using Asp.Net 3.5 in Visual Studio 2008 and we use Crystal Reports 10 (that's come together vs2008). Last Year, We migrate it to Visual Studio 2010 but we still use .Net 3.5..

Could not load file or assembly 'CrystalDecisions.ReportAppServer.CommLayer, Version=13.0.2000.0

I have developed a simple project. where i have to print some crystal report. the project runs very well in local machine, but when i up this on a web hosting server, it shows me an error when crystal..

How to integrate SAP Crystal Reports in Visual Studio 2017

Is it possible to use the report designer in the current release of Visual Studio 2017? The SAP crystal report wiki for visual studio integration only states: "RC build currently not supported - ..

Edit Crystal report file without Crystal Report software

I need to modify a static text (few words) in 3 rpt files. But I dont have Crystal Reports. How can I do it? Is there a free editor or software to be able to modify a simple text of the report?..

How to calculate sum of a formula field in crystal Reports?

In some inherited code, I see group headers/footers have items like 'Sum of @numcount' . I cannot get the sum of a formula field. Any thoughts?..

Formula to check if string is empty in Crystal Reports

I have written a formula to return a string based on logic run on a string field in my database. I have everything working, except I'm unable to return when the field is the empty string. This is wh..

How to convert datetime format to date format in crystal report using C#?

i am working c# windows form application and also in crystal report.i am retriving the date from database in datetime format but i like display date only in report,Is any formula field in crystal repo..

Crystal Reports - Adding a parameter to a 'Command' query

Crystal Version - Crystal Reports 2008 Business Objects - XI I have written a query to populate a subreport and want to pull in a parameter to that query based on input from a user. My question is, ..

How can I reconcile detached HEAD with master/origin?

I'm new at the branching complexities of Git. I always work on a single branch and commit changes and then periodically push to my remote origin. Somewhere recently, I did a reset of some files to ge..

How to convert datetime to integer in python

how can i convert YYYY-MM-DD hh:mm:ss format to integer in python? for example 2014-02-12 20:51:14 -> to integer. i know how to convert only hh:mm:ss but not yyyy-mm-dd hh:mm:ss def time_to_num(time..

How can I parse / create a date time stamp formatted with fractional seconds UTC timezone (ISO 8601, RFC 3339) in Swift?

How to generate a date time stamp, using the format standards for ISO 8601 and RFC 3339? The goal is a string that looks like this: "2015-01-01T00:00:00.000Z" Format: year, month, day, as "XXXX-..

How to query values from xml nodes?

i have a table that contains an XML column: CREATE TABLE Batches( BatchID int, RawXml xml ) The xml contains items such as: <GrobReportXmlFileXmlFile> <GrobReport> &l..

EC2 instance has no public DNS

A guy I work with gave me the EC2 credentials to log onto his EC2 console. I was not the one who set it up. Some of the instances show a public dns name and others have a blank public DNS. I want to b..

Select row on click react-table

I am trying to find the best table to use with my react apps, and for now, the react-table offers everything I need (pagination, server-side control, filtering, sorting, footer row). This being said,..

Parse date string and change format

I have a date string with the format 'Mon Feb 15 2010'. I want to change the format to '15/02/2010'. How can I do this?..

How to create a byte array in C++?

Please have a look at the followng header file #pragma once class MissileLauncher { public: MissileLauncher(void); private: byte abc[3]; }; This generated the error Error 1 error C21..

Reset input value in angular 2

I have the following input field : <input mdInput placeholder="Name" #filterName name="filterName" > I want to clear value on click of clear button : <button (click)="clearFilters()">C..

How do I divide in the Linux console?

I have to variables and I want to find the value of one divided by the other. What commands should I use to do this?..

Update row with data from another row in the same table

I've got a table which looks something like this ID | NAME | VALUE | ---------------------------- 1 | Test | VALUE1 | 2 | Test2 | VALUE2 | 1 | Test2 | | 4 ..

How is Java platform-independent when it needs a JVM to run?

I just started learning Java and I'm confused about the topic of platform independence. Doesn't "independent" imply that Java code should run on any machine and need no special software to be install..

Sending images using Http Post

I want to send an image from the android client to the Django server using Http Post. The image is chosen from the gallery. At present, I am using list value name Pairs to send the necessary data to t..

Get all rows from SQLite

I have been trying to get all rows from the SQLite database. But I got only last row from the following codes. FileChooser class: public ArrayList<String> readFileFromSQLite() { fileName =..

Checking if an input field is required using jQuery

What would be the easiest way to check if an input is required? I have been trying stuff along these lines but always comes up with all required (only 4/6 are). $('form#register').find('input').each(..

Check if a file exists or not in Windows PowerShell?

I have this script which compares files in two areas of the disk and copies the latest file over the one with the older modified date. $filestowatch=get-content C:\H\files-to-watch.txt $adminFiles=..

How to declare empty list and then add string in scala?

I have code like this: val dm = List[String]() val dk = List[Map[String,Object]]() ..... dm.add("text") dk.add(Map("1" -> "ok")) but it throws runtime java.lang.UnsupportedOperationException...

how to implement a pop up dialog box in iOS

After a calculation, I want to display a pop up or alert box conveying a message to the user. Does anyone know where I can find more information about this?..

Restrict varchar() column to specific values?

Is there a way to specify, for example 4 distinct values for a varchar column in MS SQL Server 2008? For example, I need a column called Frequency (varchar) that only accepts 'Daily', 'Weekly', 'Mont..

How to list all the files in android phone by using adb shell?

I just try to write a bash shell for my Android Phone. When I want list all the files in my Android Phone. I found that the Android shell terminal doesn't support find command. So I just want to know ..

How to create a delay in Swift?

I want to pause my app at a certain in point. In other words, I want my app to execute the code, but then at a certain point, pause for 4 seconds, and then continue on with the rest of the code. How c..

ASP.NET - How to write some html in the page? With Response.Write?

I need that some html in the area in the page that i am coding, is changed according to a string variable. I was thinking about creating a label, and then change the text on it. But the strin..

How do I perform a JAVA callback between classes?

I am coming from JavaScript, in which callbacks are pretty easy. I am trying to implement them into JAVA, without success. I have a Parent class: import; import java.util.concurrent...

right click context menu for datagridview

I have a datagridview in a .NET winform app. I would like to rightclick on a row and have a menu pop up. Then i would like to select things such as copy, validate, etc How do i make A) a menu pop up ..

MySQL Update Column +1?

I was wondering what would be the easiest way to update a column by +1? I will be updating a post count of a category based on when users submits a new post. Thanks...

changing visibility using javascript

hi i have web page which uses ajax to retrieving data from another pages and while doing that i want to show a loading gif in the page so i've create a div with my gif on it. <div id="loading">..

How to write to a CSV line by line?

I have data which is being accessed via http request and is sent back by the server in a comma separated format, I have the following code : site= '' hdr = {'User-Agent': 'Mozilla/5.0'..

Get value from hashmap based on key to JSTL

I want to get the value of HashMap based on key. HashMap<String, ArrayList<String>> map = new HashMap<String, ArrayList<String>>(); ArrayList<String> arrayList = ne..

How can I do an UPDATE statement with JOIN in SQL Server?

I need to update this table in SQL Server with data from its 'parent' table, see below: Table: sale id (int) udid (int) assid (int) Table: ud id (int) assid (int) sale.assid contains the corr..

How to create a String with carriage returns?

For a JUnit test I need a String which consists of multiple lines. But all I get is a single lined String. I tried the following: String str = ";;;;;;\n" + "Name, number, address..

Count all duplicates of each value

I would like a SQL query for MS Jet 4.0 (MSSql?) to get a count of all the duplicates of each number in a database. The fields are: id (autonum), number (text) I have a database with a lot of numb..

"import datetime" v.s. "from datetime import datetime"

I have a script that needs to execute the following at different lines in the script: today_date = date_time = datetime.strp(date_time_string, '%Y-%m-%d %H:%M') In my import s..

python: SyntaxError: EOL while scanning string literal

I have the above-mentioned error in s1="some very long string............" Does anyone know what I am doing wrong?..

Sublime Text 2 multiple line edit

I want to edit multiple lines and every "word" within that line. For example: 45 28 42 65 24 87 47 95 01 25 87 98 I want to select every whole number in all lines and put a "0x" before it so it wou..

Git Ignores and Maven targets

Anyone know if it is possible to ignore all the instances of a particular directory in a file structure managed by git. I'm looking to exclude all the 'target' folders in a maven project with a numb..

HttpClient does not exist in .net 4.0: what can I do?

Ok i edited my code i dont get errors but the messageBox.Show return nothing empty box. Maybe i need to add something in the referrer string ? I didnt understand what is the referrer and what should i..

Python how to exit main function

Possible Duplicates: Terminating a Python script Terminating a Python Program My question is how to exit out in Python main function? I have tried 'return' but it gave the error SyntaxEr..

What does the "assert" keyword do?

What does assert do? For example in the function: private static int charAt(String s, int d) { assert d >= 0 && d <= s.length(); if (d == s.length()) return -1; return s.cha..

Session only cookies with Javascript

I was wondering if it's possible to create session only cookies with Javascript. When the browser is closed the cookies should be removed. I can't use anything on the server as the website is HTML o..

How do you dynamically add elements to a ListView on Android?

Can anyone explain or suggest a tutorial to dynamically create a ListView in android? Here are my requirements: I should be able to dynamically add new elements by pressing a button. Should be simple..

setAttribute('display','none') not working

function classInfo(e){ document.getElementById('classRight').setAttribute('display','none'); alert(e); } I think this code is very straightforward bit it's not working, and is not hiding ..

Fixed position but relative to container

I am trying to fix a div so it always sticks to the top of the screen, using: position: fixed; top: 0px; right: 0px; However, the div is inside a centered container. When I use position:fixed it fi..

How to hide a div element depending on Model value? MVC

Here is what I have at the moment hidden="@(Model.IsOwnedByUser||!Model.CanEdit)" This works fine on Chrome but doesnt hide on Internet Explorer I tried also visibility set false but no luck. t..

Using union and order by clause in mysql

I want to use order by with union in mysql query. I am fetching different types of record based on different criteria from a table based on distance for a search on my site. The first select query ret..

What causes the error "undefined reference to (some function)"?

I get the error: main.o(.text+0x1ed): In function `main': : undefined reference to `avergecolumns' collect2: ld returned 1 exit status when I gcc *.o. I'm not quite sure what causes this error. O..

How to overlay image with color in CSS?

Objective I want a color overlay on this header element. How can I do this with CSS? Code _x000D_ _x000D_ #header { /* Original url */ /*background: url(../img/bg.jpg) 0 0 no-repeat fixed;*/ bac..

Error: No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlClient'

I recently upgraded/updated Entity Framework in an old project from version 4 or 5 to version 6. Now I get this exception: An exception of type 'System.InvalidOperationException' occurred in Ent..

How to check if a .txt file is in ASCII or UTF-8 format in Windows environment?

I have converted a .txt file from ASCII to UTF-8 using UltraEdit. However, I am not sure how to verify if it is in UTF-8 format in Windows environment. Thank you!..

Python popen command. Wait until the command is finished

I have a script where I launch with popen a shell command. The problem is that the script doesn't wait until that popen command is finished and go continues right away. om_points = os.popen(command, ..

moment.js - UTC gives wrong date

Why does moment.js UTC always show the wrong date. For example from chrome's developer console: moment(('07-18-2013')).utc().format("YYYY-MM-DD").toString() // or moment.utc(new Date('07-18-2013')).f..

sql server invalid object name - but tables are listed in SSMS tables list

I am attempting to create a Stored Procedure for a newly created database. However the SSMS intellisense does not recognize more than half of the tables which have been created. For example whilst i..

scp or sftp copy multiple files with single command

I'd like to copy files from/to remote server in different directories. For example, I want to run these 4 commands at once. scp remote:A/1.txt local:A/1.txt scp remote:A/2.txt local:A/2.txt scp remot..

How can I hide an HTML table row <tr> so that it takes up no space?

How can I hide an HTML table row <tr> so that it takes up no space? I have several <tr>'s set to style="display:none;", but they still affect the size of the table and the table's border ..

Parsing JSON Object in Java

I have JSON object as follows: member = "{interests : [{interestKey:Dogs}, {interestKey:Cats}]}"; In Java I want to parse the above json object and store the values in an arraylist. I am seeking s..

Bulk create model objects in django

I have a lot of objects to save in database, and so I want to create Model instances with that. With django, I can create all the models instances, with MyModel(data), and then I want to save them al..

Reading a List from properties file and load with spring annotation @Value

I want to have a list of values in a .properties file, ie: my.list.of.strings=ABC,CDE,EFG And to load it in my class directly, ie: @Value("${my.list.of.strings}") private List<String> myList..

MySQL: Cloning a MySQL database on the same MySql instance

I would like to write a script which copies my current database sitedb1 to sitedb2 on the same mysql database instance. I know I can dump the sitedb1 to a sql script: mysqldump -u root -p sitedb1 >..

Does C# have a String Tokenizer like Java's?

I'm doing simple string input parsing and I am in need of a string tokenizer. I am new to C# but have programmed Java, and it seems natural that C# should have a string tokenizer. Does it? Where is it..

How to control the width of select tag?

I have a list of countries, some with a very long name: <select name=countries> <option value=af>Afghanistan</option> <option value=ax>Åland Islands</option> ... &l..

Converting a pointer into an integer

I am trying to adapt an existing code to a 64 bit machine. The main problem is that in one function, the previous coder uses a void* argument that is converted into suitable type in the function itsel..

How to add key,value pair to dictionary?

How to add key,value pair to dictionary?.Below i have mentioned following format? {'1_somemessage': [[3L, 1L, u'AAA', 1689544L, ..

remove objects from array by object property

var listToDelete = ['abc', 'efg']; var arrayOfObjects = [{id:'abc',name:'oh'}, // delete me {id:'efg',name:'em'}, // delete me {id:'hij',name:'ge'}] // all..

SQL Server table creation date query

How can I get the table creation date of a MS SQL table using a SQL query? I could not see any table physically but I can query that particular table...

Fatal error: Call to a member function bind_param() on boolean

I'm busy on a function that gets settings from a DB, and suddenly, I ran into this error: Fatal error: Call to a member function bind_param() on boolean in C:\xampp2\htdocs\application\classes\class...

jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class

I am running a Maven project which is also a dynamic web project. I have used all Spring libraries in Maven. I created web.xml, but when I start my Tomcat 7 server I am getting the following message: ..

How to properly create an SVN tag from trunk?

I am creating my first project in Subversion. So far I have branches tags trunk I think I immediately need to make branches singular and start over. Update branches is the norm. I have been do..

Keyboard shortcut to "untab" (move a block of code to the left) in eclipse / aptana?

Well, hopefully the question is self-explanatory. It's so easy to select a block of code and tab out, but how about the reverse? Currently, I just search & replace for whitespace at the beginnin..

Generate an integer that is not among four billion given ones

I have been given this interview question: Given an input file with four billion integers, provide an algorithm to generate an integer which is not contained in the file. Assume you have 1 GB..

How to check if a given directory exists in Ruby

I am trying to write a script which automatically checks out or updates a Subversion URL based on whether a specified directory exists or not. For some reason, my code isn't working and always return..

How to change the Jupyter start-up folder

I tried following the instructions given on the Jupyter Notebook documentation. Unfortunately, I haven't been able to figure it out. Where exactly is this "start in" field? I've a windows 7 (64 bit)..

When does a cookie with expiration time 'At end of session' expire?

There is a session cookie with expiration time which says 'At end of session'. When exactly does it expire or will it be alive forever? ..

How to add white spaces in HTML paragraph

I want to do something like that < p > This is question 1-------------------(1) This is question 2-------------------(2) < / p > but replace the dashes with spaces how can I do that...

Decompile an APK, modify it and then recompile it

I need to modify an existing APK, modify the sources and then recompile it. I can decompile it using dex2jar or apktool, it's working great From the jar file I can obtain the java sources (using jd..

How can you debug a CORS request with cURL?

How can you debug CORS requests using cURL? So far I couldn't find any way to "simulate" the preflight request ...

Function Pointers in Java

This may be something common and trivial, but I seem to be having trouble finding a concrete answer. In C# there is a concept of delegates, which relates strongly to the idea of function pointers from..

Visual Studio 2010 always thinks project is out of date, but nothing has changed

I have a very similar problem as described here. I also upgraded a mixed solution of C++/CLI and C# projects from Visual Studio 2008 to Visual Studio 2010. And now in Visual ..

Using Notepad++ to validate XML against an XSD

Can someone explain how to use Notepad++ to validate an xml file against an xsd. There are no options in the "XML Tools" plugin dropdown that provides for specifying an XSD file. The XML plugin is ..

How to Auto-start an Android Application?

I'm not sure how to autostart an android application after the android emulator completes its booting. Does anyone have any code snippets that will help me?..

Xcode swift am/pm time to 24 hour format

I am trying to convert a am/pm format time to a 24 hour format time 6:35 PM to 18:35 I tried this piece of code on playground but it doesnt seem to work if I put the time alone let dateAsString = ..

How do I look inside a Python object?

I'm starting to code in various projects using Python (including Django web development and Panda3D game development). To help me understand what's going on, I would like to basically 'look' inside ..

How can I compile my Perl script so it can be executed on systems without perl installed?

I have a .pl file and I want to execute that file in any system even though perl is not installed. How can i achieve it? Can any one let me know with some good examples to do that? ..

Why won't eclipse switch the compiler to Java 8?

I checked out a Java project from SVN in eclipse and realized that it requires Java 8 because it uses lambdas etc. I installed the eclipse addon for Java 8 and restarted eclipse and and have the proje..

Download text/csv content as files from server in Angular

I am trying to stream a csv file from a node.js server. The server portion is very simple : server.get('/orders' function(req, res) { res.setHeader('content-type', 'text/csv'); res.setHeader('con..

Explanation of 'String args[]' and static in 'public static void main(String[] args)'

How can you explain very well, to a beginner, the meaning of String args[] and the use of static in the following excerpt? class FirstApp { public static void main(String[] args) { ... ..

Flask Value error view function did not return a response

Error message: Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/flask/", line 1836, in __call__ return self.wsgi_app(environ, start_response) File "/usr/l..

How to print instances of a class using print()?

I am learning the ropes in Python. When I try to print an object of class Foobar using the print() function, I get an output like this: <__main__.Foobar instance at 0x7ff2a18c> Is there a way..

Could not resolve Spring property placeholder

I have my config: <context:property-placeholder location="" /> <bean id="idmPropertyHolder" class="fi.utu.resurssitilaus.idm.IdmPropertyHolder"> <property n..

How to use sed to extract substring

I have a file containing the following lines: <parameter name="PortMappingEnabled" access="readWrite" type="xsd:boolean"></parameter> <parameter name="PortMappingLeaseDuration" acc..

Class file has wrong version 52.0, should be 50.0

I'm trying to compile my project in IntelliJ idea. I'm using a class in an external jar file and on compilation receiving the above error. I understand that it's saying the jar file was compiled with..

Reverse order of foreach list items

I would like to reverse the order of this code's list items. Basically it's a set of years going from oldest to recent and I am trying to reverse that output. <?php $j=1; foreach ( $s..

Total memory used by Python process?

Is there a way for a Python program to determine how much memory it's currently using? I've seen discussions about memory usage for a single object, but what I need is total memory usage for the proce..

How can I set the form action through JavaScript?

I have an HTML form whose action should be set dynamically through JavaScript. How do I do it? Here is what I am trying to achieve: <script type="text/javascript"> function get_act..

casting int to char using C++ style casting

In traditional C you can do: int i = 48; char c = (char)i; //Now c holds the value of 48. //(Of course if i > 255 then c will not hold the same value as i). Which of the c++ casting methods (..

Can not deserialize instance of java.lang.String out of START_ARRAY token

I am very new to the Jackson parser. My code was running fine until today. I am not able to figure out the error. Exception in thread "main" com.fasterxml.jackson.databind.JsonMappingException: Can n..

Kafka consumer list

I need to find out a way to ask Kafka for a list of topics. I know I can do that using the script included in the bin\ directory. Once I have this list, I need all the consumers per to..

How to adjust gutter in Bootstrap 3 grid system?

The new Bootstrap 3 grid system is great. It's more powerful for responsive design at all screen sizes, and much easier for nested. But I have one issue I could not figure out. How do I add precise g..

React onClick function fires on render

I pass 2 values to a child component: List of objects to display delete function. I use a .map() function to display my list of objects(like in the example given in react tutorial page), but th..

How to open a second activity on click of button in android app

I am learning to build android applications and I need some specific help. I can't seem to get my head around which bits of template code I am required to change, and which bits are static. In the LA..

How to remove an item from an array in AngularJS scope?

Simple to-do list, but with a delete button on list page for each item: Relevant template HTML: <tr ng-repeat="person in persons"> <td>{{}} - # {{}}</td> ..

Does a valid XML file require an XML declaration?

I am parsing an XML file using Sax Parser of Xerces. Is the XML declaration <?xml version="1.0" encoding="UTF-8"?> required?..

Maven: Failed to retrieve plugin descriptor error

I configured Maven 3.0.3 and tried to download a sample project using archetypes with this command: mvn archetype:generate -DarchetypeGroupId=org.graniteds.archetypes -Darche..

How to read file with space separated values in pandas

I try to read the file into pandas. The file has values separated by space, but with different number of spaces I tried: pd.read_csv('file.csv', delimiter=' ') but it doesn't work..

Warning: mysqli_query() expects parameter 1 to be mysqli, null given in

I am trying to build a simple custom CMS, but I'm getting an error: Warning: mysqli_query() expects parameter 1 to be MySQLi, null given in Why am I getting this error? All my code is already My..

Replace one substring for another string in shell script

I have "I love Suzi and Marry" and I want to change "Suzi" to "Sara". #!/bin/bash firstString="I love Suzi and Marry" secondString="Sara" # do something... The result must be like this: firstStrin..

var functionName = function() {} vs function functionName() {}

I've recently started maintaining someone else's JavaScript code. I'm fixing bugs, adding features and also trying to tidy up the code and make it more consistent. The previous developer used two way..

Can't connect to docker from docker-compose

I installed docker-machine 0.1.0 and docker-compose 1.1.0 on Mac OS 10.8.5.Docker-machine is running normally and able to connect by docker-machine ssh. $ docker-machine ls NAME ACTIVE DRIVER ..

StringLength vs MaxLength attributes ASP.NET MVC with Entity Framework EF Code First

What is the difference in behavior of [MaxLength] and [StringLength] attributes? As far as I can tell (with the exception that [MaxLength] can validate the maximum length of an array) these are ident..

Sending websocket ping/pong frame from browser

I keep reading about ping/pong messages in websockets to keep the connection alive, but I'm not sure what they are. Is it a distinct frame type? (I don't see any methods on a javascript WebSocket obj..

Spring boot: Unable to start embedded Tomcat servlet container

I'm new to Spring Boot and having with error while running my application. I'm following a tutorial and I believe I'm having proper parent and dependencies with POM, please help me main class: pack..

How do I initialize a byte array in Java?

I have to store some constant values (UUIDs) in byte array form in java, and I'm wondering what the best way to initialize those static arrays would be. This is how I'm currently doing it, but I feel ..

Encrypt and decrypt a String in java

I am new to cryptography. I wish to learn how to encrypt and decrypt the text in a file... when I refer the related articles in net. I had a doubt that whether the encrypted text will be same for sing..

input type=file show only button

Is there a way to style (or script) <input type=file /> element to have visible only "Browse" button without text field? Thanks Edit: Just to clarify why to I need this. I'm using multi file u..

Characters allowed in a URL

Does anyone know the full list of characters that can be used within a GET without being encoded? At the moment I am using A-Z a-z and 0-9... but I am looking to find out the full list. I am also int..

C# Call a method in a new thread

I am looking for a way to call a method on a new thread (using C#). For instance, I would like to call SecondFoo() on a new thread. However, I would then like to have the thread terminated when Secon..

UIImageView - How to get the file name of the image assigned?

Is it possible to read the name of an UIImageView's UIImage that's presently stored in the UIImageView? I was hoping you could do something kind of like this, but haven't figured it out. NSString *c..

Postgres user does not exist?

I have just installed Postgres and have been tinkering with it and various configurations for 1-2 hours. I am stuck on being unable to change to the postgres-user $ su - postgres yields the followin..

How to call a button click event from another method

How can I call SubGraphButton_Click(object sender, RoutedEventArgs args) from another method? private void SubGraphButton_Click(object sender, RoutedEventArgs args) { } private void ChildNode_Click..

What are sessions? How do they work?

I am just beginning to start learning web application development, using python. I am coming across the terms 'cookies' and 'sessions'. I understand cookies in that they store some info in a key value..

Override devise registrations controller

I have added a field to the sign-up form that is based on a different model, see How do I use nested attributes with the devise model for the gory details. This part is working fine. The problem now ..

What does href expression <a href="javascript:;"></a> do?

I have seen the following href used in webpages from time to time. However, I don't understand what this is trying to do or the technique. Can someone elaborate please? <a href="javascript:;">..

List of tuples to dictionary

Here's how I'm currently converting a list of tuples to dictionary in Python: l = [('a',1),('b',2)] h = {} [h.update({k:v}) for k,v in l] > [None, None] h > {'a': 1, 'b': 2} Is there a better..

How to avoid a System.Runtime.InteropServices.COMException?

In my Microsoft Surface project, I always get a lot of the following exceptions: 'MuReSe.vshost.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_32\mscorlib\\msco..

Reading inputStream using BufferedReader.readLine() is too slow

I am using following code. BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream())); String line = null; StringBuilder responseData = new StringBuilder(); while((line = i..

Good tutorial for using HTML5 History API (Pushstate?)

I am looking into using the HTML5 History API to resolve deep linking problems with AJAX loaded content, but I am struggling to get off the ground. Does any one know of any good resources? I want to ..

"TypeError: (Integer) is not JSON serializable" when serializing JSON in Python?

I am trying to send a simple dictionary to a json file from python, but I keep getting the "TypeError: 1425 is not JSON serializable" message. import json alerts = {'upper':[1425],'lower':[576],'leve..

lists and arrays in VBA

I am extremely new at writing in VB.NET, and I did not even realise that there was a significant difference between VB.NET and VBA. I have been writing my application in Visual Studio, but I realised ..

Android and setting alpha for (image) view alpha

Is there really no XML attribute counterpart to setAlpha(int)? If not, what alternatives are there?..

How does the Python's range function work?

If I write for i in range(5): print i Then it gives 0, 1, 2, 3, 4 Does that mean Python assigned 0, 1, 2, 3, 4 to i at the same time? However if I wrote: for i in range(5): a=i+1 The..

Can ordered list produce result that looks like 1.1, 1.2, 1.3 (instead of just 1, 2, 3, ...) with css?

Can an ordered list produce results that looks like 1.1, 1.2, 1.3 (instead of just 1, 2, 3, ...) with CSS? So far, using list-style-type:decimal has produced only 1, 2, 3, not 1.1, 1.2., 1.3...

How to use the divide function in the query?

I want to show the percentage for the Overshipment column. My sample query select (SPGI09_EARLY_OVER_T – (SPGI09_OVER_WK_EARLY_ADJUST_T) / (SPGI09_EARLY_OVER_T + SPGR99_LATE_CM_T + SPGR99_ON_TIME..

Configure cron job to run every 15 minutes on Jenkins

How can I run a cron job every 15 mins on Jenkins? This is what I've tried : On Jenkins I have a job set to run every 15 mins using this cron syntax : 14 * * * * But the job executes every hour..

Verify object attribute value with mockito

I have a method call which I want to mock with mockito. To start with I have created and injected an instance of an object on which the method will be called. My aim is to verify one of the object in ..

Retaining file permissions with Git

I want to version control my web server as described in Version control for my web server, by creating a git repo out of my /var/www directory. My hope was that I would then be able to push web cont..

How to fetch FetchType.LAZY associations with JPA and Hibernate in a Spring Controller

I have a Person class: @Entity public class Person { @Id @GeneratedValue private Long id; @ManyToMany(fetch = FetchType.LAZY) private List<Role> roles; // etc } With..

ValueError: Length of values does not match length of index | Pandas DataFrame.unique()

I am trying to get a new dataset, or change the value of the current dataset columns to their unique values. Here is an example of what I am trying to get : A B ----- 0| 1 1 1| 2 5 2| 1 5 3| 7 ..

What is the naming convention in Python for variable and function names?

Coming from a C# background the naming convention for variables and method names are usually either camelCase or PascalCase: // C# example string thisIsMyVariable = "a" public void ThisIsMyMethod() ..

Download pdf file using jquery ajax

I want to download a pdf file for jquery ajax response. Ajax response contains pdf file data. I tried this solution. My code is given below but I always get a blank pdf. $(document).on('click', '.dow..

How do I unset an element in an array in javascript?

How do I remove the key 'bar' from an array foo so that 'bar' won't show up in for(key in foo){alert(key);} ..

How to validate domain name in PHP?

Is it possible without using regular expression? For example, I want to check that a string is a valid domain: domain-name abcd example Are valid domains. These are invalid of course: domaia@name..

Get css top value as number not as string?

In jQuery you can get the top position relative to the parent as a number, but you can not get the css top value as a number if it was set in px. Say I have the following: #elem{ position:relative..

SOAP-ERROR: Parsing WSDL: Couldn't load from <URL>

In PHP: I am getting an error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://xxx.xxxx.asmx?WSDL' : failed to load external entity "http://xxx.xxxx.asmx?WSDL" My code is: <?php ..

Installation failed with message Invalid File

Installation failed with message Invalid File: K:\project\app\build\intermediates\split-apk\with_ImageProcessor\debug\slices\slice_0.apk. It is possible that this issue is resolved by uninstall..

Spring - download response as a file

I am writing application using AngularJS and Spring. I would like to send request to the server and download response returned from controller as a file. In controller I have content of csv file (as s..

How should I import data from CSV into a Postgres table using pgAdmin 3?

Is there any plugin or library which I need to use for this? I want to try this on my local system first and then do the same on Heroku Postgresql..

How to call another controller Action From a controller in Mvc

I need to call a controller B action FileUploadMsgView from Controller A and need to pass a parameter for it. Code---its not going to the controller B's FileUploadMsgView(). In ControllerA pr..

Can't Autowire @Repository annotated interface in Spring Boot

I'm developing a spring boot application and I'm running into an issue here. I'm trying to inject a @Repository annotated interface and it doesn't seem to work at all. I'm getting this error org.spri..

MacOS Xcode CoreSimulator folder very big. Is it ok to delete content?

My ~/Library/Developer/CoreSimulator/Devices folder is 26 Gb in size. Is it safe to just delete all the content? Will those files be automatically regenerated?..

When do I use path params vs. query params in a RESTful API?

I want to make my RESTful API very predictable. What is the best practice for deciding when to make a segmentation of data using the URI rather than by using query params. It makes sense to me that s..

What does "async: false" do in jQuery.ajax()?

Specifically, how does it differ from the default ( async: true ) ? In what circumstances would I want to explicit set async to false, and does it have something to do with preventing other events o..

How to remove specific elements in a numpy array

How can I remove some specific elements from a numpy array? Say I have import numpy as np a = np.array([1,2,3,4,5,6,7,8,9]) I then want to remove 3,4,7 from a. All I know is the index of the value..

XAMPP on Windows - Apache not starting

I have installed XAMPP on my windows 7 machine but can't get Apache to work. On start I get the following errors: 13:09:21 [apache] Apache Service Detected With Wrong Path 13:09:21 [apache] Unin..

Xcode stuck on Indexing

A project I've been working for 2 months stopped working for no reason because Xcode got stucked on "Indexing". I can't Build the project anymore. If I try to build, Xcode freezes and I have to force ..

How to use router.navigateByUrl and router.navigate in Angular gives a good overview of how to create links that will take the user to a different route in Angular4, however I can't find how to do the same thing programmat..

Wait for a process to finish

Is there any builtin feature in Bash to wait for a process to finish? The wait command only allows one to wait for child processes to finish. I would like to know if there is any way to wait for any ..

How to remove duplicate values from a multi-dimensional array in PHP

How can I remove duplicate values from a multi-dimensional array in PHP? Example array: Array ( [0] => Array ( [0] => abc [1] => def ) [1] => Array (..

How can I run NUnit tests in Visual Studio 2017?

I've just installed Visual Studio 2017. I have a project using NUnit for the test cases. Ctrl + R - T no longer runs the tests, and the Test Explorer no longer finds any test cases marked with the Tes..

Convert web page to image

What are some utilities to obtain an image of a webpage? Basically equivalent to taking a "screenshot" of the page after opening it...

Create an array with same element repeated multiple times

In Python, where [2] is a list, the following code gives this output: [2] * 5 # Outputs: [2,2,2,2,2] Does there exist an easy way to do this with an array in JavaScript? I wrote the following func..

Search and get a line in Python

Is there a way to search, from a string, a line containing another string and retrieve the entire line? For example: string = qwertyuiop asdfghjkl zxcvbnm token qwerty asdfghj..

Call a url from javascript

Is there a way to call a url and get a response using javascript? I need the equivalent of ASP.NET: WebRequest req = HttpWebRequest.Create(""); WebResponse webResponse = req.GetResp..

How can I express that two values are not equal to eachother?

Is there a method similar to equals() that expresses "not equal to"? An example of what I am trying to accomplish is below: if (secondaryPassword.equals(initialPassword)) { JOptionPane.showMess..

Git update submodules recursively

My project struture ProjectA -FrameworkA (submodule) --Twig (submodule of FrameworkA) How I can update submodules recursively? I already tried some git commands (on ProjectA root) git submodule fo..

Specifying width and height as percentages without skewing photo proportions in HTML

I was wondering if in the width and height <img> attributes, I could specify width and height as percentages? Well, I guess that is obvious, because when I try so, it resizes, but it appears to..

Program to find largest and second largest number in array

I have searched many websites for this question. They are doing it by some different approach. This code is just not giving output if I input first element of array as largest i.e. a[0]. I think some ..

PhpMyAdmin "Wrong permissions on configuration file, should not be world writable!"

I get this error when I try to access localhost/phpmyadmin: Wrong permissions on configuration file, should not be world writable! I have already chmoded every file to 555 from 777. What should I do..

How do I fix MSB3073 error in my post-build event?

I'm working on a project that requires that DLLs generated by building my solution to be copied from the bin folder to another folder, both of which are on my machine, in my C drive. I've written a ba..

How to rotate the background image in the container?

I want to rotate the image which is placed in the button of scrollbar in Chrome. Now I have a CSS with this content: ::-webkit-scrollbar-button:vertical:decrement { background-image:url(images/ar..

Checking something isEmpty in Javascript?

How can I check if a variable is empty in Javascript? Sorry for the stupid question, but I'm a newbie in Javascript! if( is empty { do something else { do something else } re..

Accessing Google Spreadsheets with C# using Google Data API

I'm having some information in Google Spreadsheets as a single sheet. Is there any way by which I can read this information from .NET by providing the google credentials and spreadsheet address. Is it..

Numpy converting array from float to strings

I have an array of floats that I have normalised to one (i.e. the largest number in the array is 1), and I wanted to use it as colour indices for a graph. In using matplotlib to use grayscale, this re..

Change package name for Android in React Native

I used react-native init MyApp to initialise a new React Native app. This created among others an Android project with the package com.myapp. What's the best way to change this package name, for exam..

iPhone Navigation Bar Title text color

It seems the iOS Navigation Bar title color is white by default. Is there a way to change it to a different color? I am aware of the navigationItem.titleView approach using an image. Since my design ..

How can I open a .db file generated by eclipse(android) form DDMS-->File explorer-->data--->data-->packagename-->database?

The .db file is generated from eclipse(android) form DDMS-->File explorer-->data--->data-->package name-->database. Then I select the database and click "push a file from device&q..

Image resolution for mdpi, hdpi, xhdpi and xxhdpi

I have a background for my app in resolutions 720x1280 pixels, 1080x1920 pixels and 1440x2560 pixels. In which folders (mdpi, hdpi, xhdpi and xxhdpi) should I put each background? ..

'mvn' is not recognized as an internal or external command,

I get the following error when I type the command mvn --version: 'mvn' is not recognized as an internal or external command, operable program or batch file. I have also followed this but still..

Newline in markdown table?

I have the following cells in a markdown table: |Something|Something else that's rather long|Something else| I'd like to be able to insert a break in the middle line, so the column isn't so large...

Iterating over Numpy matrix rows to apply a function each?

I want to be able to iterate over the matrix to apply a function to each row. How can I do it for a Numpy matrix ? ..

System has not been booted with systemd as init system (PID 1). Can't operate

I'm trying to follow the Redis installation process as discuss in this article of digital ocean, in WSL. The Ubuntu version installed is Ubuntu 18.04. Everything in redis installation is fine but whe..

How do I find the length/number of items present for an array?

Possible Duplicate: length of array in function argument My array size is 5. For example: arrCustId[5] How can I know how many Customer IDs are already present in my array? In short how ..

How to filter a RecyclerView with a SearchView

I am trying to implement the SearchView from the support library. I want the user to be to use the SearchView to filter a List of movies in a RecyclerView. I have followed a few tutorials so far and ..

What steps are needed to stream RTSP from FFmpeg?

What steps are needed to stream RTSP from FFmpeg? Streaming UDP is not a problem, but as I want to stream to mobile devices which can natively read RTSP streams, I couldn't find any setup which tells..

Check if a class `active` exist on element with jquery

Check if a class active exist on an li with a class menu For example <li class="menu active">something...</li> ..

ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

I have installed Oracle 11g Express Edition Release 2 in my windows 7 64 bit OS and tried to execute JDBC program, then I got the following error: java.sql.SQLException: Listener refused the connecti..

FPDF utf-8 encoding (HOW-TO)

Does anybody know how to set the encoding in FPDF package to utf-8? Or at least to ISO-8859-7 (Greek) that support greek characters? Basically I want to create a pdf file containing greek characters...

Is it possible to use 'else' in a list comprehension?

Here is the code I was trying to turn into a list comprehension: table = '' for index in xrange(256): if index in ords_to_keep: table += chr(index) else: table += replace_with..

How to prevent errno 32 broken pipe?

Currently I am using an app built in python. When I run it in personal computer, it works without problems. However, when I move it into a production server. It keeps showing me the error attached a..

How to merge two sorted arrays into a sorted array?

This was asked of me in an interview and this is the solution I provided: public static int[] merge(int[] a, int[] b) { int[] answer = new int[a.length + b.length]; int i = 0, j = 0, k = 0; ..

"elseif" syntax in JavaScript

How can I achieve an elseif in a JavaScript condition?..

Find what 2 numbers add to something and multiply to something

Hey so I'm making a factoring program and I'm wondering if anyone can give me any ideas on an efficient way to find what two numbers multiple to a specified number, and also add to a specified number...

How to get info on sent PHP curl request

I'm trying to debug a curl request to a webservice 'getToken' endpoint. I'm not 100% confident that the URL and the auth info is getting written in to the curl handle correctly. I'm trying to use ..

Serving favicon.ico in ASP.NET MVC

What is the final/best recommendation for how to serve favicon.ico in ASP.NET MVC? I am currently doing the following: Adding an entry to the very beginning of my RegisterRoutes method: routes.Ign..

Function overloading in Python: Missing

As function overloading says: Function overloading is absent in Python. As far as I feel this a big handicap since its also an object-oriented (OO) language. Initially I found that unable to different..

Iterate through the fields of a struct in Go

Basically, the only way (that I know of) to iterate through the values of the fields of a struct is like this: type Example struct { a_number uint32 a_string string } //... r := &Exampl..

Plot multiple lines in one graph

Trying to use ggplot to plot multiple lines into one graph, but not sure how to do so with my dataset. Not sure whether I need to change the datastructure or not (transpose?) Data looks like this: C..

What is the { get; set; } syntax in C#?

I am learning ASP.NET MVC and I can read English documents, but I don't really understand what is happening in this code: public class Genre { public string Name { get; set; } } What does this ..

Getting values from query string in an url using AngularJS $location

Regarding $, the docs say, Return search part (as object) of current url when called without any parameter. In my url, my query string has a param '?test_user_bLzgB' without a val..

Close Current Tab

I have a close link on my web page. I would like to function it to close the current tab when click it. I have written <a href="#" onclick = "javascript:self.close();">close</a> The abo..

How do you execute SQL from within a bash script?

I have some SQL scripts that I'm trying to automate. In the past I have used SQL*Plus, and called the sqlplus binary manually, from a bash script. However, I'm trying to figure out if there's a way t..

Push origin master error on new repository

I just started using git with github. I followed their instructions and ran into errors on the last step. I'm checking in an existing directory that isn't currently source-controlled (project about a ..

Limiting number of displayed results when using ngRepeat

I find the AngularJS tutorials hard to understand; this one is walking me through building an app that displays phones. I’m on step 5 and I thought as an experiment I’d try to allow users to speci..