Questions Tagged with #Defaultbutton

java IO Exception: Stream Closed

This is the code I currently have: public class FileStatus extends Status{ FileWriter writer; public FileStatus(){ try { writer = new FileWriter("status.txt",true); } catch (IOExcepti..

fix java.net.SocketTimeoutException: Read timed out

I have a RESTful server which takes an http POST input from client to vote up songs on server. I have used Apache HTTPClient for client. public boolean vote() { HttpClient client = new Defaul..

Why does writeObject throw java.io.NotSerializableException and how do I fix it?

I have this exception and I don't understand why it would be thrown or, how I should handle it. try { os.writeObject(element); } catch (IOException e) { e.printStackTrace(); } Where elemen..

Jetty: HTTP ERROR: 503/ Service Unavailable

I'm new to Jetty, I tried to run the sample program here "http://www.codeproject.com/Articles/128145/Run-Jetty-Web-Server-Within-Your-Application" but I got error message on my page "http://localhost..

Programmatically select a row in JTable

When the application is started, none of the rows is selected. But I would like to show that the first row is already selected. How to do this? Do I need to set the color of a row in JTable? Updat..

Parser Error: '_Default' is not allowed here because it does not extend class 'System.Web.UI.Page' & MasterType declaration

I recently converted a website project to a web application project in Visual Studio 2008. I finally got it to compile, and the first page (the login screen) displayed as normal, but then when it red..

Using atan2 to find angle between two vectors

I understand that: atan2(vector.y, vector.x) = the angle between the vector and the X axis. But I wanted to know how to get the angle between two vectors using atan2. So I came across this solution:..

How to commit a change with both "message" and "description" from the command line?

I'm new to both git and GitHub. I managed to set up everything locally on my Mac, so that now I can push commits to GitHub via git (on the command line, not the Mac app). When I push commits directly..

How to set a binding in Code?

I have the need to set a binding in code. I can't seem to get it right tho. This is what i have tried: XAML: <TextBox Name="txtText"></TextBox> Code behind: Binding myBinding = new ..

How to get first character of a string in SQL?

I have a SQL column with a length of 6. Now want to take only the first char of that column. Is there any string function in SQL to do this?..

Xcode build failure "Undefined symbols for architecture x86_64"

An Xcode beginner's question: It is my first experience with Xcode 4.6.3. I am trying to write a very simple console program, that searches for paired BT devices and prints them to an NSLog. It bui..

The tilde operator in Python

What's the usage of the tilde operator in Python? One thing I can think about is do something in both sides of a string or list, such as check if a string is palindromic or not: def is_palindromic(s..

Loop inside React JSX

I'm trying to do something like the following in React JSX (where ObjectRow is a separate component): <tbody> for (var i=0; i < numrows; i++) { <ObjectRow/> } </tbod..

MySQL - Meaning of "PRIMARY KEY", "UNIQUE KEY" and "KEY" when used together while creating a table

Can anyone explain about the purpose of PRIMARY KEY, UNIQUE KEY and KEY, if it is put together in a single CREATE TABLE statement in MySQL? CREATE TABLE IF NOT EXISTS `tmp` ( `id` int(11) NOT NULL ..

Reducing video size with same format and reducing frame size

This question might be very basic Is there a way to reduce the frame size/rate of Lossy compressed (WMV, MPEG) format, to get a smaller video, of lesser size, with same format. Are there any open so..

Can I check if Bootstrap Modal Shown / Hidden?

Can I check if Bootstrap Modal currently Shown / Hidden Programatically? Like bool a = if("#myModal").shown(); ? I need true/false..

Can I catch multiple Java exceptions in the same catch clause?

In Java, I want to do something like this: try { ... } catch (/* code to catch IllegalArgumentException, SecurityException, IllegalAccessException, and NoSuchFieldException at t..

Raise an event whenever a property's value changed?

There is a property, it's named ImageFullPath1 public string ImageFullPath1 {get; set; } I'm going fire an event whenever its value changed. I am aware of changing INotifyPropertyChanged, but I wan..

What is the 'override' keyword in C++ used for?

I am a beginner in C++. I have come across override keyword used in the header file that I am working on. May I know, what is real use of override, perhaps with an example would be easy to understand...

Converting integer to string in Python

I want to convert an integer to a string in Python. I am typecasting it in vain: d = 15 d.str() When I try to convert it to string, it's showing an error like int doesn't have any attribute called st..

Remove Null Value from String array in java

How to remove null value from String array in java? String[] firstArray = {"test1","","test2","test4",""}; I need the "firstArray" without null ( empty) values like this String[] firstArray = {"te..

.crx file install in chrome

I have just created a very simple chrome extension and it works fine. But when I converted to .crx file and try to open it with chrome, nothing happens. my chrome browser version is 19.0.1081.2 dev-m...

REST API error code 500 handling

We are building a new REST API. I was arguing that error code 500 (Internal Server Error) should never be returned. Now, of course if you know the client's params are wrong or something you have eve..

How to execute powershell commands from a batch file?

I have a PowerShell script to add a website to a Trusted Sites in Internet Explorer: set-location "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings" set-location ZoneMap\Domains new-..

Passing parameter using onclick or a click binding with KnockoutJS

I have this function: function make(place) { place.innerHTML = "somthing" } I used to do this with plain JavaScript and html: <button onclick="make(this.parent)">click me</button> ..

How can I create a simple message box in Python?

I'm looking for the same effect as alert() in JavaScript. I wrote a simple web-based interpreter this afternoon using Twisted.web. You basically submit a block of Python code through a form, and the ..

How do I pass a list as a parameter in a stored procedure?

Looking to pass a list of User IDs to return a list names. I have a plan to handle the outputed names (with a COALESCE something or other) but trying to find the best way to pass in the list of user I..

MySQL - How to parse a string value to DATETIME format inside an INSERT statement?

I have a MySQL database, with a column that is date type DATETIME. I am getting a string value for a date / time from an external application. That string value looks like this: '5/15/2012 8:06:26..

What does Include() do in LINQ?

I tried to do a lot of research but I'm more of a db guy - so even the explanation in the MSDN doesn't make any sense to me. Can anyone please explain, and provide some examples on what Include() stat..

How to specify different Debug/Release output directories in QMake .pro file

I have a Qt project and I would like to output compilation files outside the source tree. I currently have the following directory structure: / |_/build |_/mylib |_/include |_/src |_/resources..

Given a starting and ending indices, how can I copy part of a string in C?

In C, how can I copy a string with begin and end indices, so that the string will only be partially copied (from begin index to end index)? This would be like 'C string copy' strcpy, but with a begi..

Get list of databases from SQL Server

How can I get the list of available databases on a SQL Server instance? I'm planning to make a list of them in a combo box in VB.NET...

Get file from project folder java

I want to get File from project folder by using "File class" , How I can Do that ? File file=new File("x1.txt"); ..

How do I remove repeated elements from ArrayList?

I have an ArrayList<String>, and I want to remove repeated strings from it. How can I do this?..

How to change the link color in a specific class for a div CSS

In my Page the following CSS is set: a:link { color: #0094DE; text-decoration: none; } a:visited { text-decoration: none; color: #0094DE; } a:hover { text-decoration: underline; c..

In jQuery, what's the best way of formatting a number to 2 decimal places?

This is what I have right now: $("#number").val(parseFloat($("#number").val()).toFixed(2)); It looks messy to me. I don't think I'm chaining the functions correctly. Do I have to call it for eac..

TypeError: unsupported operand type(s) for /: 'str' and 'str'

name = input('Enter name here:') pyc = input('enter pyc :') tpy = input('enter tpy:') percent = (pyc / tpy) * 100; print (percent) input('press enter to quit') whenever i run this program i get this..

What are the uses of "using" in C#?

User kokos answered the wonderful Hidden Features of C# question by mentioning the using keyword. Can you elaborate on that? What are the uses of using?..

jQuery add class .active on menu

I've got a problem. I want to add the class "active" on item menu when the relative page is on. the menu is very simple: <div class="menu"> <ul> <li><a href="~/link1/">LINK..

Syntax error "syntax error, unexpected end-of-input, expecting keyword_end (SyntaxError)"

I can't run my Rspec user_spec.rb test due to a syntax error. Too many "end" perhaps in 2 different files? I've added and deleted 'end' in certain places without success. Syntax error "syntax error,..

How do I clone a range of array elements to a new array?

I have an array X of 10 elements. I would like to create a new array containing all the elements from X that begin at index 3 and ends in index 7. Sure I can easily write a loop that will do it for me..

Disable Auto Zoom in Input "Text" tag - Safari on iPhone

I made an HTML page that has an <input> tag with type="text". When I click on it using Safari on iPhone, the page becomes larger (auto zoom). Does anybody know how to disable this?..

How to display an IFRAME inside a jQuery UI dialog

The web application that I am upgrading uses jQuery and jQuery UI. I have replaced most instances of window.open and <a target=_blank> with jQuery UI dialog. For example, the terms and condition..

Run certain code every n seconds

Is there a way to, for example, print Hello World! every n seconds? For example, the program would go through whatever code I had, then once it had been 5 seconds (with time.sleep()) it would execute ..

How to play a sound in C#, .NET

I have a Windows application written in C#/.NET. How can I play a specific sound when a button is clicked?..

How do I get the parent directory in Python?

Could someone tell me how to get the parent directory of a path in Python in a cross platform way. E.g. C:\Program Files ---> C:\ and C:\ ---> C:\ If the directory doesn't have a parent di..

Using PowerShell to write a file in UTF-8 without the BOM

Out-File seems to force the BOM when using UTF-8: $MyFile = Get-Content $MyPath $MyFile | Out-File -Encoding "UTF8" $MyPath How can I write a file in UTF-8 with no BOM using PowerShell?..

Could not find or load main class

I have Windows 7, installed jdk1.7.0 and its supporting jre7. My problem is compilation part works perfectly, but while running the Java program I get this error saying: "Could not find or load ma..

Sort an array of objects in React and render them

I have an array of objects containing some information. I am not able to render them in the order I want and I need some help with that. I render them like this: this.state.data.map( (item,..

How get the base URL via context path in JSF?

I have this structure: WebContent resources components top.xhtml company about_us.xhtml index.xhtml top.xhtml is a component, that is used in index.xthml a..

Retrieve only the queried element in an object array in MongoDB collection

Suppose you have the following documents in my collection: { "_id":ObjectId("562e7c594c12942f08fe4192"), "shapes":[ { "shape":"square", "color":"blue" }, ..

XAMPP installation on Win 8.1 with UAC Warning

I am trying to install Xampp win32-1.8.2 on Windows 8.1. I get a message saying" Because an activated user account User Account on your system some functions of XAMPP are possibly restricted." I've tr..

How to add Button over image using CSS?

i am new in CSS so sorry if this question is just stupid or too simple but i just dont know how to do it. I need to place a button over the image, how it should looks: You see there a blue button ..

HTML: Select multiple as dropdown

I would like to use a select field with multiple as a common dropdown field with size=1: <select name="test[]" size="1" multiple> <option>123 <option>456 <option>7..

Find maximum value of a column and return the corresponding row values using Pandas

Using Python Pandas I am trying to find the Country & Place with the maximum value. This returns the maximum value: data.groupby(['Country','Place'])['Value'].max() But how do I get the corr..

Update just one gem with bundler

I use bundler to manage dependencies in my rails app, and I have a gem hosted in a git repository included as followed: gem 'gem-name', :git => 'path/to/my/gem.git' To update this gem, I execute..

How do I download a file with Angular2 or greater

I have a WebApi / MVC app for which I am developing an angular2 client (to replace MVC). I am having some troubles understanding how Angular saves a file. The request is ok (works fine with MVC, and ..

How to check if a network port is open on linux?

How can I know if a certain port is open/closed on linux ubuntu, not a remote system, using python? How can I list these open ports in python? Netstat: Is there a way to integrate netstat output w..

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

Differences between Oracle JDK and OpenJDK

NOTE: This question is from 2014. As of Java 11 OpenJDK and Oracle JDK are converging. Are there any crucial differences between Oracle and OpenJDK? For example, are the garbage collection a..

What is a faster alternative to Python's http.server (or SimpleHTTPServer)?

Python's http.server (or SimpleHTTPServer for Python 2) is a great way of serve the contents of the current directory from the command line: python -m http.server However, as far as web servers go, i..

Regular Expressions and negating a whole character group

I'm attempting something which I feel should be fairly obvious to me but it's not. I'm trying to match a string which does NOT contain a specific sequence of characters. I've tried using [^ab], [^(a..

How to start Activity in adapter?

I have a ListActivity with my customized adapter and inside each of the view, it may have some buttons, in which I need to implement OnClickListener. I need to implement the OnClickListener in the ada..

html vertical align the text inside input type button

I'm trying to create a button with height of '22px' , and that the text inside the button will be vertically aligned in the center of the button. I tried everything , and can't find out how to do it. ..

Java get String CompareTo as a comparator object

I would like to sort and binary search a static array of strings via the String.CompareTo comparator. The problem is that both sorting, and binary searching requires that a Comparator object be passe..

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

Restart container within pod

I have a pod test-1495806908-xn5jn with 2 containers. I'd like to restart one of them called container-test. Is it possible to restart a single container within a pod and how? If not, how do I restart..

Split string with PowerShell and do something with each token

I want to split each line of a pipe on spaces, and then print each token on its own line. I realise that I can get this result using: (cat someFileInsteadOfAPipe).split(" ") But I want more flexib..

How to edit default.aspx on SharePoint site without SharePoint Designer

On several occations, I have faced the situation that the default.aspx page on a Site doesn't work. More specifically, a reference to a WebPart and/or Control is throwing a error because the assembly ..

How to obtain Certificate Signing Request

How do I obtain a Certificate Signing Request? All I'm trying to do is get my app running on my ipod touch. This was easy as I could just go to the IOS development portal and just download one, no mus..

How to get the string size in bytes?

As the title implies, my question is how to get the size of a string in C. Is it good to use sizeof if I've declared it (the string) in a function without malloc in it? Or, if I've declared it as a po..

py2exe - generate single executable file

I thought I heard that py2exe was able to do this, but I never figured it out. Has anyone successfully done this? Can I see your setup.py file, and what command line options you used? Basically I'm..

Android button font size

I;ve been trying to create a custom button in android using this tutorial - http://www.gersic.com/blog.php?id=56 It works well but it doesn't say how to change the font size or weighting. Any ideas? ..

How to create temp table using Create statement in SQL Server?

How to create a temp table similarly to creating a normal table? Example: CREATE TABLE table_name ( column1 datatype, column2 datatype, column3 datatype, .... ); ..

PostgreSQL: Show tables in PostgreSQL

What's the equivalent to show tables (from MySQL) in PostgreSQL?..

SQL Transaction Error: The current transaction cannot be committed and cannot support operations that write to the log file

I'm having a similar issue to The current transaction cannot be committed and cannot support operations that write to the log file, but I have a follow-up question. The answer there references Using ..

How to group dataframe rows into list in pandas groupby

I have a pandas data frame df like: a b A 1 A 2 B 5 B 5 B 4 C 6 I want to group by the first column and get second column as lists in rows: A [1,2] B [5,5,4] C [6] Is it possible to do something..

What is ".NET Core"?

Recently in an official .NET Framework Blog it was announced that .NET Core is going open source. Ironically, the author mentions that what .NET Core is will be explained in the next post. Some more ..

What does the clearfix class do in css?

I've seen div tags use a clearfix class when it's child divs use the float property. The clearfix class looks like this: .clearfix:after { clear: both; content: "."; display: block; h..

Php, wait 5 seconds before executing an action

I have a .php script that I use for creating the list of my products. I am on shared hosting, so I can't do a lot of queries otherwise I get a blank page. This is how I use my script now: script.php..

What is time(NULL) in C?

I learning about some basic C functions and have encountered time(NULL) in some manuals. What exactly does this mean?..

How to set a value to a file input in HTML?

How can I set the value of this? <input type="file" /> ..

How can I listen to the form submit event in javascript?

I wanna write my own form validation javascript library and I've been looking on google how to detect if a submit button is clicked but all I found is code where you have to use onClick on onSubmit="f..

How to manage exceptions thrown in filters in Spring?

I want to use generic way to manage 5xx error codes, let's say specifically the case when the db is down across my whole spring application. I want a pretty error json instead of a stack trace. For ..

Get variable from PHP to JavaScript

I want to use a PHP variable in JavaScript. How is it possible?..

What's the difference between Invoke() and BeginInvoke()

Just wondering what the difference between BeginInvoke() and Invoke() are? Mainly what each one would be used for. EDIT: What is the difference between creating a threading object and calling invok..

display: inline-block extra margin

I'm working with a few divs that are set to display: inline-block and have a set height and width. In the HTML, if there is a line break after each div there is an automatic 5px margin add to the righ..

Add new element to an existing object

I was looking for a way to add new elements to an an existing object like what push does with arrays I have tried this and it didn't work : var myFunction = { Author: 'my name ', date: '15-..

Debug assertion failed. C++ vector subscript out of range

the following code fills the vector with 10 values in first for loop.in second for loop i want the elements of vector to be printed. The output is till the cout statement before the j loop.Gives error..

JS. How to replace html element with another element/text, represented in string?

I have a problem with replacing html elements. For example, here is a table: <table> <tr> <td id="idTABLE">0</td> <td>END</td> </tr>..

npm WARN ... requires a peer of ... but none is installed. You must install peer dependencies yourself

I tried to run a project downloaded from github. Unfortunately, during npm install the following warnings were shown. I tried to change the version based on this question. However, I had a problem, be..

Java Returning method which returns arraylist?

I have one class with a method like this: public ArrayList<Integer> myNumbers() { ArrayList<Integer> numbers = new ArrayList<Integer>(); numbers.add(5); numbers.add(1..

How do I save JSON to local text file

Say I have a javascript object that looks like this : var data = { name: "cliff", age: "34", name: "ted", age: "42", name: "bob", age: "12" } var jsonData =..

RequestDispatcher.forward() vs HttpServletResponse.sendRedirect()

What is the conceptual difference between forward() and sendRedirect()?..

How unique is UUID?

How safe is it to use UUID to uniquely identify something (I'm using it for files uploaded to the server)? As I understand it, it is based off random numbers. However, it seems to me that given enough..

Localhost : 404 not found

I am using XAMPP. and internal server of Django. When I browse to localhost or 127.0.0.1, It shows Not Found . HTTP Error 404. The requested resource is not found. It sometimes works fine and other ..

In Angular, how to pass JSON object/array into directive?

Currently, my app has a controller that takes in a JSON file then iterates through them using "ng-repeat". This is all working great, but I also have a directive that needs to iterate through the same..

What is the Swift equivalent to Objective-C's "@synchronized"?

I've searched the Swift book, but can't find the Swift version of @synchronized. How do I do mutual exclusion in Swift?..

How to center cell contents of a LaTeX table whose columns have fixed widths?

Consider the following piece of LaTeX code: \begin{tabular}{p{1in}p{1in}} A & B\\ C & D\\ \end{tabular} How can I make the contents of each cell aligned in the center of the cell rather t..

SVG: text inside rect

I want to display some text inside SVG rect. Is it possible? I tried <svg xmlns="http://www.w3.org/2000/svg"> <g> <rect x="0" y="0" width="100" height="100" fill="red"> ..

How can I get the file name from request.FILES?

How can I get the file name from request.FILES in Django? def upload(request): if request.method == 'POST': form = UploadForm(request.POST, request.FILES) if form.is_valid(): ..

Why does modern Perl avoid UTF-8 by default?

I wonder why most modern solutions built using Perl don't enable UTF-8 by default. I understand there are many legacy problems for core Perl scripts, where it may break things. But, from my point of ..

How to add a boolean datatype column to an existing table in sql?

I have a table called person in my database. I want to add another column to the same table and it's a Boolean datatype column. I have tried following queries but it says syntax error near default. I ..

HTML5 validation when the input type is not "submit"

I'm using HTML5 for validating fields. I'm submitting the form using JavaScript on a button click. But the HTML5 validation doesn't work. It works only when then input type is submit. Can we do anythi..

adding css file with jquery

I am creating a popupwindow and I want to add a css file to that popupwindow below is the code for popupwindow. I have a javascript with creates a popupwindow. <a href="popupwindowcontent.xhtml" ..

Given a class, see if instance has method (Ruby)

I know in Ruby that I can use respond_to? to check if an object has a certain method. But, given the class, how can I check if the instance has a certain method? i.e, something like Foo.new.respond..

HTML5 Video tag not working in Safari , iPhone and iPad

I am trying to create an html5 web page in which there is a small video like 13s , I converted the flash version of this video into 3 format : .ogv using fireFogg , .webm using firefogg also and .mp4 ..

How to convert SSH keypairs generated using PuTTYgen (Windows) into key-pairs used by ssh-agent and Keychain (Linux)

I've generated key pairs using PuTTYgen and been logging in using Pageant, so that I have to enter my pass-phrase only once when my system boots. How do I achieve this in Linux? I've heard of keycha..

How can I pass a Bitmap object from one activity to another

In my activity, I create a Bitmap object and then I need to launch another Activity, How can I pass this Bitmap object from the sub-activity (the one which is going to be launched)?..

Python 2: AttributeError: 'list' object has no attribute 'strip'

I have a small problem with list. So i have a list called l: l = ['Facebook;Google+;MySpace', 'Apple;Android'] And as you can see I have only 2 strings in my list. I want to separate my list l by '..

How to display hexadecimal numbers in C?

I have a list of numbers as below: 0, 16, 32, 48 ... I need to output those numbers in hexadecimal as: 0000,0010,0020,0030,0040 ... I have tried solution such as: printf("%.4x",a); // whe..

How to set enum to null

I have an enum string name; public enum Color { Red, Green, Yellow } How to set it to NULL on load. name = ""; Color color = null; //error Edited: My bad, I didn't explain it properly. B..

Escaping special characters in Java Regular Expressions

Is there any method in Java or any open source library for escaping (not quoting) a special character (meta-character), in order to use it as a regular expression? This would be very handy in dynamic..

How to exit an if clause

What sorts of methods exist for prematurely exiting an if clause? There are times when I'm writing code and want to put a break statement inside of an if clause, only to remember that those can only..

MySQL Stored procedure variables from SELECT statements

I'm trying to create a stored procedure. Here's what I have so far (not working): DELIMITER | CREATE PROCEDURE getNearestCities(IN cityID INT) BEGIN DECLARE cityLat FLOAT; DECLARE..

get all the images from a folder in php

I am using WordPress. I have an image folder like mytheme/images/myimages. I want to retrieve all the images name from the folder myimages Please advice me, how can I get images name...

Git push error pre-receive hook declined

I have run gitlabhq rails server on virtual machine, following 1-6 steps from this tutorial https://github.com/gitlabhq/gitlab-recipes/blob/master/install/centos/README.md and starts rails server exec..

Replace one character with another in Bash

I need to be able to do is replace a space () with a dot (.) in a string in bash. I think this would be pretty simple, but I'm new so I can't figure out how to modify a similar example for this use...

C subscripted value is neither array nor pointer nor vector when assigning an array element value

Sorry for asking the already answered question, I am a newbie to C and don't understand the solutions. Here is my function int rotateArr(int *arr) { int D[4][4]; int i = 0, n =0; for(i; i..

psql: FATAL: database "<user>" does not exist

I'm using the PostgreSql app for mac (http://postgresapp.com/). I've used it in the past on other machines but it's giving me some trouble when installing on my macbook. I've installed the application..

Typescript sleep

I'm developing a website in Angular 2 using Typescript and I was wondering if there was a way to implement thread.sleep(ms) functionality. My use case is to redirect the users after submitting a form..

JSONDecodeError: Expecting value: line 1 column 1

I am receiving this error in Python 3.5.1. json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) Here is my code: import json import urllib.request connection = urllib.reques..

How do AX, AH, AL map onto EAX?

My understanding of x86 registers say that each register can be accessed by the entire 32 bit code and it is broken into multiple accessible registers. In this example EAX being a 32 bit register, if..

web-api POST body object always null

I'm still learning web API, so pardon me if my question sounds stupid. I have this in my StudentController: public HttpResponseMessage PostStudent([FromBody]Models.Student student) { if (DBManag..

How to get the element clicked (for the whole document)?

I would like to get the current element (whatever element that is) in an HTML document that I clicked. I am using: $(document).click(function () { alert($(this).text()); }); But very strangely, I..

How to load html string in a webview?

i have a html string containing this: <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"> <html> <head> <meta http-equiv="content-type" content=..

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

Bootstrap Carousel : Remove auto slide

I'm using Bootstrap Carousel. All I want is that the slider will only slide when a navigation or a pagination is clicked. I've tried removing $('.carousel').carousel({ interval: 6000 }); It..

Which ChromeDriver version is compatible with which Chrome Browser version?

Actually I'm a bit confused. Although I read several resources about this. For having a test of Selenium 3 using ChromeBrowser we need an extra app called ChromeDriver. I found this text from GitHub..

Add my custom http header to Spring RestTemplate request / extend RestTemplate

My current code: RestTemplate restTemplate = new RestTemplate(); restTemplate.getMessageConverters().add(new MappingJackson2HttpMessageConverter()); Mall[] malls = restTemplate.getForObject(url, Mall..

How to create a Java / Maven project that works in Visual Studio Code?

I'm trying to create a maven project - so that I can compile Java files in the root folder and output the class files in another folder. I've already downloaded mvn. I'm trying to integrate with VS ..

How do I correct this Illegal String Offset?

I am receiving this error "Warning: Illegal string offset 'type' in /home/mysite/public_html/wp-content/themes/evento/lib/php/extra.class.php on line 32" and I realized this section of code in the fi..

addClass and removeClass in jQuery - not removing class

I'm trying to do something very simple. Basically I have a clickable div 'hot spot', when you click that it fills the screen and displays some content. I achieved this by simply changing the class of ..

Are there any Java method ordering conventions?

I've got a large-ish class (40 or so methods) that is part of a package I will be submitting as course-work. Currently, the methods are pretty jumbled up in terms of utility public/private etc. and I ..

Setting cursor at the end of any text of a textbox

I have a text box with a displayed string already in it. To bring the cursor to the textbox I am already doing txtbox.Focus(); But how do I get the cursor at the end of the string in the textbox ?..

How to check if a string array contains one string in JavaScript?

I have a string array and one string. I'd like to test this string against the array values and apply a condition the result - if the array contains the string do "A", else do "B". How can I do that?..

python: changing row index of pandas data frame

I have a data frame called followers_df as below: followers_df 0 0 oasikhia 0 LEANEnergyUS 0 _johannesngwako 0 jamesbreenre 0 CaitlinFecteau 0 mantequillaFACE 0 ..

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

Implement Validation for WPF TextBoxes

I have 3 TextBoxes (Id1,Name and Salary). Id and Salary should contain integers and Name should only contain characters. I need validations for my TextBox, it should show errors as I enter wrong chara..

One time page refresh after first page load

I would like to implement a JavaScript code which states this: if the page is loaded completely, refresh the page immediately, but only once. I'm stuck at the "only once": window.onload = function ()..

Iterate a certain number of times without storing the iteration number anywhere

I was wondering if it is possible to perform a certain number of operations without storing the loop iteration number anywhere. For instance, let's say I want to print two "hello" messages to the con..

How do you change the value inside of a textfield flutter?

I have a TextEditingController where if a user clicks a button it fills in with information. I can't seem to figure out how to change the text inside of a Textfield or TextFormField. Is there a soluti..

remove duplicates from sql union

I'm doing some basic sql on a few tables I have, using a union(rightly or wrongly) but I need remove the duplicates. Any ideas? select * from calls left join users a on calls.assigned_to= a.user_id ..

What does the symbol \0 mean in a string-literal?

Consider following code: char str[] = "Hello\0"; What is the length of str array, and with how much 0s it is ending?..

How can I specify the required Node.js version in package.json?

I have a Node.js project that requires Node version 12 or higher. Is there a way to specify this in the packages.json file, so that the installer will automatically check and inform the users if they ..

Fail during installation of Pillow (Python module) in Linux

I'm trying to install Pillow (Python module) using pip, but it throws this error: ValueError: jpeg is required unless explicitly disabled using --disable-jpeg, aborting So as the error says, I trie..

Transpose a range in VBA

I am Trying to Transpose a range of cells in Excel through VBA macro but I am getting some errors, mostly Error 91. I am pretty new to VBA and don't have much idea about functions either. Range(InR..

how to add a day to a date using jquery datepicker

I have 2 textboxes on my site for pickup date and drop off date both using the jquery date picker. I am having trouble setting the drop off date value to be one day ahead of the pickup date that was ..

How to comment multiple lines in Visual Studio Code?

I cannot find a way to comment and uncomment multiple lines of code in Visual Studio Code. Is it possible to comment and uncomment multiple lines in Visual Studio Code using some shortcut? If yes, ho..

How to pass data to view in Laravel?

Im passing data to my blade view with return View::make('blog', $posts); and in my blade view I'm trying to run an @foreach ($posts as $post) I end up with an error saying that $posts isn't defined. ..

How to make script execution wait until jquery is loaded

I am having a problem where the page is loading so fast, that jquery hasn't finished loading before it is being called by a subsequent script. Is there a way to check for the existence of jquery and ..

How to write dynamic variable in Ansible playbook

Based on extra vars parameter I Need to write variable value in ansible playbook ansible-playbook playbook.yml -e "param1=value1 param2=value2 param3=value3" If only param1 passed myvariable: 'par..

Fatal error in launcher: Unable to create process using ""C:\Program Files (x86)\Python33\python.exe" "C:\Program Files (x86)\Python33\pip.exe""

Searching the net this seems to be a problem caused by spaces in the Python installation path. How do I get pip to work without having to reinstall everything in a path without spaces ?..

How to convert xml into array in php?

I want to convert below XML to PHP array. Any suggestions on how I can do this? <aaaa Version="1.0"> <bbb> <cccc> <dddd Id="id:pass" /> <eeee name="he..

Encrypting & Decrypting a String in C#

What is the most modern (best) way of satisfying the following in C#? string encryptedString = SomeStaticClass.Encrypt(sourceString); string decryptedString = SomeStaticClass.Decrypt(encryptedString..

How do I enable FFMPEG logging and where can I find the FFMPEG log file?

I want to be able to log FFMPEG processes because I am trying to work out how long a minute of video takes to convert to help with capacity planning of my video encoding server. How do I enable loggin..

Cannot open new Jupyter Notebook [Permission Denied]

I have installed Jupyter Notebook on ubuntu 16.04 using pip3. I can execute jupyter notebook command. It opens and shows a list of current path directories. But I cannot create a new notebook(Python3..

Simple WPF RadioButton Binding?

What is the simplest way to bind a group of 3 radiobuttons to a property of type int for values 1, 2, or 3?..

How can I convert uppercase letters to lowercase in Notepad++

I use Notepad ++ for coding mostly. How can I convert capital letters to lowercase and vice versa?..

how to copy only the columns in a DataTable to another DataTable?

how to copy only the columns in a DataTable to another DataTable?..

Android studio - Failed to find target android-18

I have a problem with Android Studio 0.2.3. When I run my project the build stops and appears message that says: Gradle: Execution failed for task ':AppName:compileDebugAidl'. > failed to find ..

Passing data to components in vue.js

I'm struggling to understand how to pass data between components in vue.js. I have read through the docs several times and looked at many vue related questions and tutorials, but I'm still not getti..

"Auth Failed" error with EGit and GitHub

I've installed EGit plugin at Eclipse Helios and I'm trying to use it with my GitHub account, but when I try to configure it I get an "Auth Failed" error. I'd been googling it but no luck... it seems..

Having Django serve downloadable files

I want users on the site to be able to download files whose paths are obscured so they cannot be directly downloaded. For instance, I'd like the URL to be something like this: http://example.com/down..

how to align all my li on one line?

my CSS ul{ overflow:hidden; } li{ display:inline-block; } my HTML <ul> <li>a</li> <li>b</li> <li>c</li> <li>d</li> <li>e</li> <..

How can I read numeric strings in Excel cells as string (not numbers)?

I have excel file with such contents: A1: SomeString A2: 2 All fields are set to String format. When I read the file in java using POI, it tells that A2 is in numeric cell format. The problem is..

Missing visible-** and hidden-** in Bootstrap v4

In Bootstrap v3 I often use the hidden-** classes combined with clearfix to control multi column layouts at different screen widths. For example, I could combine multiple hidden-** in one DIV to mak..

Leaflet changing Marker color

Is there a way to randomly change marker-colors in native Leaflet? I'm using svg elements which could be styled. I know that it is possible with mapbox.js EDIT: To clarify what I intend to do: If you ..

How to extract URL parameters from a URL with Ruby or Rails?

I have some URLs, like http://www.example.com/something?param1=value1&param2=value2&param3=value3 and I would like to extract the parameters from these URLs and get them in a Hash. Obviousl..

How do I Search/Find and Replace in a standard string?

Is there a way to replace all occurrences of a substring with another string in std::string? For instance: void SomeFunction(std::string& str) { str = str.replace("hello", "world"); //< I'..

Passing data to a bootstrap modal

I've got a couple of hyperlinks that each have an ID attached. When I click on this link, I want to open a modal ( http://twitter.github.com/bootstrap/javascript.html#modals ), and pass this ID to the..

CryptographicException 'Keyset does not exist', but only through WCF

I have some code that makes a call to a third party web service that is secured using X.509 certification. If I call the code directly (using a unit test) it works without any problems. When deploye..

How to keep the spaces at the end and/or at the beginning of a String?

I have to concatenate these two strings from my resource/value files: <string name="Toast_Memory_GameWon_part1">you found ALL PAIRS ! on </string> <string name="Toast_Memory_GameWon_pa..

How to add one column into existing SQL Table

I have a SQL Server table and it is located on a remote server. I can connect to it with SQL Server Management Studio but opening it takes time instead, I am doing my jobs with SQL Query window withou..

jQuery: Change button text on click

After seeing Toggling button text in jquery this question, I tried to re create it in my situation but can't seem to have it work. Here is a fiddle of what I've done: http://jsfiddle.net/V4u5X/ $('...

What is a good naming convention for vars, methods, etc in C++?

I come from a the Objective-C and Cocoa world where there are lots of conventions and many people will say it makes your code beautiful! Now programming in C++ I cannot find a good document like this ..

How do I view the SQL generated by the Entity Framework?

How do I view the SQL generated by entity framework ? (In my particular case I'm using the mysql provider - if it matters)..

"relocation R_X86_64_32S against " linking Error

I'm Trying to Link a static Library to a shared library , I'm Getting the Following error /usr/bin/ld: ../../../libraries/log4cplus/liblog4cplus.a(fileappender.o): relocation R_X86_64_32S against `a ..

UIBarButtonItem in navigation bar programmatically?

I've been looking around for this solution for a while but haven't got any. e.g one solution is self.navigationItem.setRightBarButtonItem(UIBarButtonItem(barButtonSystemItem: .Stop, target: self, ..

Bug? #1146 - Table 'xxx.xxxxx' doesn't exist

I am using windows XP. I am creating a table in phpMyAdmin using its built-in create table feature, my database name is ddd. It generates the following code: CREATE TABLE `ddd`.`mwrevision` ( `as..

PIG how to count a number of rows in alias

I did something like this to count the number of rows in an alias in PIG: logs = LOAD 'log' logs_w_one = foreach logs generate 1 as one; logs_group = group logs_w_one all; logs_count = foreach logs_g..

How to hide scrollbar in Firefox?

I just found out how to hide the scrollbar in Google Chrome, I did it with this code: ::-webkit-scrollbar { display: none; } The only problem is that this doesn't work on Firefox. I tried many ways t..

How can I view the source code for a function?

I want to look at the source code for a function to see how it works. I know I can print a function by typing its name at the prompt: > t function (x) UseMethod("t") <bytecode: 0x2332948> &..

How to update column with null value

I am using mysql and need to update a column with a null value. I have tried this many different ways and the best I have gotten is an empty string. Is there a special syntax to do this?..

Remove empty strings from array while keeping record Without Loop?

This question was asked here: Remove empty strings from array while keeping record of indexes with non empty strings If you'd notice the given as @Baz layed it out; "I", "am", "", "still", "here", "..

How to sleep for five seconds in a batch file/cmd

Windows's Snipping tool can capture the screen, but sometimes I want to capture the screen after five seconds, such as taking an image being displayed by the webcam. (Run the script and smile at the c..

How Do I Replace/Change The Heading Text Inside <h3></h3>, Using jquery?

How do I change/replace the <h3> text: "Featured Offers" using javascript to say "Public Offers" instead? </div> <!-- FEATURED OFFERS --> <div class="panel"> <div class..

How to join components of a path when you are constructing a URL in Python

For example, I want to join a prefix path to resource paths like /js/foo.js. I want the resulting path to be relative to the root of the server. In the above example if the prefix was "media" I woul..

IntelliJ does not show project folders

I have an issue with IntelliJ. It doesn't show any folders in my project view on the left. My setting is "View As: Project" How can I manage it so that the folders and packages are shown again? I don..

List comprehension vs map

Is there a reason to prefer using map() over list comprehension or vice versa? Is either of them generally more efficient or considered generally more pythonic than the other?..

How to convert date into this 'yyyy-MM-dd' format in angular 2

I want to convert current data into 'yyyy-MM-dd' format in .ts file. i template it can easily be done by using data pipe. how to do that in typescript. In template: {{date | date:'yyyy-MM-dd'}} H..

Difference between using gradlew and gradle

What is the difference between using gradlew and gradle or are they the same?..

New warnings in iOS 9: "all bitcode will be dropped"

I have this new warning about the Google Framework in my app: (null): URGENT: all bitcode will be dropped because '/Users/myname/Library/Mobile Documents/com~apple~CloudDocs/foldername/appname..

send bold & italic text on telegram bot with html

I've created a bot in telegram I want to send bold and italic text with HTML page to bot My HTML code is: <html> <head><title>Telegram</title></head> <body> ..

Using a .php file to generate a MySQL dump

Here's the information I have: I am working with a Linux based system using MySQL and PHP5. I need to be able to generate a mysqldump from within a .php file, and then have that dump be stored in a ..

recyclerview No adapter attached; skipping layout

Just implemented RecyclerView in my code, replacing ListView. Everything works fine. The data is displayed. But error messages are being logged: 15:25:53.476 E/RecyclerView: No adapter attached; sk..

Can I stretch text using CSS?

Can I stretch text in CSS? I don't want the font to be bigger, because that makes it appear bolder than smaller text beside it. I just want to stretch the text vertically so it's kind of deformed. Th..

Remove useless zero digits from decimals in PHP

I'm trying to find a fast way to remove zero decimals from number values like this: echo cleanNumber('125.00'); // 125 echo cleanNumber('966.70'); // 966.7 echo cleanNumber(844.011); // 844.011 D..

Find TODO tags in Eclipse

When I used Eclipse to add unimplemented methods to a Java class to fix an error, methods were auto-generated and include // TODO Auto-generated method stub Is there an easy way to view all methods w..

While loop in batch

Here is what I want, inside the BACKUPDIR, I want to execute cscript /nologo c:\deletefile.vbs %BACKUPDIR% until number of files inside the folder is greater than 21(countfiles holds it). Here is my c..

What is class="mb-0" in Bootstrap 4?

The latest documention has: _x000D_ _x000D_ <p class="mb-0">Lorem ipsum</p>_x000D_ _x000D_ _x000D_ Q: What is mb-0?..

What does "javax.naming.NoInitialContextException" mean?

As the title suggests, what does "javax.naming.NoInitialContextException" mean in non technical terms? And what are some general suggestions to fix it? EDIT (From the console): javax.naming.NoInitia..

Oracle PL/SQL - How to create a simple array variable?

I'd like to create an in-memory array variable that can be used in my PL/SQL code. I can't find any collections in Oracle PL/SQL that uses pure memory, they all seem to be associated with tables. I'..

message box in jquery

Can any one suggest the code for creating message box in jquery???..

What are the "standard unambiguous date" formats for string-to-date conversion in R?

Please consider the following $ R --vanilla > as.Date("01 Jan 2000") Error in charToDate(x) : character string is not in a standard unambiguous format But that date clearly is in a standard..

URL format with GET parameters?

Is there a specification somewhere listing the correct way to pass GET variables to a URL? Normally I do it like this (first variable indicated by ?, second and subsequent indicated by &: http:/..