I know that I can rename my webapp (or it's WAR file) to ROOT but this is a terrible way to do it, IMHO. Now I checked out the tomcat doc & it says
It is NOT recommended to place elements di..
I'm trying to extract the APK file of an installed Android app WITHOUT root permissions.
I thought that this was impossible, because all APK files for non-system-apps are located in /data/app, and ac..
I'm ready to scream how hard can this be? I've been trying for too long.
If I have http://www.example.com/more/pages/page.php or similar I want to be able to get
www.example.com.
Thats all. So I can..
so, i'm trying to push some files to /system on android device (zte)
I've rooted, connected with ADB,
adb remount -> I get permission denied
adb shell su -> I'm able to access shell and create folde..
Problem: frequently the first command I type to my boxes is su -.
Question: how do I make vagrant ssh use the root user by default?
Version: vagrant 1.6.5..
I am trying to import two certificates to my local machine using the command line.
I have one certificate to add to the Personal Store of the local machine, and another one to add to the Trusted Root..
I just installed Ubuntu 16.04 and installed web server on it. Everything works well, but I cannot access database.
Even if I create new user and grant all privileges, I can't create database
In PHP I'..
I'm trying to run a bash script in Cygwin.
I get Must run as root, i.e. sudo ./scriptname errors.
chmod 777 scriptname does nothing to help.
I've looked for ways to imitate sudo on Cygwin, to..
I am continuously receiving this error.
I am using mySQL Workbench and from what I am finding is that root's schema privileges are null. There are no privileges at all.
I am having troubles across p..
I am trying to change MySql root password.
What I have done is below.
Install MySql-5.7.6 ~ .dmg(Community Server) and workbench.
Turn off the server on OSX System preferences.
Access MySql with co..
Basic question on ADB.
adb root restarts adb as root. But what i want is to restart it back to user after some time.
I tried the following :
adb kill-server
adb start-server
doesnt work..
ps -A ..
BY default when you run
docker run -it [myimage]
OR
docker attach [mycontainer]
you connect to the terminal as root user, but I would like to connect as a different user. Is this possible? ..
I have All Android SDK versions(from 1.5 to 2.3.3), and I tried many methods for getting root in Android emulator. I don't use any Android device and test everything on emulator(AVD).
I need to get r..
I have an Android-based phone (2.3.6) with unlocked root privileges.
Since i'd like to have access to my phone through my computer, today i've installed QtAdb and Android SDK.
If i open a command prom..
I'm trying to view the files and folders at root level on an android device using USB Debugging mode and windows. Is this possible? Phone is rooted.
I've downloaded a file explorer app which allows m..
It's very annoying to have this limitation on my development box, when there won't ever be any users other than me.
I'm aware of the standard workarounds, but none of them do exactly what I want:
a..
I'm writing a script that requires root level permissions, and I want to make it so that if the script is not run as root, it simply echoes "Please run as root." and exits.
Here's some pseudocode for..
I have XML in the form of a String that contains
<message>HELLO!</message>
How can I get the String "Hello!" from the XML? It should be ridiculously easy but I am lost. The XML isn't ..
I run XAMPP,
a few days back i had set up a password for the root password through phpmyadmin
I am not able to access phpMyAdmin ever since that moment
I followed help on this link but everything see..
I have been trying to reset my MySQL root password. I have run the mysqld_safe --skip-grant-tables, updated the root password, and checked the user table to make sure it is there. Once restarting th..
Just to confirm, is using:
$_SERVER["DOCUMENT_ROOT"]
the same as using: /
in HTML.
Eg. If current document is:
folder/folder/folder/index.php
I could use (in HTML) to start at the roort:
/som..
I'm writing an android app that needs to copy a file to the "/system" partition at runtime. I've got the commands to run "su" and can successfully request SuperUser permissions and run commands as roo..
My app has a certain piece of functionality that will only work on a device where root is available. Rather than having this feature fail when it is used (and then show an appropriate error message to..
I rooted my unlocked Galaxy S3 (SGH-T999)
Now, I'm trying to run adb root from Windows Command Prompt, however, I'm getting adbd cannot run as root in production builds error. So, the very first thin..
This is I think a simple problem but not getting the solution yet. I would like to get the valid numbers only from a column as explained here.
Lets say we have a varchar column with following values
..
I added a navigation control to switch between views in my app. But some of the views shouldn't have 'Back' (the previous title) button. Any ideas about how to hide the back button?..
The Problem is that i am able to run my app when i change to debug mode but it fails when i switch to release mode.
Exception:
**FAILURE: Build failed with an exception.**
> Execution failed for ..
I want to get a string that represents a json like this one:
{ "votes": { "option_A": "3" } }
and include a "count" key in it so it ends like this:
{ "vot..
I was wondering if it's possible to make a pointer not a pointer..
The problem is I have a function that accepts a pointer for an paramater for me to easily get a value to that pointer. It's a simple..
In Ansible I've used register to save the results of a task in the variable people. Omitting the stuff I don't need, it has this structure:
{
"results": [
{
"item": {
..
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..
I need Notepad++ to take a json string from this
{"menu": {"id": "file","value": "File","popup": {"menuitem": [{"value": "New", "onclick": "CreateNewDoc()"},{"value": "Open", "onclick": "OpenDoc()"},..
Possible Duplicate:
Saving image from PHP URL
I have an image as a url link from the 3rd party web thumb site (IE http://images.websnapr.com/?size=size&key=Y64Q44QLt12u&url=http://g..
I have PSQL running, and am trying to get a perl application connecting to the database. Is there a command to find the current port and host that the database is running on?..
I've been playing around with Docker for a while and keep on finding the same issue when dealing with persistent data.
I create my Dockerfile and expose a volume or use --volumes-from to mount a host..
I have an XML document that I would like to update after it already contains data.
I thought about opening the XML file in "a" (append) mode. The problem is that the new data will be written after th..
I am getting an unexpected end of file error on my CodeIgniter View.
I have pasted the PHP code at http://codepad.org/S12oXE4t.
This code passed various online PHP syntax tests, but I don't know why..
As part of my Selenium test for a login function, I would like to click a button by identifying its coordinates and instructing Selenium to click at those coordinates. This would be done without ident..
I write a fair amount of linq in my day to day life, but mostly simple statements. I have noticed that when using where clauses, there are many ways to write them and each have the same results as fa..
Is there a preferred way to return multiple values from a C++ function? For example, imagine a function that divides two integers and returns both the quotient and the remainder. One way I commonly ..
I am new to this node.js ..I am little bit confused about this callback..In my app inside a for loop i am calling a asynchronous function call,i think my problem is that before i am getting response o..
I have conflicting branches, branch2 branched from branch1.
Let's say when rebasing branch2 on current branch1, while resolving conflicts, I decide to take some (not all) of "their" (i.e. branch1) fi..
I am experimenting with the support library's recyclerview and cards. I have a recyclerview of cards. Each card has an 'x' icon at the top right corner to remove it:
The card xml, list_item.xml:
&..
How do I set up Selenium to work with Python? I just want to write/export scripts in Python, and then run them. Are there any resources for that? I tried googling, but the stuff I found was either ref..
My questions is
how to increment a column's value by 1.
For example, suppose a column ID has values 1,2,3,4, ..
Now when I update this table then ID column should increment by 1,
Now ID will b..
I have two excel files with the same structure: they both have 1 column with data. One has 800 records and the other has 805 records, but I am not sure which of the 5 in the 805 set are not in the 8..
I would like to get the DATETIME column from an Oracle DB Table with JDBC. Here is my code:
int columnType = rsmd.getColumnType(i);
if(columnType == Types.DATE)
{
Date aDate = rs.getDate(i);
..
Can someone please explain why the code below does not work when setting the facecolor of the figure?
import matplotlib.pyplot as plt
# create figure instance
fig1 = plt.figure(1)
fig1.set_figheight..
I'm trying to install TensorFlow using pip:
$ pip install tensorflow --user
Collecting tensorflow
Could not find a version that satisfies the requirement tensorflow (from versions: )
No matching dist..
I am using Google notifications in my app, and until now I have done below in the manifest:
<!-- GCM -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" /> <!-- GCM req..
What is the best way to read Excel (XLS) files with Python (not CSV files).
Is there a built-in package which is supported by default in Python to do this task?..
I'm a PHP developer and now I use Notepad++ for code editing, but lately I've been searching for an IDE to ease my work.
I've looked into Eclipse, Aptana Studio and several others, but I'm not really..
I spent quite a lot of time trying to figure out why video embedded like here:
<video height="256" loop autoplay muted controls id="vid">
<source type="video/mp4" src="video_file.mp..
I want to download all files (html, images, js, css) from one website. I can download each and every file separately.
I tried in Google Chrome, after clicking on the view source, then ctrl + s then ..
How can I download only a specific folder or directory from a remote Git repo hosted on GitHub?
Say the example GitHub repo lives here:
[email protected]:foobar/Test.git
Its directory structure:
Tes..
Im new to python and i need some help with this.
TASK : given a list --> words = ['aba', 'xyz', 'xgx', 'dssd', 'sdjh']
i need to compare the first and the last element of each string in the list, ..
I'm having a bit of a mind blank on this at the moment.
I've got a problem where I need to calculate the position of points around a central point, assuming they're all equidistant from the center and..
I'm looking to place a video in an HTML5 page that will begin playing on page-load, and once completed, loop back to the beginning without a break. The video should also NOT have any controls associat..
In python, what's the best way to test if a variable contains a list or a tuple? (ie. a collection)
Is isinstance() as evil as suggested here? http://www.canonical.org/~kragen/isinstance/
Update: th..
I'm trying to execute multiple commands without create a new process each time. Basically, I want to start the DOS command shell, switch to the MySQL command shell, and execute a command. Here's how I..
In an attempt to fully understand how to solve Java's multiple inheritance problems I have a classic question that I need clarified.
Lets say I have class Animal this has sub classes Bird and Horse a..
I want to edit multiple lines and every "word" within that line. For example:
45 28 42 65
24 87 47 95
01 25 87 98
I want to select every whole number in all lines and put a "0x" before it so it wou..
I'm writing a VBA code which supposed to delete the data on a selected excel sheet, open a dialog box for text file selection, and then import the data from that text file to the same exact sheet I've..
I am learning JavaScript and I have learned recently about JavaScript timing events. When I learned about setTimeout at W3Schools, I noticed a strange figure which I didn’t run into before. They are..
I have a div with default positioning (i.e. position:static) and a div with a fixed position.
If I set the z-indexes of the elements, it seems impossible to make the fixed element go behind the static..
I have a Date object. How do I render the title portion of the following snippet?
<abbr title="2010-04-02T14:12:07">A couple days ago</abbr>
I have the "relative time in words" portion ..
When I use position relative with no content, footer goes up, with absolute with a lot of content, the footer goes down, and with fixed it is always there.
Is there a easy way to get at the end of t..
I try to make a PDF writing CSS and HTML but my CSS doesn't appear in my PDF. The only thing considered is the font-size and font-color.
I give you the code (sorry, it's a little long...)
$config = ..
I have a list of strings defined like this:
var list = ["one", "two", "three", "four"];
I want to render the values on the screen side by side using text widgets. I have attempted to use the follo..
How can I write a little piece of text into a .txt file?
I've been Googling for over 3-4 hours, but can't find out how to do it.
fwrite(); has so many arguments, and I don't know how to use it.
What..
I'm trying to create a websocket server written in node.js
To get the server to work I need to get the SHA1 hash of a string.
What I have to do is explained in Section 5.2.2 page 35 of the docs.
..
I have a SQL Server table that contains users & their grades. For simplicity's sake, lets just say there are 2 columns - name & grade. So a typical row would be Name: "John Doe", Grade:"A".
I..
When i execute the following query, i get the message like
"Ora-01427 single-row subquery returns more than one row"
SELECT E.I_EmpID AS EMPID,
E.I_EMPCODE AS EMPCODE,
E.I_EmpName..
I have a query that returns a very large data set. I cannot copy and paste it into Excel which I usually do. I have been doing some research on how to export directly to an Excel sheet. I am running S..
How can I automatically replace all instances of multiple spaces, with a single space, in Javascript?
I've tried chaining some s.replace but this doesn't seem optimal.
I'm using jQuery as well, in c..
I've recently had to switch encoding of webapp I'm working on from ISO-xx to utf8. Everything went smooth, except properties files. I added -Dfile.encoding=UTF-8 in eclipse.ini and normal files work f..
I'm getting IOError: [Errno 13] Permission denied and I don't know what is wrong wit this code.
I'm trying to read a file given an absolute path (meaning only file.asm),
and a relative path (meaning..
I learned how to use the comparable but I'm having difficulty with the Comparator. I am having a error in my code:
Exception in thread "main" java.lang.ClassCastException: New.People cannot be cast ..
I'm using a WordPress site.
I'm including this script in the header.
When the script loads, I get this error:
TypeError: 'undefined' is not a function (evaluating '$(document)')
I have no ide..
What is the best way to split a string like "HELLO there HOW are YOU" by upper case words (in Python)?
So I'd end up with an array like such: results = ['HELLO there', 'HOW are', 'YOU']
EDIT:
I..
I want to write a code in python to solve a sudoku puzzle. Do you guys have any idea about a good algorithm for this purpose. I read somewhere in net about a algorithm which solves it by filling the w..
I'm fairly new to Python and NLTK. I am busy with an application that can perform spell checks (replaces an incorrectly spelled word with the correct one).
I'm currently using the Enchant library on P..
I am little confused with the applicability of reinterpret_cast vs static_cast. From what I have read the general rules are to use static cast when the types can be interpreted at compile time hence t..
I tried to update MySQL from 5.1 to 5.5 in CentOS 6.2. The following is the process I did:
1. rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm
2. yum install libmysqlclient15 --enablerepo=we..
How do I install PHP cURL on Linux Debian?
I tried the following code and got the error below
apt-get update
apt-get install curl libcurl3 php5-curl
Error:
W: Failed to fetch http://zm.archive.ub..
I am trying to install matplotlib in a new virtualenv.
When I do:
pip install matplotlib
or
pip install http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.1.0/matplotlib-1..
Yesterday my app was running perfect from Android Studio but today when I started working on my app and running it i am getting error message continuously
Installation failed with message Failed t..
While writing this answer, I had to match exclusively on linebreaks instead of using the s-flag (dotall - dot matches linebreaks).
The sites usually used to test regular expressions behave differen..
I am trying just a basic program with OpenCV with the following code:
#include "cv.h"
#include "highgui.h"
int main()
{
IplImage* newImg;
newImg = cvLoadImage("~/apple.bmp", 1);
cvNamedW..
I had this previously in my normal mysql_* connection:
mysql_set_charset("utf8",$link);
mysql_query("SET NAMES 'UTF8'");
Do I need it for the PDO? And where should I have it?
$connect = new PDO("m..
I'm an angularjs new bee. I'm trying to write a validation which alerts the user when he tries to close the browser window.
I have 2 links on my page v1 and v2.When clicked on the links it takes to t..
Google's "Report a Bug" or "Feedback Tool" lets you select an area of your browser window to create a screenshot that is submitted with your feedback about a bug.
Screenshot by Ja..
What solutions accomplish the same auto-completion that SO uses for entering tags?
There are plugins that can handle one word but I haven't seen any that handle multiple words...
I want to display some content conditionally based on Roles using Spring Security JSP taglibs.
But in Spring Security 3.1.x is checking for only one role.
I can use but ifAllGranted is deprecated.
..
I'm trying to put a Twitter share link in an email. Because this is in an email I can't rely on JavaScript, and have to use the "Build Your Own" Tweet button.
For example, sharing a link to..
I'm using Bootstrap 3 and trying to setup the following accordion/collapse structure:
Onload: Each accordion panel in a group is fully collapsed and functions as documented/expected.
Button click: E..
I have started using the md-table for my project, and I want fixed column width. Currently all columns width are divided into equal size.
Where can I get the documentation of data table dimensions?
..
I have a string as
string = "firstName:name1, lastName:last1";
now I need one object obj such that
obj = {firstName:name1, lastName:last1}
How can I do this in JS?..
I wonder, if there is any annotation for a Filter class (for web applications) in Spring Boot? Perhaps @Filter?
I want to add a custom filter in my project.
The Spring Boot Reference Guide mentione..
I am getting HRESULT: 0x800A03EC on Worksheet.range method. Number of rows are more than 70K. Office 2007.
Code:
Microsoft.Office.Interop.Excel.Range neededRange
= currentWS.Range[cell.Cells[1, ..
I would like to be able to do something like:
AOEU=$(echo aoeu)
and have Jenkins set AOEU=aoeu.
The Environment Variables section in Jenkins doesn't do that. Instead, it sets AOEU='$(echo aoeu)'.
..
I have a table in SQL Server. I would like to delete the top 1000 rows from it. However, I tried this, but I instead of just deleting the top 1000 rows it deleted all the rows in the table.
Here is..
Since downloading the latest SDK and installing Android Studio, my project fails to build. I get the following message:
Error:Gradle: Execution failed for task ':SampleProject:processProdDebugManifes..
My first PhoneGap application includes 2 HTML files.
The first one is named index.html which uses index.js. This file will display a list item. When I click an item in that list, it brings me to det..
i have the following login.html page for login located in design folder.
<html>
<head>
<title>Login Page</title>
<script src="../Script/login.js">
</script&..
I have Oracle 10g installed and there is a package which has a number of cursors and procedures, how do I debug one of these procedures or cursors. Can you please provide steps for that?
I ran a Goog..
In R, what is the most efficient/idiomatic way to count the number of TRUE values in a logical vector? I can think of two ways:
z <- sample(c(TRUE, FALSE), 1000, rep = TRUE)
sum(z)
# [1] 498
tabl..
It's weird that this is the first time I've bumped into this problem, but:
How do you define a constructor in a C# interface?
Edit
Some people wanted an example (it's a free time project, so yes, it..
I have a week number and a year, and would like to calculate the date of the Monday for that specific week in Microsoft Excel.
Year Week Date (Monday)
2012 1 January 2, 2012
2013 16 ..
I cannot figure out how to manually set up a legend for this plot. All I really want is a simple legend to the right that uses the three colors and has a name next to each.
The current code looks l..
I need to execute an action (emptying an array), when the back button of a UINavigationController is pressed, while the button still causes the previous ViewController on the stack to appear. How coul..
A common task when calling web resources from a code is building a query string to including all the necessary parameters. While by all means no rocket science, there are some nifty details you need t..
I currently use the following Perl to check if a variable is defined and contains text. I have to check defined first to avoid an 'uninitialized value' warning:
if (defined $name && length $n..
Please consider the below piece of code:
HashSet hs = new HashSet();
hs.add("hi"); -- (1)
hs.add("hi"); -- (2)
hs.size() will give 1 as HashSet doesn't allow duplicates so only one element will be ..
I have this older Angular code which works but not in the latest version of Angular 6.
<div ng-mouseover="changeText=true" ng-mouseleave="changeText=false" ng-init="changeText=false">
<spa..
I have a list with 15 numbers in, and I need to write some code that produces all 32,768 combinations of those numbers.
I've found some code (by Googling) that apparently does what I'm looking for, ..
I have a stored procedure that returns 80 columns, and 300 rows. I want to write a select that gets 2 of those columns. Something like
SELECT col1, col2 FROM EXEC MyStoredProc 'param1', 'param2'
..
I'm looking for a formula which allows me to look at a cell and check if it greater than or equal to today's date and to return a worded result such as "overdue". If it is blank to return another word..
imagine what we have something like this:
<div id="xxx"><p>Hello World</p></div>
if we call .html function in this way:
$("#xxx").html();
we will get:
<p>Hello Wor..
def gradient(X_norm,y,theta,alpha,m,n,num_it):
temp=np.array(np.zeros_like(theta,float))
for i in range(0,num_it):
h=np.dot(X_norm,theta)
#temp[j]=theta[j]-(alpha/m)*( np.sum(..
For this two imports;
import sun.misc.BASE64Encoder;
import sun.misc.BASE64Decoder;
I got this error:
Access restriction: The type BASE64Decoder is not accessible due to restriction on required li..
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 ..
I'am new to C and would like to play with threads a bit. I would like to return some value from a thread using pthread_exit()
My code is as follows:
#include <pthread.h>
#include <stdio.h&g..
On the front page of a site I am building, several <div>s use the CSS :hover pseudo-class to add a border when the mouse is over them. One of the <div>s contains a <form> which, usin..
I am looking for a tool, that shows my website in a mobile device mode. Also I want to debug my website with tools like Firebug or ... even better I can use Firebug.
What is an established solution to..
I need to compare two lists in order to create a new list of specific elements found in one list but not in the other. For example:
main_list=[]
list_1=["a", "b", "c", "d", "e"]
list_2=["a", "f", "c"..
When I am compiling my .csproj file using .NET Framework 4.0 MSBUILD.EXE file, I am getting an error: "lable01" not found in the current context of "website01.csproj".
Actually, I ..
I'm having problems dealing with unicode characters from text fetched from different web pages (on different sites). I am using BeautifulSoup.
The problem is that the error is not always reproducibl..
From all the material I used to learn C++, auto has always been a weird storage duration specifier that didn't serve any purpose. But just recently, I encountered code that used it as a type name in ..
How can I get a list of unique values in an array? Do I always have to use a second array or is there something similar to java's hashmap in JavaScript?
I am going to be using JavaScript and jQuery o..
Using jquery and the Bootstrap Datepicker, how do I get the new date value I selected using the Bootstrap Datepicker?
FYI, I'm using Rails 3 and Coffescript.
I set up the datapicker using:
<inpu..
I'm trying to get a series of elements to fade in on scroll down when they are fully visible in the window. If I keep scrolling down, I do not want them to fade out, but if I scroll up, I do want them..
Does anyone know how to convert a string from ISO-8859-1 to UTF-8 and back in Java?
I'm getting a string from the web and saving it in the RMS (J2ME), but I want to preserve the special chars and get..
I'm finding my feet with Hibernate Annotations and I've hit a problem I hope someone can help with.
I have 2 entities, Section and ScopeTopic. The section has a List class member, so a One to Many re..
The following code snippets are from a C program.
The user enters Y or N.
char *answer = '\0';
scanf (" %c", answer);
if (*answer == ('Y' || 'y'))
// do work
I can't figure out why this if s..
How could I do something like this:
<script type="text/javascript">
$(document).ready(function () {
if(window.location.contains("franky")) // This doesn't work, any suggestions?
{
..
I am using Jquery for getting a json object from a solr server. When I run my html file with Tomcat it is runns fine but when I embed it with my project which is running on weblogic it gets this erro..
Background: I am writing a python program which should manage my music files. It crawls directories and puts the files and their meta data (via mutagen), encoded in JSON, in a file as a simple "databa..
Using this solution, I tried to use COALESCE as part of a MySQL query that outputs to a csv file using SELECT As to name the column names when exporting the data.
SELECT FirstName AS First_Name
..
Is there a way to statically/globally request a copy of the ApplicationContext in a Spring application?
Assuming the main class starts up and initializes the application context, does it need to pass..
Trying to convert a JSON string into an object in C#. Using a really simple test case:
JavaScriptSerializer json_serializer = new JavaScriptSerializer();
object routes_list = json_serializer.Deserial..
(gdb) n
134 a = b = c = 0xdeadbeef + ((uint32_t)length) + initval;
(gdb) n
(gdb) p a
$30 = <value optimized out>
(gdb) p b
$31 = <value optimized out>
(gdb) p c
$32 = 3735928563
How ca..
I was wondering if there was a way to initialize a dictionary in python with keys but no corresponding values until I set them. Such as:
Definition = {'apple': , 'ball': }
and then later i can set ..
In python how can you extend a class? For example if I have
color.py
class Color:
def __init__(self, color):
self.color = color
def getcolor(self):
return self.color
color_..
I am using a Bootstrap popover to create a hover card showing user info, and I am triggering it on mouseover of a button. I want to keep this popover alive while the popover itself is being hovered, b..
I'm currently working with a repository that has multiple branches.
When I create a tag, does that tag refer to the then-current branch?
In other words: Whenever I create a tag, do I need to switch ..
I just want to convert a FileInputStream to an InputStream, how can I do that?
e.g
FileInputStream fis = new FileInputStream("c://filename");
InputStream is = ?;
fis.close();
..
I have uploaded my localhost files to my website but it is showing me this error:-
: [2] file_put_contents( ***WebsiteURL*** /cache/lang/ ***FileName*** .php)
[function.file-put-contents]: failed to..
I have this page and I have users uploading an icon image for the industries and they are uploading a bigger image. I want to resize it via CSS and it's cutting it when changing it in Firebug. To see ..
I want to return a character array from a function. Then I want to print it in main. how can I get the character array back in main function?
#include<stdio.h>
#include<string.h>
int main..
I have been using ES6 Promise.
Ordinarily, a Promise is constructed and used like this
new Promise(function(resolve, reject){
if (someCondition){
resolve();
} else {
reject()..
numpy.distutils.system_info.BlasNotFoundError:
Blas (http://www.netlib.org/blas/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site..
If I have a navbar in bootstrap with the items
Home | About | Contact
How do I set the active class for each menu item when they are active? That is, how can I set class="active" when the angular r..
I need to implement JSON serialization for some objects, and I've encountered a problem when it came to integration with generic collections.
All serializable classes implement this interface (JSONO..
i am making a game and at the start it asks for your name. I want this name to be saved as varible. i have this html code:
<form id="form" onsubmit="return false;">
<input style=position:a..
I have a webpage where there is a textarea within an iframe. I need to read the value of this textarea from its child page using JavaScript.
Presently by using window.parent.getelementbyID().value in..
The MainActivity contains some buttons. Each button opens a new activity via an intent. These activities then have a button to return to the MainActivity via an intent.
But when I press a button to r..
I found a blog post on alias vs. alias_method. As shown in the example given in that blog post, I simply want to alias a method to another within the same class. Which should I use? I always see alias..
I have a question about JUnit assertEquals to test double values. Reading the API doc I can see:
@Deprecated
public static void assertEquals(double expected, double actual)
Deprecated. Use assertEqu..
I have the following problem. I have a Java project in my NetBeans IDE 6.8. When I compile it and it produces a .jar file containing everything possible, the META-INF is not right. It doesn't contain ..
I'd like to set up a function pointer as a member of a class that is a pointer to another function in the same class. The reasons why I'm doing this are complicated.
In this example, I would like the..
I want to write a program for a school java project to parse some CSV I do not know. I do know the datatype of each column - although I do not know the delimiter.
The problem I do not even marginally..
I recently installed rails in fedora 12. I'm new to linux as well. Everything works fine on Windows 7. But I'm facing lot of problems in linux. Help please!
I've installed all the essentials to my kn..
Im working with the programming language R now.
I have a vector:
a <- c("aa", "bb", "cc")
And I want to paste these to a system command, I'm trying it this way now:
args <- paste(a, sep=" ")..
i have a list of event Ids returned from an xml document as shown below
public IEnumerable<EventFeed> GetEventIdsByEventDate(DateTime eventDate)
{
return (from feed in xmlDoc.Desce..
Is there local file manipulation that's been done with JavaScript? I'm looking for a solution that can be accomplished with no install footprint like requiring Adobe AIR.
Specifically, I'd like to re..
I need to use something similar to php's isset function. I know php and java are EXTREMELY different but php is my only basis of previous knowledge on something similar to programming. Is there some k..
I've done some searching and can't figure out how to filter a dataframe by df["col"].str.contains(word), however I'm wondering if there is a way to do the reverse: filter a dataframe by that set's com..
I am trying to work on a large Javascript file in Jetbrains WebStorm 8 and I am getting a message at the top of the editing window that says:
File size exceeds configured limit (2560000). Code ins..
I am trying to find out if there is an alternative way of converting string to integer in C.
I regularly pattern the following in my code.
char s[] = "45";
int num = atoi(s);
So, is there a bette..
I have a template page expecting two forms. If I just use one form, things are fine as in this typical example:
if request.method == 'POST':
form = AuthorForm(request.POST,)
if form.is_valid..
I'm having trouble finding documentation for this. Is it Safari specific?
There was a recent bug in iOS 9 (here), the solution to which is adding shrink-to-fit=no to the viewport meta.
What does th..
I'm building a fairly simple application, research, in my Django project that uses Django-CMS. (It's my first ground-up attempt at a project/application.) It's main purpose is to store various intel..
I want to scale a System.Drawing.Bitmap to at least less than some fixed width and height. This is to generate thumbnails for an image gallery on a website, so I want to keep the aspect ratio the same..
I went through a lot of answers for this question.But it's all about single activity..How to check whether the whole app is running in foreground or not ?..
I want to write a test case to check my controller (getPersons). This is a server side code. I have confusion what should i put inside @ContextConfiguration(locations={"file:src/main/webapp/WEB-INF/ap..
I'm trying to make an ArrayList Parcelable in order to pass to an activity a list of custom object. I start writing a myObjectList class which extends ArrayList<myObject> and implement Parcelabl..
I have a new Win7 workstation and I am trying to get ScrewTurn Wiki to run on the machine. My STW installation is using the file system option to store its data, and as such I need to give write perm..
First, got "your branch is ahead of origin/master by 3 commits" then my app has reverted to an earlier time with earlier changes.
How can I get what I spent the last 11 hours doing back?..
To be specific, I was trying this code:
package hello;
public class Hello {
Clock clock = new Clock();
public static void main(String args[]) {
clock.sayTime();
}
}
But it ga..
Is there any way of auto importing (like in Eclipse Shift+Ctrl+O) in Android Studio?
I have found only Ctrl+Alt+O which ask for each thing, and I have to press Alt+Enter to accept it.
No way to do ..
I am used to Emacs, but I am trying out Vim to see which one I like better.
One thing that I like about Emacs is the ability to run a terminal inside Emacs. Is this possible inside of Vim? I know th..
I want to import data from an Excel file - assume Excel 2003 / .xls - to Sql Server 2008.
Have tried adding a linked server to the JET OLE DB Access driver, and of course it fails on the 64-bit machi..
I have an image that's 1300px wide, using bootstrap I want this image to fill the full width of my container which is set to 1300px. I create a row, give it a full 12 columns and then add in the image..
How do I draw different types of lines on gnuplot? I got to draw different colors. My script joins several files and I think it is why the lines are not dash. Only two of four are dashed.
Thanks
Felip..
I have a Python project and navigation/autocomplete work perfectly within files in the project. I want to specify a virtualenv so that navigation/autocomplete work with packages inside that virtualenv..
I am trying read a file and split a cell in each line by a comma and then display only the first and the second cells which contain information regarding the latitude and the longitude.
This is the fi..
I am working a front-end application with Angular 5, and I need to have a search box hidden, but on click of a button, the search box should be displayed and focused.
I have tried a few ways found on..
I'm trying to generate Java classes from the FpML (Finanial Products Markup Language) version 4.5. A ton of code is generated, but I cannot use it. Trying to serialize a simple document I get this:
j..
I have this model:
public class Event {
private String name;
private Date start;
private Date end;
}
and repository as
@Repository
public interface EventRepository extends JpaRepositor..
In flask, I can do this:
render_template("foo.html", messages={'main':'hello'})
And if foo.html contains {{ messages['main'] }}, the page will show hello. But what if there's a route that leads to ..
I have two columns in table users namely registerDate and lastVisitDate which consist of datetime data type. I would like to do the following.
Set registerDate defaults value to MySQL NOW()
Set last..
Is there any way to disconnect a client with SocketIO, and literally close the connection? So if someone is connected to my server, and I want to close the connection between them and my server, how w..
I have a web page which I have prevented the default action on all submit buttons, however I would like to re-enable default submit action on a button how can I do this?
I am currently preventing the..
My task is to add button dynamically to the div.. here is the code that i follow to add button dynamically but its not working please give me a solution for this
<!DOCTYPE html>
<html..
I'm trying to invoke a protected method from a class that implements the ApplicationListener<AuthenticationSuccessEvent> interface on successful login (Spring 3.2.2 and Spring Security 3.2.0 M1)..
Is there a simple way (instead of traversing manually all the string, or loop for indexOf) in order to find how many times, a character appears in a string?
Say we have "abdsd3$asda$asasdd$sadas" and..
I would like to have a table on my website. The problem is that this table will have about 400 lines. How can I limit the table's height, and apply scrollbar to it?
This is my code:
<div class="sp..
Before the new gallery access in Android 4.4 (KitKat) I got my real path on the SD card with this method:
public String getPath(Uri uri) {
String[] projection = { MediaStore.Images.Media.DATA };
..
In my Java application, I want to run a batch file that calls "scons -Q implicit-deps-changed build\file_load_type export\file_load_type"
It seems that I can't even get my batch file to execute. I'm ..
I have multiple text file with about 100,000 lines and I want to split them into smaller text files of 5000 lines each.
I used:
split -l 5000 filename.txt
That creates files:
xaa
xab
aac
xad
xbe..
It seems to be a mainstream opinion that assembly programming takes longer and is more difficult to program in than a higher level language such as C. Therefore it seems to be recommend or assumed tha..
In Oracle, I can re-create a view with a single statement, as shown here:
CREATE OR REPLACE VIEW MY_VIEW AS
SELECT SOME_FIELD
FROM SOME_TABLE
WHERE SOME_CONDITIONS
As the syntax implies, this will ..
I have an anchor with both HREF and ONCLICK attributes set. If clicked and Javascript is enabled, I want it to only execute ONCLICK and ignore HREF. Likewise, if Javascript is disabled or unsupported,..