Questions Tagged with #Infovis

The JavaScript InfoVis Toolkit provides tools for creating Interactive Data Visualizations for the Web.

file path Windows format to java format

I need to convert the file path in windows say C:\Documents and Settings\Manoj\Desktop for java as C:/Documents and Settings/Manoj/Desktop . Is there any utility to convert like this.? ..

Fatal error: Call to undefined function mysql_connect() in C:\Apache\htdocs\test.php on line 2

Fatal error: Call to undefined function mysql_connect() in C:\Apache\htdocs\test.php on line 2 I've spent 11 hours today trying to get past this ONE problem. I have installed: MySQL 5.1 Apache 2.2.1..

Is there functionality to generate a random character in Java?

Does Java have any functionality to generate random characters or strings? Or must one simply pick a random integer and convert that integer's ascii code to a character?..

How do I implement Toastr JS?

I am new to JS and not sure how to make this work on my page. Below is what I have. How must I make this alert show? I added the source correctly but not sure how to render the alert. <!docty..

How do I center an anchor element in CSS?

I just want to have my anchor in the middle of the screen horizontally, how might I do this? <a href="">example</a> ..

window.onload vs document.onload

Which is more widely supported: window.onload or document.onload?..

How to split a string after specific character in SQL Server and update this value to specific column

I have table with data 1/1 to 1/20 in one column. I want the value 1 to 20 i.e value after '/'(front slash) is updated into other column in same table in SQL Server. Example: Column has value 1/1,1/..

How to compare two lists in python?

How to compare two lists in python? date = "Thu Sep 16 13:14:15 CDT 2010" sdate = "Thu Sep 16 14:14:15 CDT 2010" dateArr = [] dateArr = date.split() sdateArr = [] sdateArr = sdate.split() Now I..

Alter user defined type in SQL Server

I created few user defined types in my database as below CREATE TYPE [dbo].[StringID] FROM [nvarchar](20) NOT NULL and assigned them to various tables. The tables in my database are in various schema..

Transpose a matrix in Python

I'm trying to create a matrix transpose function in Python. A matrix is a two dimensional array, represented as a list of lists of integers. For example, the following is a 2X3 matrix (meaning the hei..

how to prevent this error : Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in ... on line 11

Possible Duplicate: PHP Error: mysql_fetch_array() expects parameter 1 to be resource, boolean given I'm very confused with this error, it shows when I try to return a result from the DB th..

How to find Current open Cursors in Oracle

What is the query to find the no. of current open cursors in an Oracle Instance? Also, what is the accuracy/update frequency of this data? I am using Oracle 10gR2..

How to refresh app upon shaking the device?

I need to add a shake feature that will refresh my Android application. All I find of documentation involves implementing the SensorListener, but Eclipse tells me it's deprecated and suggest SensorEv..

Android Studio suddenly cannot resolve symbols

Android Studio 0.4.2 was working fine and today I opened it and almost everything was red and the auto-completion had stopped working. I look at the imports and AS seems to be telling me it can't find..

How to cast DATETIME as a DATE in mysql?

My query is this. I have a bunch of entries and i want to group them by date. But instead of having date in my database, I have a datetime field. What do I do? select * from follow_queue group by fol..

How to convert Java String into byte[]?

