I was wondering if there is any way to detect if a number is negative in PHP?
I have the following code:
$profitloss = $result->date_sold_price - $result->date_bought_price;
I need to find o..
Since my question is getting longer and longer, I decide to re-write the whole question to make it better and shorter.
I run my website on dedicated server with 8GB memory. I am fully aware that I ne..
I have the following structure with a MySQL table:
+----------------+----------------+----------+
| zipcode | city | state |
+----------------+----------------+----------+
| 1..
Lets say that I have a list
list = ['this','is','just','a','test']
how can I have a user do a wildcard search?
Search Word: 'th_s'
Would return 'this'..
I have a Django form with a RegexField, which is very similar to a normal text input field.
In my view, under certain conditions I want to hide it from the user, and trying to keep the form as simila..
Possible Duplicate:
Is there an easy way to convert String to Inetaddress in Java?
I'm trying to convert a string(representing an IP address, e.g. 10.0.2.50) into an InetAddress obj.
Acc..
I need to emulate a do-while loop in a Python program. Unfortunately, the following straightforward code does not work:
list_of_ints = [ 1, 2, 3 ]
iterator = list_of_ints.__iter__()
element = None
w..
What's the difference between:
Math.pow ( x,y ); // x^y
To:
x^y; // x^y
?
Will I prefer to use x^y with double type numbers? Or shell I have to use always with Math.pow() method?..
When I tried to alter the table it showed the error:
ERROR 1067 (42000): Invalid default value for 'created_at'
I googled for this error but all I found was as if they tried to alter the timestamp ..
By creating object like this
var condition=
{
where:
{
LastName:"Doe",
FirstName:["John","Jane"],
Age:{
gt:18
}
}
}
and pass it in
Student.findAll(condition)
...
In bash I want to return file name (and the path to the file) for every file of type .php|.html|.js containing the case-insensitive string "document.cookie" | "setcookie"
How would I do that?..
I'm searching a lightweight API (preferable single class) to convert a
Map<String,String> map = new HashMap<String,String();
to xml and, vice versa, convert the XML back to a Map.
example..
I'm looking for any manner of accessing the "parent" scope within a directive. Any combination of scope, transclude, require, passing in variables (or the scope itself) from above, etc. I'm totally ..
I decided to create simple isEven and isOdd function with a very simple algorithm:
function isEven(n) {
n = Number(n);
return n === 0 || !!(n && !(n%2));
}
function isOdd(n) {
return i..
I am migrating from Spring 2.5 to Spring 3.
They have introduced <mvc:annotation-driven /> which does some black magic. This is expected to be declared in servlet configuration file only.
In ..
I am developing on a windows machine. The only place I need for linux command line is Git Bash. The problem is: When I open it, I am in the home directory. I have to change the directory to my workspa..
I have an application which start in 0x0 position of my desktop. I want to open it in center of my desktop. I do not want to open it and use a move command to move it into center, just want my app to ..
I have two (or more) links. For example: http://google.com and http://yahoo.com.
How can I make them both open when I click on a single link?
For example, a link entitled "click here" which, when cl..
I have a database configuration class to connect my spring web service with the database. I'm using spring boot, to make it stand alone application.
Here is my class
@Configuration
@EnableTransactio..
Sometimes I rerun a script within the same ipython session and I get bad surprises when variables haven't been cleared. How do I clear all variables?
And is it possible to force this somehow every tim..
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 '..
I want to draw in Java's Canvas but can't get it work because I don't know what I'm doing. Here's my simple code:
import javax.swing.JFrame;
import java.awt.Canvas;
import java.awt.Graphics;
import ..
Is it possible to format an HTML tooltip?
E.g. I have a DIV with attribute title="foo!". When I have text-size of my browser zoomed in or out in, the text size of the tooltip remains unchanged. Is ..
I am a newbie in java and wanted to use curl in java. What is my question is curl built-in in java or I have to install it from any 3rd party source to use with Java. If so, how to install curl in jav..
I'm trying to come up with a more succinct expression for the "keyMapper" function parameter in the following Collectors.toMap() call:
List<Person> roster = ...;
Map<String, Person> map..
I've seen in many examples that sometimes a Seq is being used, while other times is the List...
Is there any difference, other than the former one being a Scala type and the List coming from Java?..
I have been reading a LOT of google posts and StackOverflow questions about how to restore a database in SQL Server from a .bak file.
But none of them states how to just READ the tables in the databa..
I've never really used threading before in C# where I need to have two threads, as well as the main UI thread. Basically, I have the following.
public void StartTheActions()
{
// Starting thread 1....
I'm a seventh grade programmer so I may be missing a lot of things in this program, but for my coding club my instructor asked us to make a guess the number game. I have very limited knowledge on this..
I have a scanning server I wrote in cgi/bash and want to be able to convert a bunch of images (all in one folder) to a pdf from the command line. How can that be done?..
I have an .html file with a login form and wish to recreate it and save it as a .php file. However, I'm encountering difficulties with setting the background image and other CSS related stuff.
Below..
What is the difference between 'SAME' and 'VALID' padding in tf.nn.max_pool of tensorflow?
In my opinion, 'VALID' means there will be no zero padding outside the edges when we do max pool.
Accordin..
I am trying to insert a chunk of HTML into a div. I want to see if plain JavaScript way is faster than using jQuery. Unfortunately, I forgot how to do it the 'old' way. :P
var test2 = function(){
..
I want to show a hidden div when scrolling down after 800px from the top of the page. By now I have this example, but I guess it needs modification in order to achive what I am looking for.
EDIT:
[A..
What is the correct way to make git ignore temporary files produced by vim in all directories (either globally across the system or locally for a single project)?..
Does any one know how I can specify the Default value for a DateTime property using the System.ComponentModel DefaultValue Attribute?
for example I try this:
[DefaultValue(typeof(DateTime),DateTime...
I want to hide form code from view code/inspect element browser , how can i do that ?
This is my code, please see below:
<div style=" text-align: center; padding: 300px; font-family: lato; ">..
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..
I have a requirement to find and extract a number contained within a string.
For example, from these strings:
string test = "1 test"
string test1 = " 1 test"
string test2 = "test 99"
How can I do ..
How can I randomize lots of rows in Excel?
For example I have an excel sheet with data in 3 rows.
1 A dataA
2 B dataB
3 C dataC
I want to randomize the row order. For example
2 B dataB
1 A dataA
..
I am using the new TextInputLayout from the design library. I am able to get it to show and to change the color of the floating label. Unfortunately the actual EditText hint is now always white.
I h..
Suddenly I started to get error when I try to open my dropdown menu :
bootstrap.min.js:6 Uncaught Error: Bootstrap dropdown require Popper.js (https://popper.js.org)
at bootstrap.min.js:6
..
I would like to be able to assign a xml attribute or style to a TextView that will make whatever text it has in ALL CAPITAL LETTERS.
The attributes android:inputType="textCapCharacters" and android:c..
I want to animate a <div> from 200px to auto height. I can’t seem to make it work though. Does anyone know how?
Here’s the code:
$("div:first").click(function(){
$("#first").animate({
..
Looking at the last JUnit test case I wrote, I called log4j's BasicConfigurator.configure() method inside the class constructor. That worked fine for running just that single class from Eclipse's "ru..
I use SQL developer and i made a connection to my database with the system user, after I created a user and made a another connection with that user with all needed privileges.
But when I try to proc..
Is there a way to get a variable name as a string in Javascript? (like NSStringFromSelector in Cocoa)
I would like to do like this:
var myFirstName = 'John';
alert(variablesName(myFirstName) + ":" +..
inp = int(input("Enter a number:"))
for i in inp:
n = n + i;
print (n)
... throws an error: 'int' object is not iterable
I wanted to find out the total by adding each digit, for eg, 110. 1..
I have Hudson as continuous integration server and I want to use option 'Publish JUnit test result report'. But I don't use xUnit tools for testing, instead of that i have shell scripts which run test..
I'm looking for any alternatives to the below for creating a JavaScript array containing 1 through to N where N is only known at runtime.
var foo = [];
for (var i = 1; i <= N; i++) {
foo.push(i..
Is there a way to CENTER A DIV vertically and horizontally but, and that is important, that the content will not be cut when the window is smaller than the content The div must have a background colo..
I'm looking at the documentation for FileUtils.
I'm confused by the following line:
FileUtils.cp %w(cgi.rb complex.rb date.rb), '/usr/lib/ruby/1.6'
What does the %w mean? Can you point me to th..
to install java I have always used the classic way from the terminal.
I would like to install java manually.
I placed the folder of the JDK on the desk and I set environment variables (PATH, CLASSPATH..
Has anyone came across where they have to deal with .truststore file? and knowing how to import .cer into .truststore file?
I am not sure if I have to use Java Keytool or Linux command (such as open..
I am planning to move away from "floaty" layouts and use CSS flexbox for future projects. I was delighted to see that all major browsers in their current versions seem to support (in one way or anothe..
I have a JAR file named helloworld.jar.
In order to run it, I'm executing the following command in a command-line window:
java -jar helloworld.jar
This works fine, but how do I execute it with doub..
In Bash, there appear to be several variables which hold special, consistently-meaning values. For instance,
./myprogram &; echo $!
will return the PID of the process which backgrounded myprogr..
I have a pandas dataframe with the following column names:
Result1, Test1, Result2, Test2, Result3, Test3, etc...
I want to drop all the columns whose name contains the word "Test". The numbers of s..
At the moment, I'm attempting to use async/await within a class constructor function. This is so that I can get a custom e-mail tag for an Electron project I'm working on.
customElements.define('e-m..
I am quite new to python selenium and I am trying to click on a button which has the following html structure:
<div class="b_div">
<div class="button c_button s_button" onclick="submitF..
I'm trying to access a native element in order to focus on it when another element is clicked (much like the html attribute "for" - for cannot be used on elements of this type.
However I get the erro..
Basically, I have an iframe embedded in a page and the iframe has some JavaScript routines I need to invoke from the parent page.
Now the opposite is quite simple as you only need to call parent.func..
I have docker host and inside I have one container.
The docker host is binding the port on IPv6 interface only, not on IPv4.
This is the output
tcp 0 0 0.0.0.0:22 0.0.0.0:*..
I'm trying to write a hard-coded HTTP Post request with SOAP action, using the org.apache.http api.
My problem is I didn't find a way to add a request body (in my case - SOAP action).
I'll be glad for..
Is there a way in java to create a string with a specified number of a specified character? In my case, I would need to create a string with 10 spaces. My current code is:
StringBuffer outputBuffer..
I need a way to get a machine's MAC address, regardless of the OS it is running, by using C#.
The application will need to work on XP/Vista/Win7 32bit and 64bit, as well as on those OSs but with a for..
I am trying to style a checkbox using the following:
_x000D_
_x000D_
<input type="checkbox" style="border:2px dotted #00f;display:block;background:#ff0000;" />_x000D_
_x000D_
_x000D_
But the ..
I understand that Node.js uses a single-thread and an event loop to process requests only processing one at a time (which is non-blocking). But still, how does that work, lets say 10,000 concurrent re..
I want to check if file exists in my package folder, but I don't want to create a new one.
File file = new File(filePath);
if(file.exists())
return true;
Does this code check without creating..
I want to begin writing queries in MySQL.
show grants shows:
+--------------------------------------+
| Grants for @localhost |
+--------------------------------------+
| GRANT USAGE ..
I am trying to write a Pandas dataframe (or can use a numpy array) to a mysql database using MysqlDB . MysqlDB doesn't seem understand 'nan' and my database throws out an error saying nan is not in th..
I could have used
@Html.HiddenFor(x=> ViewData["crn"])
but, I get,
<input id="ViewData_crn_" name="ViewData[crn]" type="hidden" value="500" />
To somehow circumvent that issue(id=ViewDa..
I have looked all over for an explanation, to how does the subquery in a select statement work and still I cannot grasp the concept because of very vague explanations.
I would like to know how do you..
This is my python hello.py script:
def hello(a,b):
print "hello and that's your sum:"
sum=a+b
print sum
import sys
if __name__ == "__main__":
hello(sys.argv[2])
The problem is ..
I have a strange bug in the Visual Studio text editor.
All my blank spaces are replaced by a "."
public class Person
{
int age;
}
looks like this
public..class..Person..........................
..
One of the very tricky questions asked in an interview.
Swap the values of two variables like a=10 and b=15.
Generally to swap two variables values, we need 3rd variable like:
temp=a;
a=b;
b=temp;
..
How do I format a Double to a String in C# so as to have only two decimal places?
If I use String.Format("{0:0.00}%", myDoubleValue) the number is then rounded and I want a simple truncate without a..
Let's say I have a table called messages with the columns:
id | from_id | to_id | subject | message | timestamp
I want to get the latest message from each user only, like you would see in your Face..
I am creating a batch file with some simple commands to gather information from a system. The batch file contains commands to get the time, IP information, users, etc.
I assembled all the commands ..
My program uses its own binary file type, so I assume I can't use MIME type text/plain, as it is not a 7-bit ASCII file.
Should I just call it "application/myappname"?..
I'm writing a batch script that does a copy. I want to script it to copy an entire folder. When I want to copy a single file, I do this
copy %~dp0file.txt file.txt
If I have a folder with this st..
Update: A sample project reproducing this bug can be found here at Microsoft Connect. I have also tested and verified that the solution given in the accepted answer below works on that sample project...
I am attempting to make a simple authentication service by sending a Post to a php file, I need it to load the home page partial on my ng-view when its successful.
This is what I tried :
function lo..
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 have a web service that is working fine in one environment but not in another.
The web service gets document meta data from SharePoint, it running on a server where I cant debug but with logging I ..
I am trying to declare a variable in a react-js class. The variable should be accessible in different functions. This is my code
class MyContainer extends Component {
constructor(props) {
..
I'm trying to figure out why my app's TCP/IP connection keeps hiccuping every 10 minutes (exactly, within 1-2 seconds). I ran Wireshark and discovered that after 10 minutes of inactivity the other en..
Is it possible to have a Docker container access ports opened by the host? Concretely I have MongoDB and RabbitMQ running on the host and I'd like to run a process in a Docker container to listen to..
My understanding of autolayout is that it takes the size of superview and base on constrains and intrinsic sizes it calculates positions of subviews.
Is there a way to reverse this process? I want to..
I am running Python 2.5.
This is my folder tree:
ptdraft/
nib.py
simulations/
life/
life.py
(I also have __init__.py in each folder, omitted here for readability)
How do I import th..
I am trying to add a drop shadow to views that are layered on top of one another, the views collapse allowing content in other views to be seen, in this vein i want to keep view.clipsToBounds ON so th..
I'm trying to create a custom view GhostSurfaceCameraView that extends SurfaceView. Here's my class definition file
GhostSurfaceCameraView.java:
public class GhostSurfaceCameraView extends SurfaceV..
I am trying to deploy my web project and I keep getting this error:
Line 1: <%@ Application Codebehind=“Global.asax.cs” Inherits=“nadeem.MvcApplication” Language=“C#” %>
I looked ..
Is there any way to make an expression for something like ng-class to be a conditional?
For example, I have tried the following:
<span ng-class="{test: 'obj.value1 == \'someothervalue\''}">tes..
Possible Duplicate / a more recent/less clear question
Branch from a previous commit using Git
I have a Git branch called jzbranch and have an old commit id: a9c146a09505837ec03b.
How do I ..
I encounter a strange problem when trying to alter values from a Hash. I have the following setup:
myHash = {
company_name:"MyCompany",
street:"Mainstreet",
postcode:"1234",
city:"MyCity",..
I've been using Git on both Windows and Ubuntu during the development of a small project, frequently flipping back and forth between the two. The issue is that Git Bash consistently becomes slow.
Whe..
I've created this collapsable navbar using Bootstrap 4 that works nicely, but I would like it to close when the user clicks on a link. Any way to do this? Thanks
html navbar:
<nav class="navbar ..
I know there are a plethora of $_SERVER variables headers available for IP address retrieval. I was wondering if there is a general consensus as to how to most accurately retrieve a user's real IP add..
In a Python script I call a function from rpy2, but I get this error:
#using an R module
res = DirichletReg.ddirichlet(np.asarray(my_values),alphas,
log=False, sum.up=F..
I was wondering if there is a way to create a '.exe' file from ' .m' file in MATLAB, such that it can be run in machine which does not have MATLAB (like it can be done in C, C++).
I know writing a M..
This is probably the biggest waste of time problem I have spent hours on solving for a long time.
var db = new hublisherEntities();
establishment_brands est = new establishment_brands();
est.brand_i..
The following is the simplest possible example, though any solution should be able to scale to however many n top results are needed:
Given a table like that below, with person, group, and age column..
I copied the official Bootstrap 4 example for dropdown menus but it is not working, that is nothing is dropped down.
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" hr..
Is it possible to run Windows Containers on Linux? The scenario is based on an app written in the .NET (old net) and the Linux user that wants to run this with Docker to provide a net462 written API o..
I have the following code in one of my controllers:
@Controller
@RequestMapping("/preference")
public class PreferenceController {
@RequestMapping(method = RequestMethod.GET, produces = "text/ht..
If you know the Index, Value or Text. also if you don't have an ID for a direct reference.
This, this and this are all helpful answers.
Example markup
<div class="selDiv">
<select class=..
I have a python web form with two options - File upload and textarea. I need to take the values from each and pass them to another command-line program. I can easily pass the file name with file uploa..
How can I programmatically (i.e., not using vi) convert DOS/Windows newlines to Unix?
The dos2unix and unix2dos commands are not available on certain systems. How can I emulate these with commands li..
If I have some files I want to copy from my project into the .\bin\debug\ folder on compilation, then it seems I have to put them into the root of the project. Putting them into a subfolder seems to c..
This is my python code:
import subprocess
subprocess.check_output("ls",shell=True,stderr=subprocess.STDOUT)
import subprocess
subprocess.check_output("yum",shell=True,stderr=subprocess.STDOUT)
The..
Here's my code:
include 'conn.php';
$conn = new Connection();
$query = 'SELECT EmailVerified, Blocked FROM users WHERE Email = ? AND SLA = ? AND `Password` = ?';
$stmt = $conn->mysqli->prepare..
Does someone know how to turn off this screen?
Also phone has a message (Toast) when trying to make a screenshot:
Unable to capture screenshot. Prevented by security policy
.
One of recomme..
I tried to remove NA's from the subset using dplyr piping. Is my answer an indication of a missed step. I'm trying to learn how to write functions using dplyr:
> outcome.df%>%
+ group_by(Hospit..
How can I get the ID of an element that called a JS function?
body.jpg is an image of a dog as the user points his/her mouse around the screen at different parts of the body an enlarged image is sho..
I have an Android project in eclipse IDE which was working. After some imports and tests, I get the error: java.lang.NoClassDefFoundError.
In my project I have two packages: the main one and the sec..
Is there a way to change the color of a button, or at least the color of the button label programmatically?
I can change the label itself with
document.getElementById("button").object.textElement.in..
I'm trying to extend the native geolocation function
if(navigator.geolocation) {
navigator.geolocation.getCurrentPosition(function(position) {
var latitude = position.coords.latitude;
..
I am working on a shopping cart in PHP and I seem to be getting this error "Notice: Undefined index:" in all sorts of places. The error refers to the similar bit of coding in different places. For exa..
If I have a latitude or longitude reading in standard NMEA format is there an easy way / formula to convert that reading to meters, which I can then implement in Java (J9)?
Edit:
Ok seems what I want..
I'm trying to use a function with PostgreSQL to save some data. Here is the create script:
-- Function: "saveUser"(integer, character varying, character varying, character varying, character..
I need to install an app into my iPhone, I have the .ipa file of that app and also my device is added to the developer's account.
I downloaded the file and open it in iTunes and when I am trying to s..
If I have a list of strings for example:
["car", "tree", "boy", "girl", "arc"...]
What should I do in order to find anagrams in that list? For example (car, arc).
I tried using for loop for each st..
I have a big problem: I need to send 200 objects at once and avoid timeouts.
while (true)
{
NameValueCollection data = new NameValueCollection();
data.Add("mode", nat);
using (var clien..
Why am I receiving the error:
Templates can be used only with field access, property access, single-dimension array index, or single-parameter custom indexer expressions
at this code:
@model IE..
I'm trying to find an integer number of days between two dates in Oracle 11g.
I can get close by doing
select sysdate - to_date('2009-10-01', 'yyyy-mm-dd') from dual
but this returns an interva..
I created a virtualenv with the following command.
mkvirtualenv --distribute --system-site-packages "$1"
After starting the virtualenv with workon, I type ipython. It prompts me
WARNING: Attempti..
I have the following piece of code:
private String toString(List<DrugStrength> aDrugStrengthList) {
StringBuilder str = new StringBuilder();
for (DrugStrength aDrugStrength : aDrugS..
I am trying to check if a database is connected in Laravel.
I've looked around the documentation and can't find anything. The closest thing I've found is this, but this doesn't solve my problem.
I h..
How can I configure my (embedded) Tomcat Session Timeout in a Spring Boot Application?
public class SessionListener implements HttpSessionListener{
@Override
public void sessionCreated(HttpSessionEv..
I am using Netbeans. I did some things with bindings and now whenever I start my program, before it even initializes the form, it gives me an error
The exception in thread main is occuring before the..
I've seen several of answers about using Handle or Process Monitor, but I would like to be able to find out in my own code (C#)
which process is locking a file.
I have a nasty feeling that I'm going t..
I am using some data which is from a RESTful service in multiple pages.
So I am using angular factories for that. So, I required to get the data once from the server, and everytime I am getting the da..
Is it possible to do a git merge, but without a commit?
"man git merge" says this:
With --no-commit perform the merge but pretend the merge failed and do not autocommit,
to give the user a chance to..
Need help/tips on converting an ISO 8601 date with the following structure into javascript.
CCYY-MM-DDThh:mm:ssTZD
I'd like to format the date like so:
January 28, 2011 - 7:30PM EST
I'd like to ..
In my HTML form I have input filed with type file for example :
<input type="file" multiple>
Then I'm selecting multiple files by clicking that input button.
Now I want to show preview of s..
I have a php code here and I would like to create a "back" href to get me back to where I was before. Here's what I have:
<input type="submit" <a href="#" onclick=&..
I have an element with an onclick method.
I would like to activate that method (or: fake a click on this element) within another function.
Is this possible?..
I am a complete newbie to python and attempting to pass an array as an argument to a python function that declares a list/array as the parameter.
I am sure I am declaring it wrong,
here goes:
def d..
I am using XAMPPS to host PHP files from my machine. I have recently installed XAMPPs but I am unable to start Apache service as port 80 is in use by PID 4 - NT Kernel & System.
I know by using a..
I want to hide ID column in my GridView, I knew the code
GridView1.Columns[0].Visible = false;
but the surprise was that my count property for my GridView columns is 0 !!! while I can see data in ..
I am having problems calling a url from PHP code. I need to call a service using a query string from my PHP code. If I type the url into a browser, it works ok, but if I use file-get-contents() to mak..
I tried to convert the (null) values with 0 (zeros) output in PIVOT function but have no sucess.
Below is the table and the syntax i've tried"
SELECT
CLASS,
[AZ],
[CA],
[TX]
FROM #TEMP
PIVOT (SUM(D..
Is there any free java library which I can use to convert string in one encoding to other encoding, something like iconv? I'm using Java version 1.3...
From post:
Sending a JSON array to be received as a Dictionary<string,string>
I’m trying to do this same thing as that post. The only issue is that I don’t know what the keys and the value..
How can I cast a Java object into a boolean primitive
I tried like below but it doesn't work
boolean di = new Boolean(someObject).booleanValue();
The constructor Boolean(Object) is undefined
..
I'm trying to create an alias that opens google chrome to localhost. Port 80 in this case.
I'd also really like to be able to be in any git directory and have it open that specific project in the br..
I have somewhere on website a specific text, let's say "lollypops", and I want to replace all the occurrences of this string with "marshmellows". The problem is that I don't know where exactly the tex..
I know in C# you can use String.Format method. But how do you do this in C++? Is there a function that allows me to convert a byte to a Hex?? Just need to convert a 8 byte long data to Hex, how do I d..
I created a folder in order for it to be the main work directory meaning all the files I create go there, and files I read will be from there.
For some reason after I created the folder and I'm trying..
I want to develop a SDK that encapsules the OAuth 2.0 functions. I have checked the differences between OAuth 1.0 & 2.0, and I have some confusion on Authorization Header (1.0 and
2.0), OAuth 1...
What's the best way (if any) to make an image appear "grayed out" with CSS (i.e., without loading a separate, grayed out version of the image)?
My context is that I have rows in a table that all have..
I am using bootstrap datepicker and my code is like following, Demo of the code on jsfiddle
<div class="input-append date" id="datepicker" data-date="02-2012"
data-date-format="mm-yyyy">
..
Hello I am new to CodeIgniter and PHP, I am trying to setup it for the firs time, but it give the following error.
Fatal error: Call to undefined function base_url() in
C:\wamp\www\Test-CI\applicati..
I am accessing a link on my site that will provide a new image each time it is accessed.
The issue I am running into is that if I try to load the image in the background and then update the one on th..
In RESTful style programming, we should use HTTP methods as our building blocks. I'm a little confused though which methods match up to the classic CRUD methods. GET/Read and DELETE/Delete are obvious..
I can't figure out why I'm not able to play the video in my VideoView. All I'm getting for a message is:
Cannot Play Video : Sorry, this video cannot be played.
I created an SD card for my emul..
In my application, I have an EditText whose default input type is set to android:inputType="textPassword" by default. It has a CheckBox to its right, which is when checked, changes the input..
I'm trying to read a Json string in C#, but I'm having trouble figuring out just how to parse the string into C#. Say I have the following Json string
[
{
"AppName": {
"Descri..
I have many annotations in a mapview (with rightCalloutAccessory buttons). The button will perform a segue from this mapview to a tableview. I want to pass the tableview a different object (that hold..
I dont know how to install the latest Ruby on Ubuntu.
First I installed the default Ruby 1.9.3, using
sudo apt-get install ruby
Then I tried to install the 2.0 version using
sudo apt-get install..
This should be quite straight forward, however the following code does not do anything as far as changing the next label's text. I have tried using .text, .html, and so on to no avail. Is there anythi..
I am having a problem accessing the @attribute section of my SimpleXML object. When I var_dump the entire object, I get the correct output, and when I var_dump the rest of the object (the nested tags..
How can a web application detect a paste event and retrieve the data to be pasted?
I would like to remove HTML content before the text is pasted into a rich text editor.
Cleaning the text after bein..
Recently, I read these posts:
Android Design Support Library
Android Support Library, revision 22.2.0
FloatingActionButton
But, none of them give me a detail example about creating a new FloatingAct..
I have two radio button
on change event i want change button How it is possible?
My Code
<input type="radio" name="bedStatus" id="allot" checked="checked" value="allot">Allot
<input type="..
I manually copy a file to a server, and the same one to an SFTP server.
The file is 140MB.
FTP: I have a rate arround 11MB/s
SFTP: I have a rate arround 4.5MB/s
I understand the file has to be encr..
I have this scenario:
fetch (read and delete) a record from IncomingMessage table
read record content
insert something to some tables
if an error (any exception) occurred in steps 1-3, insert an err..
I would like to use Short Date named string format in WPF.
I tried something like:
<TextBlock Text="{Binding Date, StringFormat='Short Date'}" />
How to do this?..
I want to use the count from the JSTL forEach loop, but my code doesnt seem to work.
<c:forEach items="${loopableObject}" var="theObject" varStatus="theCount">
<div id="divIDNo${theCount..
I've implemented a popup box that dynamically displays search options. I want the box to "float" above all of the site content. Currently, when the box is displayed it displaces all of the content b..
I am trying to update a table where id of the row is entered and title is selected through a dropdown list, but I have two problems.
Firstly Im not sure how to pass the data to the model, and the seco..
I keep getting this error message everytime I run this query:
Msg 8115, Level 16, State 8, Line 33
Arithmetic overflow error converting numeric to data type numeric.
The statement has been terminated..
I'm fairly new to Linux (Ubuntu 10.04) and a total novice to assembler. I was following some tutorials and I couldn't find anything specific to Linux.
So, my question is, what is a good package to com..
I'm trying to make a basic Windows application that builds a string out of user input and then adds it to the clipboard. How do I copy a string to the clipboard using Python?..
I have a database table called 'tbl_transaction' with the following definition:
id INT(11) Primary Key
action_type ENUM('Expense', 'Income')
action_heading VARCHAR (255)
action_amount FLOAT
I would..
I have this script:
<script>
$(document).ready(function () {
$("#changeResumeStatus").click(function () {
$.get("{% url 'main:changeResumeStatus' %}", function (data) {
..
I'm doing a few SQL select queries and would like to convert my UTC datetime column into local time to be displayed as local time in my query results. Note, I am NOT looking to do this conversion via ..
I do not understand this process at all. I have been able to navigate to the folder containing the keytool in the Java SDK. Although I keep getting the error openssl not recognised as an internal or e..