I am getting the following error while building the project. haven't used CoordinatorLayout in this project. just added as a dependency in build.gradle :
I am using Android Studio 3.2 Canary 4.
Log..
android studio was getting build error while build execution with following:
Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'. java.lang.RuntimeExceptio..
I have Android Studio Beta. I created a new project with compile my old modules but when I tried launching the app it did not launch with the message:
Error:Execution failed for task ':app:transformD..
I want to change integrated terminal to CMDER i use Vscode on windows 8.1
i checked the doc and also preference file but i got confuse
so from following lines which line will change it
// Externa..
In a multi-GPU computer, how do I designate which GPU a CUDA job should run on?
As an example, when installing CUDA, I opted to install the NVIDIA_CUDA-<#.#>_Samples then ran several instance..
I am following this guide (https://developers.google.com/protocol-buffers/docs/pythontutorial) and using the exact sample of addressbook.proto.
Post the content of compiler generated addressbook_pb2...
I'm using object-fit: cover; in my CSS for images on a specific page, because they need to stick on the same height. It works great in most browsers.
But when scaling my browser in IE or Edge, the i..
So, I am getting the following error while running the project after upgrading build.gradle (Project) from
dependencies {
classpath 'com.android.tools.build:gradle:2.0.0-alpha2'
// N..
I'm trying to set up less on phpstorm so I can compile .less files to .css on save. I have installed node.js and the next step (according to this https://www.jetbrains.com/webstorm/help/transpiling-sa..
For my app I am using a RecyclerView inside a ScrollView where the RecyclerView has a height based on its content using this library. Scrolling is working but it's not working smoothly when I scroll o..
Is there a simple way to convert a LocalDate (introduced with Java 8) to java.util.Date object?
By 'simple', I mean simpler than this:
Date date = Date.from(localDate.atStartOfDay(ZoneId.systemD..
I have a .key file, when I do
openssl rsa -text -in file.key
I get
unable to load Private Key
140000419358368:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:703:Expecting: ANY PRI..
Im trying to do a POST request with jQuery but im getting a error 405 (Method Not Allowed), Im working with Laravel 5
THis is my code:
jQuery
<script type="text/javascript">
$(document).r..
I am developing an android application where I am using RecyclerView. I need to add a divider in RecyclerView.
I tried to add -
recyclerView.addItemDecoration(new
DividerItemDecoration(getActiv..
I want to setup a hadoop-cluster in pseudo-distributed mode. I managed to perform all the setup-steps, including startuping a Namenode, Datanode, Jobtracker and a Tasktracker on my machine.
Then I tr..
I'm pretty new to python programming and I wanted to try my hand at a simple text adventure game, but I've immediately stumbled on a roadblock.
class userInterface:
def __init__(self, roomID, roo..
Let's say I have three tables A, B, and C. Each has two columns: a primary key and some other piece of data. They each have the same number of rows. If I JOIN A and B on the primary key, I should end ..
I am working on a business application using angularJS. One of my service method returning me a byte[] (inclding PDF file content) now i need to download this file as PDF to client machine using JavaS..
I am getting this error, while unmarshalling a string. I have created Java files using JAXB.
JAXBContext jaxbContext = JAXBContext.newInstance(DocumentType.class);
Unmarshaller unmarshaller = jaxbCon..
I'm looking to see if there is a better approach to the query below. What I'm trying to do is create a summary report, compiling stats by date.
SELECT CAST(Detail.ReceiptDate AS DATE) AS 'DATE'
, S..
I am using the following script to process a form to add info to my website. The problem I am having is when I submit the form nothing gets submitted to the database, and there are no errors. How can ..
I have a c# .Net 4.0 project created with VS2010 and now being accessed with VS2012.
I'm trying to publish only the needed files from this website to a destination location (C:\builds\MyProject[Files..
I am still a bit new to XML Schema etc. and have been working to develop some XML, Schema and a Stylesheet (XSLT). I have made reasonable progress, but then realized that my Schema had stopped working..
I am trying to select values from different table and inset it in to the temporary table.
I need a identity field in the temporary table. When I try to execute the following code it throws an error: ..
I want to discover bluetooth devices in range, list and pair to them on click. I used following code but its just closing application when I click on device name which I want to pair.
I want to know ..
I'm trying to validate a really simple xml using xsd, but for some reason I get this error.
I'll really appreciate if someone can explain me why.
XML File
<?xml version="1.0" encoding="utf-8"?>..
When I ping my server, it responds:
user@localhost:~$ ping my.server
PING my.server (111.111.111.11) 56(84) bytes of data.
64 bytes from my.server (111.111.111.11): icmp_req=1 ttl=42 time=38.4 ms
64 ..
This is my current configuration:
XSD
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns="http://stock.com/schemas/services/stock"
xmlns:tns="http://stock.com/schemas/services/sto..
Can someone tell me the code to convert image into byte array and that byte array into base64 string.
i write the below code not getting proper result .
String filepath = "/sdcard/Image/ic_launcher..
I've checked a number of similar questions on stackoverflow but haven't found an answer yet.
I'm trying to install memcached on Lion OSX as shown here.
Here's what I'm getting:
j-court-demones-macb..
I have a webview in my Android Application. When user goes to webview and click a link to download a file nothing happens.
URL = "my url";
mWebView = (WebView) findViewById(R.id.webview);
mWebView.s..
I am almost done with a calculation activity I am working with in android for my app. I try to create a Gender Enum, but for some reason getting Syntax error, insert "EnumBody" to complete EnumDeclara..
So I got this XML schema:
<?xml version="1.0"?> <xs:schema version="1.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xs:eleme..
Hi I am parsing xml and then loading it to web view, after parsing I am creating four strings so that I could append all string to one view. I am able to get two views on the web view but not the firs..
I'm currently setting all of the values of my class object Record.
This is the code that I'm using to populate the record at the moment, property by property.
// Loop through each field in the resul..
my goal is to configure the objectMapper in the way that it only serialises element which are annotated with @JsonProperty.
In order to do so I followed this explanation which says how to configurate..
I am using Entity Framework 1 with .net 3.5.
I am doing something simple like this:
var roomDetails = context.Rooms.ToList();
foreach (var room in roomDetails)
{
room.LastUpdated = DateT..
I am Using Spring WebServiceTemplate to make webservice call which uses JAXB to generate request XML. My requirement needs all the elements (including root) to have a namespace prefix (there is only a..
Seems like this would be a duplicate, but maybe it is just so obvious it hasn't been asked...
Is this the proper way of checking if a variable (not pointer) is initialized in a C++ class?
class MyCl..
I am required to insert the word Appendix before the letter A in my dissertation Table of Contents as follows:
Appendix A (title for appendix A)
but the latex thesis cls file I use generates only th..
I want to transfer a list object via Google Gson, but I don't know how to deserialize generic types.
What I tried after looking at this (BalusC's answer):
MyClass mc = new Gson().fromJson(result, n..
I get this error when I compile my java program:
error: Class names, 'EnumDevices', are only accepted if annotation
processing is explicitly requested
1 error
Here is the java code (I'm running t..
I can't understand this error:
In this call to method SetVolume, Volume = 2055786000 and size = 93552000. Volume is an Integer property, and size is also Integer, as you can see.
The class is a pa..
How can I trigger a button click event using code in Android? I want to trigger the button click programmatically when some other event occurs.
Same Problem I am Facing
public void onDateSelectedBu..
Possible Duplicate:
Finding an enum value by its Description Attribute
I have a generic extension method which gets the Description attribute from an Enum:
enum Animal
{
[Description("..
What exactly is OAuth (Open Authorization)?
I have gleaned some information from
OAuth
Twitter Tutorial: What is OAuth And What It Means To You
What is OAuth
But I want to learn and know more. I..
I have an application that does some long calculations, and I would like to show a progress dialog while this is done. So far I have found that I could do this with threads/handlers, but didn't work, ..
I'm looking for a simple method of converting between java.util.Date and javax.xml.datatype.XMLGregorianCalendar in both directions.
Here is the code that I'm using now:
import java.util.Gregoria..
I am working on a test harness for a SAML 1.1 Assertion Consumer Service. The test must generate a signed SAMLResponse and submit it to the ACS encoded in Base64. The ACS must be able to verify the ..
Reading the limited documentation that Google has provided, I get the feeling that it is possible to change the look (drawable) of a ProgressBar/ProgressDialog by simply creating a new style an assign..
I have an enum with Description attributes like this:
public enum MyEnum
{
Name1 = 1,
[Description("Here is another")]
HereIsAnother = 2,
[Description("Last one")]
LastOne = 3
}
..
I'm getting this error when I call a web service:
"The remote server returned an error: (407) Proxy Authentication Required".
I get the general idea and I can get the code to work by adding
myProxy..
Can anyone tell me what's going wrong with the text? Text longer than one line doesn't wrap to the next line but goes beyond the screen.
Following is the code:
<LinearLayout xmlns:android="http:/..
I'm using a RotateAnimation to rotate an image that I'm using as a custom cyclical spinner in Android. Here's my rotate_indefinitely.xml file, which I placed in res/anim/:
<?xml version="1.0" enc..
What does elementFormDefault do, and when should it be used?
So I found some definitions for elementFormDefault values:
qualified - elements and attributes
are in the targetNamespace of the
s..
I'm guessing I'm getting this error because the string is trying to substring a null value. But wouldn't the ".length() > 0" part eliminate that issue?
Here is the Java snippet:
if (itemdescripti..
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..
I have an Eloquent model which has a related model:
public function option() {
return $this->hasOne('RepairOption', 'repair_item_id');
}
public function setOptionArrayAttribute($values)
{
..
I created some custom elements, and I want to programmatically place them to the upper right corner (n pixels from the top edge and m pixels from the right edge). Therefore I need to get the screen wi..
I find myself frequently using Python's interpreter to work with databases, files, etc -- basically a lot of manual formatting of semi-structured data. I don't properly save and clean up the useful b..
So far I've tried the following commands:
sudo apt-get remove mysql-server mysql-client mysql-common
sudo apt-get purge mysql-server mysql-client mysql-common
sudo apt-get autoremove
But whenever I..
I've installed NetBeans 6.9.1 and installed few updates for it.
Then I've created a new project from existing sources. After a few changes I've closed it. And now I am having an error, when trying to..
I have a pkcs12 file. I need to use this to connect to a webpage using https protocol. I came across some code where in order to connect to a secure web page i need to set the following system propert..
How to check if an element exist with web driver?
Is using a try catch really the only possible way?
boolean present;
try {
driver.findElement(By.id("logoutLink"));
present = true;
} catch (No..
Is there a function in C# to quickly convert some collection to string and separate values with delimiter?
For example:
List<string> names --> string names_together = "John, Anna, Monica"..
I have a column of dates in the format 2010-01-31. I can extract the year using
#extracting year
year = df["date"].values
year = [my_str.split("-")[0] for my_str in year]
df["year"] = year
I'm tryi..
I was trying to install rails on Ubuntu Natty Narwhal 11.04, using ruby1.9.1.
I installed ruby using apt-get install ruby1.9.1-full which contains the dev package. I googled the error and all have su..
My command keeps timing out, so I need to change the default command timeout value.
I've found myDb.Database.Connection.ConnectionTimeout, but it's readonly.
How can I set the command timeout in Ent..
I created the following Series and DataFrame:
import pandas as pd
Series_1 = pd.Series({'Name': 'Adam','Item': 'Sweet','Cost': 1})
Series_2 = pd.Series({'Name': 'Bob','Item': 'Candy','Cost': 2})
Ser..
I want to include a javascript reference like:
<script src="@Url.Content("~/Scripts/jqueryFoo.js")" type="text/javascript"></script>
If I have a Razor View, what is the proper way to in..
The following code initializes a leaflet map. The initialize function centers the map based on user location. How do I change the center of the map to a new position after calling the initialize funct..
I want to create a custom dialog box like below
I have tried the following things.
I created a subclass of AlertDialog.Builder and used a custom Title and Custom Content View and used that but t..
I have a modal window, which contains an anchor text. When i click on this link, it must call a pdf housed somewhere else and display it in a pop up . How can I do that ?
Kindly help ...
I would like to know how can I output a number with 2 decimal places, without rounding the original number.
For example:
2229,999 -> 2229,99
I already tried:
FORMAT(2229.999, 2)
CONVERT(2229.9..
when i publish my asp.net core web application to my local file system, it always takes the production-config and the ASPNETCORE_ENVIRONMENT variable with the value = "Production".
how and where do i..
How do I override an admin template (e.g. admin/index.html) while at the same time extending it (see https://docs.djangoproject.com/en/dev/ref/contrib/admin/#overriding-vs-replacing-an-admin-template)..
the following code worked until today when I imported from a Windows machine and got this error:
new-line character seen in unquoted field - do you need to open the file in universal-newline mode?
i..
So I have a webapplication where I select a value from a dropdownlist. When this value is selected, I want to load another page in a new window.
I tried this:
ScriptManager.RegisterStartupScript(Pag..
I am looking for a LaTeX package that does syntax highlighting on code. For example, right now I use the verbatim block to write code:
\begin{verbatim}
<html>
<head>
..
I upgraded from Python(x,y) 2.7.2.3 to 2.7.6.0 in Windows 7 (and was happy to see that I can finally type function_name? and see the docstring in the Object Inspector again) but now the plotting doesn..
I've spent the past 3hrs trying to work this out but just couldn't find a solution. Here's my batch script:
if NOT Exist Counter.txt GOTO START
Type c:\counter.txt
if %COUNTER% EQU %Cycles% goto Pass..
I want to start using AngularJs and Java Spring for development purpose.I am using Eclipse as IDE . I want to configure my Eclipse to have these frameworks working seamlessly.
I know I may be asking ..
I am working on a program and I want to allow a user to enter multiple integers when prompted. I have tried to use a scanner but I found that it only stores the first integer entered by the user. For ..
I have problems to finish the activity before. I want to start another activity and finish the current activity. When I used finish it didn't exit the current activity.
How can I exit the activity ..
I'm looking for a VBA script that will loop through all subfolders of a specified folder. When I say all subfolders, I mean each folder inside the specified folder, and each folder inside of that, and..
Attempting to use a custom hex color for my css triangle (border). However since it uses border properties I am unsure how to go about doing this. I would like to steer clear of javascript and css3 si..
I have multiple volumes (as nearly everybody nowadays): on Windows they end up specified as C:, D: and so on. How do I list these all like on a Unix machine with "ls /mnt/" with Powershell? ..
I'm wondering if there is a command line utility for taking a GitHub flavored Markdown file and rendering it to HTML.
I'm using a GitHub wiki to create website content. I've cloned the repository on ..
I am trying to use the new async features and I hope solving my problem will help others in the future. This is my code which is working:
async function asyncGenerator() {
// other code
whi..
is there any way that html element file
<input name="file1" type="file" style="width:300px">
only accept PDF files and when we browse its only show PDF files...
Thanks..
I am using a PUT request in my Rails application. Now, a new HTTP verb, PATCH has been implemented by browsers. So, I want to know what the main difference between PATCH and PUT requests are, and when..
Is it possible to delete multiple elements from a list at the same time? If I want to delete elements at index 0 and 2, and try something like del somelist[0], followed by del somelist[2], the second ..
How can I get request URL in JSP which is forwarded by Servlet?
If I run following code in JSP,
System.out.println("servlet path= " + request.getServletPath());
System.out.println("request URL= " + ..
I saved mechanize in my Python 2.7 directory. But when I type import mechanize into the Python shell, I get an error message that reads:
Traceback (most recent call last):
File "<pyshell#0>",..
I'm playing around with exceptions in PHP. For example, I have a script that reads a $_GET request and loads a file; If the file doesn't exists, an new exception should be thrown:
if ( file_exists( $..
I created a method that is supposed to take in a string in "YYYY-MM-DD" form and spit out an int that represents the dates position in relation to the week it is in (regardless if it overlaps between ..
I have forked a private repository (an iPhone project) as follows:
cd nameofdirectory
git init
git clone forkedURL
Now I want to push the changes done by me to my forked repository so that the main..
Hi I am a newbie on nginx, I tried to set it up on my server(running Ubuntu 4), which already has apache running.
So after I apt-get install it, I tried to start nginx. Then I get the message like t..
I am getting that exception from this code:
class Transaction:
def __init__ (self):
self.materials = {}
def add_material (self, m):
self.materials[m.type + m.purity] = m
..
I have a table Persons with personaldata and so on. There are lots of columns but the once of interest here are: addressindex, lastname and firstname where addressindex is a unique address drilled dow..
I would like to have 2 languages for the UI and separate string values for them in my resource file res\values\strings.xml:
<string name="tab_Books_en">Books</string>
<string name="..
How can I move files (like mv command shell) on node.js? Is there any method for that or should I read a file, write to a new file and remove older file?..
I'd like to use a regular expression in sqlite, but I don't know how.
My table has got a column with strings like this: "3,12,13,14,19,28,32"
Now if I type "where x LIKE '3'" I also get the rows whic..
How do i check the existence of a file?
In the documentation for the module fs there's a description of the method fs.exists(path, callback). But, as I understand, it checks for the existence of only..
I would like to change the color background in the text and input fields of a form, but when I do this it also affects the submit button! Could it be done in some other way that does not affect the bu..
I have a large number of file download links in a txt file. I am trying to write a python script to download all the files at once, but I end up with the following error:
SSLError: [Errno 1] _ssl.c:4..
pip install -r requirements.txt fails with the exception below OSError: [Errno 13] Permission denied: '/usr/local/lib/.... What's wrong and how do I fix this? (I am trying to setup Django)
Installing..
Seems as though an update on Windows 10 overnight broke Python. Just trying to run python --version returned a "Permission Denied" error. None of the three updates; KB4507453, KB4506991, or KB4509096..
Trying to check is table exist before create in Oracle. Search for most of the post from Stackoverflow and others too. Find some query but it didn't work for me.
IF((SELECT count(*) FROM dba_tables w..
Hello I'm new to Java, I'm getting this error in my production worker class. My Production worker constructor says explicitly invoke another constructor. I don't know what to do?.
import java.util.Da..
With AngularJS, I can use ng-pristine or ng-dirty to detect if the user has entered the field. However, I want to do client-side validation only after the user has left the field area. This is because..
In my angular 5 project, with typescript I am using the .trim() function on a string like this, But it is not removing the whitespace and also not giving any error.
this.maintabinfo = this.inner_vie..
I'm currently trying to learn nodejs and a small project I'm working is writing an API to control some networked LED lights.
The microprocessor controlling the LEDs has a processing delay, and I need..
I have a crontab running every hour. The user running it has environment variabless in the .bash_profile that work when the user runs the job from the terminal, however, obviously these don't get pick..
I want to show terms and condition note on my website. I dont want to use text field and also dont want to use my whole page. I just want to display my text in selected area and want to use only verti..
I'm trying to change the default application of a Tomcat 6 webserver to a different application than "ROOT" (inside webapps folder). What is the best way to do this?..
I created the table Test_Project2 in Oracle SQL Developer. After that I realized that the column proj_name is of a small size, so I decided to modify the column using the follwoing statement
ALTER TA..
I have an image inside a span tag. But the problem is the image doesn't fit inside the span tag. Instead a part of the image goes out of the span tag.
<span style="padding-right:3px; padd..
I am developing an API to expose some data using ASP.NET Web API.
In one of the API, the client wants us to expose the date in yyyy-MM-dd format. I don't want to change the global settings (e.g. Glob..
I've got a field in one model like:
class Sample(models.Model):
date = fields.DateField(auto_now=False)
Now, I need to filter the objects by a date range.
How do I filter all the objects that ..
I have some html tables where the textual data is too large to fit. So, it expands the cell vertically to accommodate for this. So now rows that have the overflow are twice as tall as rows with smal..
TypeError: a bytes-like object is required, not 'str'
getting above error while Executing below python code to save the HTML table data in Csv file. don't know how to get rideup.pls help me.
im..
I am working on a media player in C# but when I want to make my test I have a problem.
I have to create a new object song with the following path:
@"C:\Users\Jesus Antonio\Desktop\JukeboxV2.0\Jukebo..
I am trying to create an JSON object out of a PHP array. The array looks like this:
$post_data = array('item_type_id' => $item_type,
'string_key' => $string_key,
'string_value' => $s..
I would like to do this in Bash:
in the current directory, find the first folder that contains "foo" in the name
I've been playing around with the find command, but a little confused. Any suggesti..
Is there a way to only run one task in ansible playbook?
For example, in roles/hadoop_primary/tasks/hadoop_master.yml. I have "start hadoop job tracker services" task. Can I just run that o..
Is there a simple way to get Excel to automatically execute a macro whenever a cell is changed?
The cell in question would be in Worksheet("BigBoard").Range("D2")
What I thought would be a simple Go..
I'm creating a class where one of the methods inserts a new item into the sorted list. The item is inserted in the corrected (sorted) position in the sorted list. I'm not allowed to use any built-in l..
The output I'm getting for my little example app is the following:
Welcome to the Calculator!
Please choose what you'd like to do:
0: Addition
1: Subtraction
2: Multiplication
3: Division
4: Quit App..
I have the following data:
SQL> select * from booking_session;
BK_ID|BK_DATE
-----|-------------------------
1|18-MAR-12 10.00.00.000000
2|18-MAR-12 10.25.00.000000
3|18-MAR-12 10.30...
I have a vbscript that is used to rename files. What I need to implement into the script is something that deletes the "new file" if it already exists.
For example: I have a batch of files that are ..
JRebel allows for newly compiled code to be redeployed without restarting the application. I am wondering if there are any alternative (free?). The FAQ page answers this question, but I am sure it'..
When I compile the Python code below, I get
IndentationError: unindent does not match any outer indentation level
import sys
def Factorial(n): # Return factorial
result = 1
for i in ..
Please consider this code. I have seen this type of code several times. words is a local vector. How is it possible to return it from a function?
Can we guarantee it will not die?
std::vector<st..
I wanna make web project using the Maven to import automatically all libraries that I need, so I chose "maven-archetype-webpp"
after that I got this error on pom.xml file :
Description Resource Pat..
I feel stupid but cannot find out how to add a text to a WPF Label control in code. Like following for a TextBlock:
DesrTextBlock.Text = "some text";
What is equivalent property in Label for doing ..
When I use Java based on my C++ knowledge, I love to initialize variable using the following way.
public class ME {
private int i;
public ME() {
this.i = 100;
}
}
After some t..
I dont know how to extract value from Observable to be returned by function in which Observable is present. I need just a value from it to be returned, nothing else.
Current version which works
func..
Is there a way to turn a char into a String or a String with one letter into a char (like how you can turn an int into a double and a double into an int)? (please link to the relevant documentation if..
I am using Chartjs for showing diagrams and I need to set title of y axis, but there are no information about it in documentation.
I need y axis to be set like on picture, or on top of y axis so som..
If I want to append a number to an array initialized to int, how can I do that?
int arr[10] = {0, 5, 3, 64};
arr[] += 5; //Is this it?, it's not working for me...
I want {0,5, 3, 64, 5} in the end...
I have difficulty in removing border from a specific PrimeFaces <p:panelGrid>.
<p:panelGrid styleClass="companyHeaderGrid">
<p:row>
<p:column>
Some tag..
I am creating a background service that will run in its own process. It should allow me to listen if the device location has changed. I should be able to change criteria like the distance moved befor..
I need a regex that will accept only digits from 0-9 and nothing else. No letters, no characters.
I thought this would work:
^[0-9]
or even
\d+
but these are accepting the characters : ^,$,(,)..
I would like to call a sub from another sub inside in the same module. The first sub would be my main code and there I would call the second subroutine. Second subroutine receives multiple inputs as i..
I'm very new to C++ and struggling to figure out how I should iterate through a list of objects and access there members.
I've been trying this where data is the list and student a class.
std::list&..
I need some help from you guys. I have a string name = "john"
But I want to save this String name as "john", including ""(quotations)
String name = ""john"";
String name1 = "[john]"
Can some one ..
If you wanted to generate a pseudorandom alphanumeric string using T-SQL, how would you do it? How would you exclude characters like dollar signs, dashes, and slashes from it?..
I'm looking for the PowerShell equivalent to grep --file=filename. If you don't know grep, filename is a text file where each line has a regular expression pattern you want to match.
Maybe I'm missin..
how can I make the drawable on a button smaller? The icon is too big, actually higher than the button. This is the code I am using:
<Button
android:background="@drawable/red_button"
an..
I received the following error while attempting to execute a Servlet program in Eclipse Mars EE.
'Starting Tomcat v8.0 Sever at localhost' has encountered a problem.
Port 8080 required by To..
I have some issues with Vagrant shared folders, my base system is Ubuntu 13.10 desktop.
I do not understand why I have this error is something that is not right configured ? Is a NFS issue or Virtual..
When a IP-Range is written as aaa.bbb.ccc.ddd/netmask (CIDR Notation) I need to calculate the first and the last included ip address in this range with C#.
Example:
Input: 192.168.0.1/25
Result: 19..
I am used to the c-style getchar(), but it seems like there is nothing comparable for java. I am building a lexical analyzer, and I need to read in the input character by character.
I know I can use ..
I'm trying to load a set of scripts in order, but the onload event isn't firing for me.
var scripts = [
'//cdnjs.cloudflare.com/ajax/libs/less.js/1.3.3/less.min.js',
'//cdnjs.clou..
I am trying to move my website from XML based config files to JSON based ones. Is there a way to load in a .json file in so that it turns into the object? I have been searching the web and I cannot fi..
Can someone tell me how to change table cellpadding and cellspacing like you can do it in html with:
<table cellspacing="0" cellpadding="0">
But how is it done with css?..
How do you add an item to an existing array in VBScript?
Is there a VBScript equivalent to the push function in Javascript?
i.e.
myArray has three items, "Apples", "Oranges", and "Bananas" and I wa..
Ok, so everyone knows you can make a triangle using this:
#triangle {
width: 0;
height: 0;
border-left: 50px solid transparent;
border-right: 50px solid transparent;
border-bottom:..
I am trying to include only the filename of the file I've selected in the OpenFileDialog in the label1.Text property, but I haven't found a solution yet.
I know I could use a method from the string cl..
How do I automatically create an enum and subsequently use its values in C# based on values in a database lookup table (using enterprise library data layer)?
For example, If I add a new lookup value ..
I have a variable of type size_t, and I want to print it using printf(). What format specifier do I use to print it portably?
In 32-bit machine, %u seems right. I compiled with g++ -g -W -Wall -Werr..
I'm trying to understand the whole issue with CSRF and appropriate ways to prevent it. (Resources I've read, understand, and agree with: OWASP CSRF Prevention CHeat Sheet, Questions about CSRF.)
As I..
I have a JSP page with an HTML form:
<form action="SERVLET">
<input type="text" name="name"/><br>
<input type="text" name="group"/>
<input type="text" n..
I'm pulling in the XML from Twitter via OAuth.
I'm doing a request to http://twitter.com/account/verify_credentials.xml, which returns the following XML:
<?xml version="1.0" encoding=&quo..
I've been working on making my custom camera activity on Android, but when rotating the camera, the aspect ratio of the surface view gets messed up.
In my oncreate for the activity, I set the framela..
I am new to Elasticsearch and have been entering data manually up until this point. For example I've done something like this:
$ curl -XPUT 'http://localhost:9200/twitter/tweet/1' -d '{
"user" : ..
I am trying to make a simple calculator to determine whether or not a certain year is a leap year.
By definition, a leap year is divisible by four, but not by one hundred, unless it is divisible by ..
I am having some difficulty compiling a C++ program that I've written.
This program is very simple and, to the best of my knowledge, conforms to all the rules set forth in the C++ Standard. I've rea..
I have a data frame with several columns; some numeric and some character. How to compute the sum of a specific column? I’ve googled for this and I see numerous functions (sum, cumsum, rowsum, rowS..
Unfortunately the names of these methods make terrible search terms, and I've been unable to find a good resource that explains the difference between these methods--as in when to use each.
Thanks.
..
I'm worried that this is a runtime exception so it should probably be used sparingly.
Standard use case:
void setPercentage(int pct) {
if( pct < 0 || pct > 100) {
throw new Illegal..
I am trying to simulate a problem we have with a particular domain ID which has issues accessing a subversion repository. Towards this, I tried a svn checkout with the
option --username domain\proble..
I want to repeatedly execute a function in Python every 60 seconds forever (just like an NSTimer in Objective C). This code will run as a daemon and is effectively like calling the python script every..
This has always confused me. It seems like this would be nicer:
my_list = ["Hello", "world"]
print(my_list.join("-"))
# Produce: "Hello-world"
Than this:
my_list = ["Hello", "world"]
print("-".joi..
I was refactoring some old code of mine and came across of this:
alist.sort(cmp_items)
def cmp_items(a, b):
if a.foo > b.foo:
return 1
elif a.foo == b.foo:
return 0
el..
I had a project in tfs within a team project then we moved the project to a different location in another team project.
I had configured Jenkins to connect to the team project and build my solution b..
I'm trying to transition on hover with css over a thumbnail so that on hover, the background gradient fades in. The transition isn't working, but if I simply change it to an rgba() value, it works fin..
I'm trying to do something that I believe should be possible, but I really can't understand how to do it just from the webpack documentation.
I am writing a JavaScript library with several modules th..
All I want to do is to check whether an element exists in the vector or not, so I can deal with each case.
if ( item_present )
do_this();
else
do_that();
..
I have a JS code in which when you change a field it calls a search routine. The problem is that I can't find any jQuery events that will fire when the Datepicker updates the input field.
For some re..
How should I be passing query string values in a jQuery Ajax request? I currently do them as follows but I'm sure there is a cleaner way that does not require me to encode manually.
$.ajax({
url:..
After reading some material on this subject I'm still not sure what the difference between a compiled language and an interpreted language is. I was told this is one of the differences between Java an..
I wanted to update my python 2.6.1 to 3.x on mac but i was wondering if its possible to do it using terminal or i have to download the installer from python website?
The reason why i am asking this ..
I am looking for a text editor that will be able to load a 4+ Gigabyte file into it. Textpad doesn't work. I own a copy of it and have been to its support site, it just doesn't do it. Maybe I need ..
I have a to compare dates in 2 tables but the problem is that one table has the date in DD-Mon-YY format and the other in YYYYMM format.
I need to make both of them YYYYMM for the comparison.
I need..
I am looking to get a random record from a huge (100 million record) mongodb.
What is the fastest and most efficient way to do so? The data is already there and there are no field in which I can gene..
In stackoverflow, when we hover on a user's reputation we see a text. I have seen this at many places and the source code tells me that it can be done without js. And i tried and got only this-
<..
I have a simple batch file like this:
echo off
taskkill /im "test.exe" /f > nul
pause
If "test.exe" is not running, I get this message:
ERROR: The process "test.exe" not found.
Why does this..
Is there a way in jQuery to loop through or assign to an array all of the classes that are assigned to an element?
ex.
<div class="Lorem ipsum dolor_spec sit amet">Hello World!</div>
I..
This Question is almost the same as the previously asked Get the IP Address of local computer-Question. However I need to find the IP address(es) of a Linux Machine.
So: How do I - programmatically i..
I've just install Redis succesfully using the instructions on the Quick Start guide on http://redis.io/topics/quickstart on my Ubuntu 10.10 server. I'm running the service as dameon (so it can be run..
I am struggling for a few days with this issue and I can't figure out how can I fix it.
I would like to group by my table on values 1,2,3,4,5 so I have created a temporary table with this values.
No..
I don't like the default button style. It's really boring. I am using
<input type="submit">
type buttons. Can I style these somehow in css? If not, the other way of doing it i guess would be..
If I have a string
00020300504
00000234892839
000239074
how can I get rid of the leading zeroes so that I will only have this
20300504
234892839
239074
note that the number above was generated r..
Using jQuery, how do you check if there is an option selected in a select menu, and if not, assign one of the options as selected.
(The select is generated with a maze of PHP functions in an app I ju..
I need the fastest way to get the first day of the week. For example: today is the 11th of November, and a Thursday; and I want the first day of this week, which is the 8th of November, and a Monday. ..
I am starting to use MVC4 Web API project, I have controller with multiple HttpPost methods. The Controller looks like the following:
Controller
public class VTRoutingController : ApiController
{
..
Can I do Android programming in C++, C? If the answer is "yes" then please tell how? And what's the procedure to set up?
I don't know Obj-C, Java, but well-versed in C, C++, Flash AS3, SDK released b..
Tried to perform REST GET through python requests with the following code and I got error.
Code snip:
import requests
header = {'Authorization': 'Bearer...'}
url = az_base_url + az_subscription_id +..
Lets say,
i want to import/upload excel file to mysql from PHP
My HTML is like below
<form enctype="multipart/form-data" method="post" role="form">
<div class="form-group">
&..
I have an application installed on my machine. I also have its source code but somehow the ProductCode and UpgradeCode of this application were changed.
Now I want to get the UpgradeCode and ProductC..
I have an Excel Workbook that on Form Button click I need to save a copy of the workbook to the user's Desktop.
Originally everything was going to be on a shared Network folder, but now I have about ..
Coda Hale's article "How To Safely Store a Password" claims that:
bcrypt has salts built-in to prevent rainbow table attacks.
He cites this paper, which says that in OpenBSD's implementati..
from mechanize import Browser
br = Browser()
br.open('http://somewebpage')
html = br.response().readlines()
for line in html:
print line
When printing a line in an HTML file, I'm trying to find a ..
I have the following input field :
<input mdInput placeholder="Name" #filterName name="filterName" >
I want to clear value on click of clear button :
<button (click)="clearFilters()">C..
I am trying to add certificate Authority (CA) file name - ca.crt to /etc/ssl/certs, for that I followed this article.
I copied my ca.crt file to /etc/pki/ca-trust/source/anchors/ and run the command..
I have gotten the following error:
type object 'datetime.datetime' has no attribute 'datetime'
On the following line:
date = datetime.datetime(int(year), int(month), 1)
Does anybody know the ..
Given the following how do i make my last column auto size to its content?
(The last column should autosize-width to the content. Suppose i have only 1 li element it should shrink vs. having 3 li elem..
For templates I have seen both declarations:
template < typename T >
template < class T >
What's the difference?
And what exactly do those keywords mean in the following example (take..
I have an array where I want to search the uid and get the key of the array.
Examples
Assume we have the following 2-dimensional array:
$userdb = array(
array(
'uid' => '100',
..
I get 2 classes in package P. Interface class A and its implementation class B.
In the file with class B I get the following error: The type java.lang.CharSequence cannot be resolved. It is indirectl..
When I build XML up from scratch with XmlDocument, the OuterXml property already has everything nicely indented with line breaks. However, if I call LoadXml on some very "compressed" XML (no line bre..
The Swift Programming Language guide has the following example:
class Person {
let name: String
init(name: String) { self.name = name }
var apartment: Apartment?
deinit { println("\(..
Well, hopefully the question is self-explanatory.
It's so easy to select a block of code and tab out, but how about the reverse?
Currently, I just search & replace for whitespace at the beginnin..
I have an application with Symfony2 (2.2). When I want to send a mail, I'm having trouble with the paths, which are all relative paths and obviously aren't working inside emails
for rendering the pat..
I'm experimenting in connecting a C# app to an MDF database for the first time, and I need a little help ..
I made a small MDF database file in Visual Studio 2010, then created another project and im..
I want to add a vertical scrollbar to my <div>. I've tried overflow: auto, but it is not working. I've tested my code in Firefox and Chrome.
I'm pasting the div style code here:
float: left;
..
I would like to know the command to perform a mysqldump of a database without the prompt for the password.
REASON:
I would like to run a cron job, which takes a mysqldump of the database once everyda..
UPDATE 2:
I have now removed the following from the .php file:
<?php error_reporting( E_ALL ); ?>
I have set display_erros in php.ini as follows:
display_errors = On
Error reporting is..
I simply need to select the last entered row specified by condition, e.g:
SELECT ID from bugs WHERE user=Me
I need to return only the very last ID entered by user 'Me'. Is there a simple way to do ..
I want to make a material design circular progress bar like the one in Inbox by Gmail android app. How do I achieve this (in pre-lollipop devices)?
Am trying to achieve a similar effect like this.
Inb..
Let's say I have a list a in Python whose entries conveniently map to a dictionary. Each even element represents the key to the dictionary, and the following odd element is the value
for example,
a ..
I am sure this has been asked before but I cannot find the answer.
I have an AngularJS script that is pulling from a DB and then rendering to content. Everything is working correctly except a couple..
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...
I am trying to set up IIS web services and ASP.NET services on Windows Server 2008 R2. The physical directory was created, but I cannot get it to work. This is a fresh IIS Role installation.
The se..
I have a script to which I pass server name(s) in $args.
This way I can do stuff to this (these) server(s) using foreach:
.\script.ps1 host1 host2 host3
foreach ($i in $args)
{
Do-Stuff $i
}
..
I've been looking into this for a bit now and haven't gotten it resolved. I get the following error message:
Compiler Error Message: CS1705: Assembly 'My.Model, Version=1.1.4422.23773, Culture=neutra..
I have been looking everywhere how to play a ringtone/alarm sound in Android.
I press a button and I want to play a ringtone/alarm sound. I could not find an easy, straightforward sample. Yes, I alr..
Hey there i started learning C# a few days ago and I'm trying to make a program that copies and pastes files (and replaces if needed) to a selected directory but I don't know how to get the directory ..
How do you multiply a BigDecimal by an integer in Java? I tried this but its not correct.
import java.math.BigDecimal;
import java.math.MathContext;
public class Payment {
int itemCost;
int ..
I'm currently using FontAwesome, and am having a really hard time centering the icons both vertically and horizontally in their container. I have tried doing it via positioning and ran into issues bc..
I have made a program that divides numbers and then returns the number, But the thing is that when it returns the number it has a decimal like this:
2.0
But I want it to give me:
2
so is there a..
I am starting a service from my main Android activity as follows:
final Context context = base.getApplicationContext();
final Intent intent = new Intent(context, MyService.class);
startService(intent..
My code:
import simplejson as json
s = "{'username':'dfdsfdsf'}" #1
#s = '{"username":"dfdsfdsf"}' #2
j = json.loads(s)
#1 definition is wrong
#2 definition is right
I heard that in Python that ..