Is there any way to convert Java String to a byte[] (not the boxed Byte[])? In trying this: System.out.println(response.split("\r\n\r\n")[1]); System.out.println("******"); System.out.println(respon..

How do I escape reserved words used as column names? MySQL/Create Table

I am generating tables from classes in .NET and one problem is a class may have a field name key which is a reserved MySQL keyword. How do I escape it in a create table statement? (Note: The other pro..

How can I change cols of textarea in twitter-bootstrap?

If I change the value of :rows, it works. But it stays at the default cols whatever value I set with ':cols =>'. Column width won't change. I viewed the html source and it reflected the change. I won..

c# .net change label text

Hello for I trying to use this code but for some reason it doesn't work. Really need help with this. The problem is that the label doesn't change name from "label" when I enter the site. <asp:Labe..

Find an element in DOM based on an attribute value

Can you please tell me if there is any DOM API which search for an element with given attribute name and attribute value: Something like: doc.findElementByAttribute("myAttribute", "aValue"); ..

VS Code - Search for text in all files in a directory

Is there a way to search for text in all files in a directory using VS Code? I.e., if I type "find this" in my search, it will search through all the files in the current directory and return the fil..

How do I get the result of a command in a variable in windows?

I'm looking to get the result of a command as a variable in a Windows batch script (see how to get the result of a command in bash for the bash scripting equivalent). A solution that will work in a ...

How to connect to a MySQL Data Source in Visual Studio

I use the MySQL Connector/Net to connect to my database by referencing the assembly (MySql.Data.dll) and passing in a connection string to MySqlConnection. I like that because I don't have to instal..

How to get only the last part of a path in Python?

In Python, suppose I have a path like this: /folderA/folderB/folderC/folderD/ How can I get just the folderD part?..

ASP.NET Core form POST results in a HTTP 415 Unsupported Media Type response

Sending a form POST HTTP request (Content-Type: application/x-www-form-urlencoded) to the below controller results into a HTTP 415 Unsupported Media Type response. public class MyController : Control..

Clearing <input type='file' /> using jQuery

Is it possible to clear an <input type='file' /> control value with jQuery? I've tried the following: $('#control').attr({ value: '' }); But it's not working...

CSS selector for "foo that contains bar"?

Is there a way to make a CSS Selector that matches the following? All OBJECT elements which have a PARAM element inside of them The selector OBJECT PARAM doesn't work, as it matches the PARAM,..

How can I reset eclipse to default settings?

One of the top reasons I use an IDE editor is to get context information about the classes I am working on. Right now I have lost the java method context information, and have no idea where to reset ..

How to resize an Image C#

As Size, Width and Height are Get() properties of System.Drawing.Image; How can I resize an Image object at run-time in C#? Right now, I am just creating a new Image using: // objImage is the origin..

How to test if parameters exist in rails

I'm using an IF statement in Ruby on Rails to try and test if request parameters are set. Regardless of whether or not both parameters are set, the first part of the following if block gets triggered..

no matching function for call to ' '

I was given to implement the function: "static double distanta (const Complex&, const Complex&);" which return the distance between two Complex numbers. The definition of the function it i..

Difference between "managed" and "unmanaged"

I hear/read about it sometimes when talking about .NET, for example "managed code" and "unmanaged code" but I have no idea what they are and what are their differences. What are their difference, by d..

Creating folders inside a GitHub repository without using Git

I want to add a new folder to my newly created GitHub repository without installing the Git setup for (Mac, Linux, and Windows). Is it possible to do so? I can't have Git all the time with me when I ..

Function to calculate distance between two coordinates

I'm currently using the function below and it doesn't work properly. According to Google Maps, the distance between these coordinates (from 59.3293371,13.4877472 to 59.3225525,13.4619422) are 2.2 kilo..

Solr vs. ElasticSearch

What are the core architectural differences between these technologies? Also, what use cases are generally more appropriate for each?..

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 ..

Centering a canvas

How do I markup a page with an HTML5 canvas such that the canvas Takes up 80% of the width Has a corresponding pixel height and width which effectively define the ratio (and are proportionally maint..

Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from assembly 'mscorlib

When starting up my web site for the first time, I'm getting this error Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from assembly 'mscorlib, Version=, Culture=neut..

How to check the version of GitLab?

How to check which version of GitLab is installed on the server? I am about version specified in GitLab changelog: For example: ..

How does one output bold text in Bash?

I'm writing a Bash script that prints some text to the screen: echo "Some Text" Can I format the text? I would like to make it bold...

What does `unsigned` in MySQL mean and when to use it?

What does "unsigned" mean in MySQL and when should I use it?..

Importing Pandas gives error AttributeError: module 'pandas' has no attribute 'core' in iPython Notebook

I am running a iPython notebook via the Anaconda Navigator app (version 1.1.0). When I want to import pandas it gives me a strange error. I thought the Anaconda app included the pandas package? -----..

In JPA 2, using a CriteriaQuery, how to count results

I am rather new to JPA 2 and it's CriteriaBuilder / CriteriaQuery API: CriteriaQuery javadoc CriteriaQuery in the Java EE 6 tutorial I would like to count the results of a CriteriaQuery without act..

Oracle SQL Developer: Failure - Test failed: The Network Adapter could not establish the connection?

Problem Please note that I changed details for security purposes. However, the problem remains intact. I installed an Oracle 11g database on a server at location, say, Now I h..

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 ..

.NET code to send ZPL to Zebra printers

Is there a way to send ZPL (Zebra Programming Language) to a printer in .NET? I have the code to do this in Delphi, but it is not pretty and I would rather not try to recreate it in .NET as it is...

java: Class.isInstance vs Class.isAssignableFrom

Let clazz be some Class and obj be some Object. Is clazz.isAssignableFrom(obj.getClass()) always the same as clazz.isInstance(obj) ? If not, what are the differences?..

Python 3 turn range to a list

I'm trying to make a list with numbers 1-1000 in it. Obviously this would be annoying to write/read, so I'm attempting to make a list with a range in it. In Python 2 it seems that: some_list = range(..

Vertically center text in a 100% height div?

I am working with a div that is 100% of the parent divs height. The div only contains a single line of text. The div cannot have a fixed height. So my question is. How do I vertically center the l..

Where to get "UTF-8" string literal in Java?

I'm trying to use a constant instead of a string literal in this piece of code: new InputStreamReader(new FileInputStream(file), "UTF-8") "UTF-8" appears in the code rather often, and would be much..

adding onclick event to dynamically added button?

I am adding a button dynamically in html like below: On click of that button I want to call a Javascript function: var but = document.createElement("button"); but.value="delete row"; but.setAttribu..

Given URL is not allowed by the Application configuration

I am trying to create facebook sign-in page according to this tutorial. I only changed the two lines appId : '370675846382420', // App ID channelUrl : '//', // Cha..

Capitalize or change case of an NSString in Objective-C

I was wondering how to capitalize a string found in an object in an NSMutableArray. An NSArray contains the string 'April' at index 2. I want this to be changed to 'APRIL'. Is there something simple..

og:type and valid values : constantly being parsed as og:type=website

Could someone sugggest why the FB debug/lint tool is saying og:type is "website" despite the og:type being set to og:bar?

Use jQuery to hide a DIV when the user clicks outside of it

I am using this code: $('body').click(function() { $('.form_wrapper').hide(); }); $('.form_wrapper').click(function(event){ event.stopPropagation(); }); And this HTML: <div class="form_w..

how to format date in Component of angular 5

I am new to angular and looking to format date in component ngOnInit method. I have seen some example where pipe operator are used to format the data but i dont know how to format date in component fi..

How to set dialog to show in full screen?

I have a GridView and i want to make an implémentation of a dialog, on which the picture that i have selected should display in full screen. so how can i make the dialog shows in a full screen mode ..

How to echo in PHP, HTML tags

I went through this before posting: How can I echo HTML in PHP? And I still couldn't make it work. I'm trying to echo this: <div> <h3><a href="#">First</a></h3..

ORA-12154: TNS:could not resolve the connect identifier specified (PLSQL Developer)

I need to use PLSQL Developer to access oracle databases. I get the following error when I try to connect to my database. ORA-12154: TNS:could not resolve the connect identifier specified. I am able t..

jQuery How to Get Element's Margin and Padding?

Just wondering - how using jQuery - I can get an elements formatted total padding and margin etc ? i.e. 30px 30px 30px 30px or 30px 5px 15px 30px etc I tried var margT = jQuery('img').css('margin')..

Order a MySQL table by two columns

How do I sort a MySQL table by two columns? What I want are articles sorted by highest ratings first, then most recent date. As an example, this would be a sample output (left # is the rating, the..

Mod in Java produces negative numbers

When I calculate int i = -1 % 2 I get -1 in Java. In Python, I get 1 as the result of -1 % 2. What do I have to do to get the same behavior in Java with the modulo function?..

Java: Getting a substring from a string starting after a particular character

I have a string: /abc/def/ghfj.doc I would like to extract ghfj.doc from this, i.e. the substring after the last /, or first / from right. Could someone please provide some help?..

Set timeout for ajax (jQuery)

$.ajax({ url: "test.html", error: function(){ //do something }, success: function(){ //do something } }); Sometimes success function works good, sometimes not. ..

Nested jQuery.each() - continue/break

Consider the following code: var sentences = [ 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', 'Vivamus aliquet nisl quis velit ornare tempor.', 'Cras sit amet..

What is the difference between a field and a property?

In C#, what makes a field different from a property, and when should a field be used instead of a property?..

How do I display todays date on SSRS report?

I want to show up Todays date as report generated date on SSRS report. How can i do that ? should I use any variable ? please help me I'm newbie to SSRS. For example refer this image: ..

Where to find Java JDK Source Code?

I would like to see what a method in the Java API does. So I want the JDK Source Code. Before I re-installed Linux I had the package with all the official source code in it. I just had to tell..

Is it possible to modify a string of char in C?

I have been struggling for a few hours with all sorts of C tutorials and books related to pointers but what I really want to know is if it's possible to change a char pointer once it's been created. ..

How can I tell AngularJS to "refresh"

I have a click event that happens outside the scope of my custom directive, so instead of using the "ng-click" attribute, I am using a listener and calling a function inside my scope li..

Maximum number of rows in an MS Access database engine table?

We know the MS Access database engine is 'throttled' to allow a maximum file size of 2GB (or perhaps internally wired to be limited to fewer than some power of 2 of 4KB data pages). But what does this..

Using onBlur with JSX and React

I am trying to create a password confirmation feature that renders an error only after a user leaves the confirmation field. I'm working with Facebook's React JS. This is my input component: <inpu..

UIScrollView not scrolling

I have a UIScrollView which contains many UIImageViews, UILabels, etc... the labels are much longer that the UIScrollView, but when I run the app, I cannot click and scroll down... Why might this be?..

How to set the current working directory?

How to set the current working directory in Python?..

Python: how can I check whether an object is of type

I have tried a few obvious options but none of them works: In [150]: x Out[150]:, 9, 1) In [151]: type(x) Out[151]: In [152]: isinstance(x, ---------..

How can I check if string contains characters & whitespace, not just whitespace?

What is the best way to check if a string contains only whitespace? The string is allowed to contain characters combined with whitespace, but not just whitespace...

Using querySelectorAll to retrieve direct children

I am able to do this: <div id="myDiv"> <div class="foo"></div> </div> myDiv = getElementById("myDiv"); myDiv.querySelectorAll("#myDiv > .foo"); That is, I can succes..

How can I clear the SQL Server query cache?

I've got a simple query running against SQL Server 2005 SELECT * FROM Table WHERE Col = 'someval' The first time I execute the query can take > 15 secs. Subsequent executes are back in < 1 ..

Android - Dynamically Add Views into View

I have a layout for a view - <LinearLayout xmlns:android="" android:layout_width="fill_parent" android:layout_height="fill_parent" androi..

How can I make a TextBox be a "password box" and display stars when using MVVM?

How can I do this in XAML: PSEUDO-CODE: <TextBox Text="{Binding Password}" Type="Password"/> so that the user sees stars or dots when he is typing in the password. I've tried various exampl..

com.jcraft.jsch.JSchException: UnknownHostKey

I'm trying to use Jsch to establish an SSH connection in Java. My code produces the following exception: com.jcraft.jsch.JSchException: UnknownHostKey: RSA key fingerprint is 22:fb:ee..

MySQL Incorrect datetime value: '0000-00-00 00:00:00'

I've recently taken over an old project that was created 10 years ago. It uses MySQL 5.1. Among other things, I need to change the default character set from latin1 to utf8. As an example, I have ta..

How do I prevent a form from being resized by the user?

I have a form that needs to be maximized in I don't want the user to be able to change its size or move it around. How can I do this?..

C++ display stack trace on exception

I want to have a way to report the stack trace to the user if an exception is thrown. What is the best way to do this? Does it take huge amounts of extra code? To answer questions: I'd like it to be..

mysql query: SELECT DISTINCT column1, GROUP BY column2

Right now I have the following query: SELECT name, COUNT(name), time, price, ip, SUM(price) FROM tablename WHERE time >= $yesterday AND time <$today GROUP BY name And what I'd like t..

How to check if mysql database exists

Is it possible to check if a (MySQL) database exists after having made a connection. I know how to check if a table exists in a DB, but I need to check if the DB exists. If not I have to call another..

What is the easiest way to initialize a std::vector with hardcoded elements?

I can create an array and initialize it like this: int a[] = {10, 20, 30}; How do I create a std::vector and initialize it similarly elegant? The best way I know is: std::vector<int> ints; ..

How to find substring inside a string (or how to grep a variable)?

I'm using BASH, and I don't know how to find a substring. It keeps failing, I've got a string (should this be an array?) Below, LIST is a string list of database names, SOURCE is the reply, one of th..

Using IF ELSE in Oracle

As a web developer, I know how to use the IF ELSE in multiple languages. However, I am learning how to write reports using TOAD for Oracle. My question is, how do I properly add an IF ELSE statement?..

Checking if element exists with Python Selenium

I have a problem - I am using the selenium (firefox) web driver to open a webpage, click a few links etc. then capture a screenshot. My script runs fine from the CLI, but when run via a cronjob it is..

JavaScript: undefined !== undefined?

NOTE: As per ECMAScript5.1, section, window.undefined is read-only. Modern browsers implement this correctly. for example: Safari 5.1, Firefox 7, Chrome 20, etc. Undefined is still changeab..

Make a div into a link

I have a <div> block with some fancy visual content that I don't want to change. I want to make it a clickable link. I'm looking for something like <a href="…"><div> … </div&..

Private Variables and Methods in Python

Possible Duplicate: The meaning of a single- and a double-underscore before an object name in Python Which should I use _foo (an underscore) or __bar (double underscore) for private members..

Elastic Search: how to see the indexed data

I had a problem with ElasticSearch and Rails, where some data was not indexed properly because of attr_protected. Where does Elastic Search store the indexed data? It would be useful to check if the ..

How should I load files into my Java application?

How should I load files into my Java application?..

How to get the number of characters in a string

How can I get the number of characters of a string in Go? For example, if I have a string "hello" the method should return 5. I saw that len(str) returns the number of bytes and not the number of cha..

FIFO based Queue implementations?

I need a simple FIFO implemented queue for storing a bunch of ints (I don't mind much if it is generics implementation). Anything already baked for me in java.util or Trove/Guava library?..

button image as form input submit button?

<form method="post" action="confirm_login_credentials.php"> <table> <tr> <td>User ID:</td> <td><input type="text" id="uid">..

Java 8 Filter Array Using Lambda

I have a double[] and I want to filter out (create a new array without) negative values in one line without adding for loops. Is this possible using Java 8 lambda expressions? In python it would be t..

Is it a good idea to index datetime field in mysql?

I am working on designing a large database. In my application I will have many rows for example I currently have one table with 4 million records. Most of my queries use datetime clause to select data..

How to parse JSON in Kotlin?

I'm receiving a quite deep JSON object string from a service which I must parse to a JSON object and then map it to classes. How can I transform a JSON string to object in Kotlin? After that the map..

Windows service start failure: Cannot start service from the command line or debugger

hi i'm getting this error Cannot start service from the command line or debugger. A winwows Service must first be installed(using installutil.exe) and then started with the ServerExplorer, Window..

JSON parsing using Gson for Java

I would like to parse data from JSON which is of type String. I am using Google Gson. I have: jsonLine = " { "data": { "translations": [ { "translatedText": "Hello world" } ] } } "; ..

What is the regular expression to allow uppercase/lowercase (alphabetical characters), periods, spaces and dashes only?

I am having problems creating a regex validator that checks to make sure the input has uppercase or lowercase alphabetical characters, spaces, periods, underscores, and dashes only. Couldn't find thi..

expected assignment or function call: no-unused-expressions ReactJS

class Game extends Component { constructor() { super() this.state = { speed: 0 } //firebaseInit() } render() { return ( <div> <h1>T..

Failed to install android-sdk: "java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema"

When installing the android sdk tools the following error is emitted: java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema Why is this happening and how can it be fixed? Debug ou..

Send response to all clients except sender

To send something to all clients, you use: io.sockets.emit('response', data); To receive from clients, you use: socket.on('cursor', function(data) { ... }); How can I combine the two so that w..

Show/Hide Multiple Divs with Jquery

I want to use some buttons to show/hide multiple divs using jquery. The page will initially show all divs. The idea then is that there will be a button to reset (show all) and then separate buttons t..

How to set value in @Html.TextBoxFor in Razor syntax?

I have created an text-box using Razor and trying to set value as follows. @Html.TextBoxFor(model => model.Destination, new { id = "txtPlace", value= "3" }) I have tried appending value with @ ..

Print a file, skipping the first X lines, in Bash

I have a very long file which I want to print, skipping the first 1,000,000 lines, for example. I looked into the cat man page, but I did not see any option to do this. I am looking for a command to d..

Read data from SqlDataReader

I have a SQL Server 2008 database and I am working on it in the backend. I am working on SqlDataReader rdr = cmd.ExecuteReader(); while (rdr.Read()) { //how do I read ..

React JS - Uncaught TypeError: is not a function

I'm working with reactjs and cannot seem to prevent this error when trying to display JSON data (either from file or server): Uncaught TypeError: is not a function I've looked a..

HTML entity for check mark

Possible Duplicate: Tick symbol in HTML/XHTML Is there an HTML entity for a check mark? I've searched for it in various html entities cheat sheets but didn't find it..

Selecting data from two different servers in SQL Server

How can I select data in the same query from two different databases that are on two different servers in SQL Server?..

Getting current date and time in JavaScript

I have a script that prints the current date and time in JavaScript, but the DATE is always wrong. Here is the code: var currentdate = new Date(); var datetime = "Last Sync: " + currentdate...

How can I format decimal property to currency?

I want to format a decimal value as a currency value. How can I do this?..


I'm practicing the code from 'Web Scraping with Python', and I keep having this certificate problem: from urllib.request import urlopen from bs4 import BeautifulSoup import re pages = set() def ge..

wait() or sleep() function in jquery?

I want to add a class, wait 2 seconds and add another class. .addClass("load").wait(2sec).addClass("done"); Is there any way?..

Is there a "do ... while" loop in Ruby?

I'm using this code to let the user enter in names while the program stores them in an array until they enter an empty string (they must press enter after each name): people = [] info = 'a' # must fi..

Java 8 lambda get and remove element from list

Given a list of elements, I want to get the element with a given property and remove it from the list. The best solution I found is: ProducerDTO p = producersProcedureActive .stream()..

Django Template Variables and Javascript

When I render a page using the Django template renderer, I can pass in a dictionary variable containing various values to manipulate them in the page using {{ myVar }}. Is there a way to access the s..

Expression must be a modifiable lvalue

I have this following code: int M = 3; int C = 5; int match = 3; for ( int k =0; k < C; k ++ ) { match --; if ( match == 0 && k = M ) { std::cout << " equals"..

Convert seconds to HH-MM-SS with JavaScript?

How can I convert seconds to an HH-MM-SS string using JavaScript?..

Generating matplotlib graphs without a running X server

Matplotlib seems to require the $DISPLAY environment variable which means a running X server.Some web hosting services do not allow a running X server session.Is there a way to generate graphs using m..

preventDefault() on an <a> tag

I have some HTML and jQuery that slides a div up and down to show or hide` it when a link is clicked: <ul class="product-info"> <li> <a href="#">YOU CLICK THIS TO SHOW/HIDE<..

Missing Microsoft RDLC Report Designer in Visual Studio

In Visual Studio 2015, I cannot find the designer for RDLC reports anymore. Does anyone know if this is only a bug and if it is provided later on or if Microsoft wants to kill the RDLC or if they want..

How to create radio buttons and checkbox in swift (iOS)?

I am developing an app that allows to do survey. My layout is generated from XML based questions. I need to create radio buttons (single choice) and checkboxes (multiple answers). I did not find any..

How to populate a sub-document in mongoose after creating it?

I am adding a comment to an item.comments list. I need to get the comment.created_by user data before I output it in the response. How should I do this? Item.findById(req.param('itemid'), functio..

Command line .cmd/.bat script, how to get directory of running script

How can you get the directory of the script that was run and use it within the .cmd file?..

LINQ to Entities does not recognize the method

I'm getting the following error when trying to do a linq query: LINQ to Entities does not recognize the method 'Boolean IsCharityMatching(System.String, System.String)' method, and this method..

Find the least number of coins required that can make any change from 1 to 99 cents

Recently I challenged my co-worker to write an algorithm to solve this problem: Find the least number of coins required that can make any change from 1 to 99 cents. The coins can only be pennies (..

what is Ljava.lang.String;@

I have a string array selectCancel with setter and getter methods, which is a checkbox in my form. I am trying to get the checked values and I am getting the above result when I print. I tried the Ar..

Program "make" not found in PATH

I'm having the Program "make" not found in PATH error in eclipse. I checked the path variable which is: C:\cygwin\bin; %JAVA_HOME%\bin; %ANT_HOME%\bin; %ANDROID_SDK%\tools; %ANDROID_SDK%\platform-too..

PHP DOMDocument loadHTML not encoding UTF-8 correctly

I'm trying to parse some HTML using DOMDocument, but when I do, I suddenly lose my encoding (at least that is how it appears to me). $profile = "<div><p>various japanese characters</p&..

What is the use of "assert"?

I have been reading some source code and in several places I have seen the usage of assert. What does it mean exactly? What is its usage?..

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined raised when starting react app

I'm working on a project in React and ran into a problem that has me stumped. Whenever I run yarn start I get this error: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type ..

What is the "__v" field in Mongoose

I'm using Mongoose version 3 with MongoDB version 2.2. I've noticed a __v field has started appearing in my MongoDB documents. Is it something to do with versioning? How is it used?..

Stop all active ajax requests in jQuery

I have a problem, when submitting a form all active ajax request fail, and that triggers error event. How to stop all active ajax requests in jQuery without trigerring error event?..

Proxy Basic Authentication in C#: HTTP 407 error

I am working with a proxy that requires authentication, i.e., in a browser if I try to open a page it will immediately ask for credentials. I supplied same credentials in my program but it fails with ..

Is it possible to get the current spark context settings in PySpark?

I'm trying to get the path to spark.worker.dir for the current sparkcontext. If I explicitly set it as a config param, I can read it back out of SparkConf, but is there anyway to access the complete ..

How to retrieve images from MySQL database and display in an html tag

I created a MySQL database with a table using phpmyadmin. I created this table with a BLOB column to hold a jpeg file. I have issues with regards to the php variable $result here. My code so far: (..

Selecting with complex criteria from pandas.DataFrame

For example I have simple DF: import pandas as pd from random import randint df = pd.DataFrame({'A': [randint(1, 9) for x in xrange(10)], 'B': [randint(1, 9)*10 for x in xrange(10..

jQuery equivalent to Prototype array.last()

Prototype: var array = [1,2,3,4]; var lastEl = array.last(); Anything similar to this in jQuery?..

Find text in string with C#

How can I find given text within a string? After that, I'd like to create a new string between that and something else. For instance, if the string was: This is an example string and my data is here ..

get unique machine id

I want to get unique unchangeable Machine id Like Processor serial number of the computer for distribute a software with out copying. I tried with processor serial number and hard disk serial number ..

Conda activate not working?

gonzo ? ~/a/packages ? conda env list # conda environments: # ppo_latest /nohome/jaan/abhishek/anaconda3/envs/ppo_latest root * /nohome/jaan/abhishek/anaconda3 gonzo..

how to automatically scroll down a html page?

I'm trying to start each page after the homepage about 500px down, similar to this website: You'll notice when viewing pages after the homepage, you're automatically s..

error: expected unqualified-id before ‘.’ token //(struct)

I need to make a program that gets a fraction from the user and then simplifies it. I know how to do it and have done most of the code but I keep getting this error "error: expected unqualified-id be..

Return the most recent record from ElasticSearch index

I would like to return the most recent record (top 1) from ElasticSearch index similar to the sql query below; SELECT TOP 1 Id, name, title FROM MyTable ORDER BY Date DESC; Can this be done?..

Error LNK2019 unresolved external symbol _main referenced in function "int __cdecl invoke_main(void)" (?invoke_main@@YAHXZ)

Error: Severity Code Description Project File Line Error LNK2019 unresolved external symbol _main referenced in function "int __cdecl invoke_main(void)" (?invoke_main@@YAHXZ) Severity Co..

How do I use $rootScope in Angular to store variables?

How do I use $rootScope to store variables in a controller I want to later access in another controller? For example: angular.module('myApp').controller('myCtrl', function($scope) { var a = //somet..

How to adjust an UIButton's imageSize?

How can I adjust the image size of the UIButton? I am setting the image like this: [myLikesButton setImage:[UIImage imageNamed:@"icon-heart.png"] forState:UIControlStateNormal]; However this fills ..

comparing 2 strings alphabetically for sorting purposes

I'm trying to compare 2 strings alphabetically for sorting purposes. For example I want to have a boolean check like if('aaaa' < 'ab'). I tried it, but it's not giving me correct results, so I gues..

Catch KeyError in Python

If I run the code: connection = manager.connect("I2Cx") The program crashes and reports a KeyError because I2Cx doesn't exist (it should be I2C). But if I do: try: connection = manager.connec..

How can I add a table of contents to a Jupyter / JupyterLab notebook?

The documentation at says You can provide a conceptual structure for your computational document as a whole using different levels o..

Android: remove notification from notification bar

I have created an application and with an event I manage to add notification in android notification bar. Now I need sample how to remove that notification from notification bar on an event ?? ..

Is it possible to specify proxy credentials in your web.config?

I need to configure a website to access a webservice on another machine, via a proxy. I can configure the website to use a proxy, but I can't find a way of specifying the credentials that the proxy r..

How to set a selected option of a dropdown list control using angular JS

I am using Angular JS and I need to set a selected option of a dropdown list control using angular JS. Forgive me if this is ridiculous but I am new with Angular JS Here is the dropdown list control..

Concatenate two PySpark dataframes

I'm trying to concatenate two PySpark dataframes with some columns that are only on each of them: from pyspark.sql.functions import randn, rand df_1 = sqlContext.range(0, 10) +--+ |id| +--+ | 0| | ..

What are the possible values of the Hibernate configuration and what do they do

I really want to know more about the update, export and the values that could be given to I need to know when to use the update and when not? And what is the alternative? These..

How can I scale an entire web page with CSS?

Using Firefox, you can enlarge an entire web page by simply pressing CTRL +. What this does is proportionally enlarge the entire web page (fonts, images, etc). How can I replicate the same functional..

Is there a simple way that I can sort characters in a string in alphabetical order

I have strings like this: var a = "ABCFE"; Is there a simple way that I can sort this string into: ABCEF Thanks..

how to get the selected index of a drop down

I have a normal dropdown which I want to get the currently selected index and put that in a variable. Jquery or javascript. Jquery perfered. <select name="CCards"> <option value="0">Selec..

Creating a LINQ select from multiple tables

This query works great: var pageObject = (from op in db.ObjectPermissions join pg in db.Pages on op.ObjectPermissionName equals page.PageName where pg.PageID == pa..

How to return data from PHP to a jQuery ajax call

I am posting some data using ajax. I want to manipulate that data and return to to the calling jQuery script. Here is my jQuery: $.ajax({ type: "POST", url: "somescript.php", datatype: "html"..

Difference between core and processor

What is the difference between a core and a processor? I've already looked for it on Google, but I'm just having multi-core and multi-processor definition, but it doesn't match what I am looking for...

UIWebView open links in Safari

I have a very simple UIWebView with content from my application bundle. I would like any links in the web view to open in Safari instead of in the web view. Is this possible?..

Could not reserve enough space for object heap

I am getting the following exception repeatedly each time I try to run the program. Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java..

Datatable date sorting dd/mm/yyyy issue

I am using a Jquery plugin called datatables Its fantastic, however I cannot get the dates to sort correctly according to the dd/mm/yyyy format. I have looked at their support formats but none of th..

Using GSON to parse a JSON array

I have a JSON file like this: [ { "number": "3", "title": "hello_world", }, { "number": "2", "title": "hello_world", } ] Before when files had a root ele..

How can we run a test method with multiple parameters in MSTest?

NUnit has a feature called Values, like below: [Test] public void MyTest( [Values(1,2,3)] int x, [Values("A","B")] string s) { // ... } This means that the test method..

Get 2 Digit Number For The Month

I have an integer column "Month" I would like to get 2 digit number for month. This is what I have tried: DATEPART(mm, @Date) It returns one digit for months January to September I am using SQL Serv..

How to change the docker image installation directory?

From what I can tell, docker images are installed to /var/lib/docker as they are pulled. Is there a way to change this location, such as to a mounted volume like /mnt?..

Add string in a certain position in Python

Is there any function in Python that I can use to insert a value in a certain position of a string? Something like this: "3655879ACB6" then in position 4 add "-" to become "3655-879ACB6"..

(Built-in) way in JavaScript to check if a string is a valid number

I'm hoping there's something in the same conceptual space as the old VB6 IsNumeric() function?..

What is the difference between #import and #include in Objective-C?

What are the differences between #import and #include in Objective-C and are there times where you should use one over the other? Is one deprecated? I was reading the following tutorial: http://www.o..

How do I get the XML SOAP request of an WCF Web service request?

I'm calling this web service within code and I would like to see the XML, but I can't find a property that exposes it...

1064 error in CREATE TABLE ... TYPE=MYISAM

Here is my error(if you need any more info just ask)- Error SQL query: CREATE TABLE dave_bannedwords( id INT( 11 ) NOT NULL AUTO_INCREMENT , word VARCHAR( 60 ) NOT NULL DEFAULT '', PRIMARY KEY ( id..

How do I iterate over a range of numbers defined by variables in Bash?

How do I iterate over a range of numbers in Bash when the range is given by a variable? I know I can do this (called "sequence expression" in the Bash documentation): for i in {1..5}; do echo $i; d..

Maximum packet size for a TCP connection

What is the maximum packet size for a TCP connection or how can I get the maximum packet size?..

How to get row count in sqlite using Android?

I am creating task manager. I have tasklist and I want when I click on particular tasklist name if it empty then it goes on Add Task activity but if it has 2 or 3 tasks then it shows me those tasks in..

Handle file download from ajax post

I have a javascript app that sends ajax POST requests to a certain URL. Response might be a JSON string or it might be a file (as an attachment). I can easily detect Content-Type and Content-Dispositi..

How can I divide two integers stored in variables in Python?

I've got two numbers stored in varibles, a and b, and i'd like to see of the ratio of those two is an integer or not in python. However when I try result = a./b it gives me a SyntaxError: invali..

How to pass a file path which is in assets folder to File(String path)?

Possible Duplicate: Android - How to determine the Absolute path for specific file from Assets? I am trying to pass a file to File(String path) class. Is there a way to find absolute path o..

Xcode variables

In Xcode, I know that you can get variables such as PROJECT_DIR to use in some situations, such as a run script build phase. I am wondering if it's possible to get the build type (i.e., Release or Deb..

How to restart remote MySQL server running on Ubuntu linux?

I'm using Ubuntu 12.04 LTS on my machine. There is on MySQL server situated remotely. I want to restart it. Can someone please give me in detail step-by-step instructions to restart the MySQL server..

Modify table: How to change 'Allow Nulls' attribute from not null to allow null

How to change one attribute in a table using T-SQL to allow nulls (not null --> null)? Alter table maybe?..

Easiest way to flip a boolean value?

I just want to flip a boolean based on what it already is. If it's true - make it false. If it's false - make it true. Here is my code excerpt: switch(wParam) { case VK_F11: if (flipVal == true) ..

Moment.js - two dates difference in number of days

I get incorrect results when trying to find numeric difference between two dates: var startDate = moment( $('[name="date-start"]').val(), "DD.MM.YYYY"), // $('[name="date-start"]').val() === "13.04.2..

What's the difference between Visual Studio Community and other, paid versions?

What's missing in Visual Studio Community 2015? They say it's full-featured and free, but if that's the case, then why do/will they still sell Visual Studio Ultimate 2015 or Visual Studio Enterprise 2..

Angular2 Error: There is no directive with "exportAs" set to "ngForm"

i'm on the RC4 and i'm getting the error There is no directive with "exportAs" set to "ngForm" because of my template : <div class="form-group"> <label for="actionType">Action Typ..

Cannot use Server.MapPath

What I must do to make Server.MapPath work? I have using System.Web; what else? When I type Server there is no quick result option (intelli-sense) for Server. Any help?..

How to get the current user in ASP.NET MVC

In a forms model, I used to get the current logged-in user by: Page.CurrentUser How do I get the current user inside a controller class in ASP.NET MVC?..

How to read all rows from huge table?

I have a problem with processing all rows from database (PostgreSQL). I get an error: org.postgresql.util.PSQLException: Ran out of memory retrieving query results. I think that I need to read all row..

How can I trigger an onchange event manually?

I'm setting a date-time textfield value via a calendar widget. Obviously, the calendar widget does something like this : document.getElementById('datetimetext').value = date_value; What I want is :..

Should we @Override an interface's method implementation?

Should a method that implements an interface method be annotated with @Override? The javadoc of the Override annotation says: Indicates that a method declaration is intended to override a method..

How to get the insert ID in JDBC?

I want to INSERT a record in a database (which is Microsoft SQL Server in my case) using JDBC in Java. At the same time, I want to obtain the insert ID. How can I achieve this using JDBC API?..

Bootstrap 3 Horizontal and Vertical Divider

I am having trouble to put in horizontal and vertical lines on my website. Not sure what's wrong with this. I tried using borders but I am not sure if I am doing it right. I would like to achieve a ..

How to compare two Carbon Timestamps?

I have two timestamps, edited_at which I created and created_at (Laravel's)... In database, both have type timestamp and default value 0000-00-00 00:00:00... But var_dump(edited_at variable) is giv..

What is the inclusive range of float and double in Java?

What is the inclusive range of float and double in Java? Why are you not recommended to use float or double for anything where precision is critical?..