Refers to real-world physics. For simulation of physics in games use the [game-physics] tag instead, for questions using an existing physics engine use [physics-engine]. Physics is a science that studies the interactions of energy and matter. Questions with this tag concern the simulation or implementation of real-world physics concepts in programming.
Does anyone have a good jumping script for 2d games in unity? The code I have works but still is far from jumping, it looks like it is flying.
using UnityEngine;
using System.Collections;
public cla..
My application currently consumes quite a lot of memory because it is running physics simulations. The issue is that consistently, at the 51st simulation, Java will throw an error usually because of a..
With the help of the Stack Overflow community I've written a pretty basic-but fun physics simulator.
You click and drag the mouse to launch a ball. It will bounce around and eventually stop on the..
What is the meaning of polyfills in HTML5? I saw this word in many sites about HTML5, e.g. HTML5-Cross-Browser-Polyfills.
So here we're collecting all the shims, fallbacks, and polyfills
in orde..
I'm trying to make a box with rounded corners where the height and width of the div depends on the content, so it's automatically adjust to it...
You can see the example here: http://pastehtml.com/vi..
I have a generic form, which I'd like to style to align the labels and the input fields.
For some reason when I give a width to the label selector, nothing happens:
HTML:
<form id="report-uplo..
I have an object in javascript like this:
{ "a":4, "b":0.5 , "c":0.35, "d":5 }
Is there a fast way to get the minimum and maximum value among the properties without having to loop through them all?..
I used to use perl -c programfile to check the syntax of a Perl program and then exit without executing it. Is there an equivalent way to do this for a Python script?..
Perhaps too general a question, but can anyone explain what would cause a Convolutional Neural Network to diverge?
Specifics:
I am using Tensorflow's iris_training model with some of my own data and k..
I have a <select> element in HTML. This element represents a drop down list. I'm trying to understand how to iterate through the options in the <select> element via JQuery.
How do I use J..
I noticed that the Python 2.7 documentation includes yet another command-line parsing module. In addition to getopt and optparse we now have argparse.
Why has yet another command-line parsing module..
I'm designing an algorithm to do the following: Given array A[1... n], for every i < j, find all inversion pairs such that A[i] > A[j]. I'm using merge sort and copying array A to array B and th..
While running a C program, It says "(core dumped)" but I can't see any files under the current path.
I have set and verified the ulimit:
ulimit -c unlimited
ulimit -a
I also tried to find a file..
In plpgsql, I want to get the array contents one by one from a two dimension array.
DECLARE
m varchar[];
arr varchar[][] := array[['key1','val1'],['key2','val2']];
BEGIN
for m in select arr
L..
Java has the notion of format strings, bearing a strong resemblance to format strings in other languages. It is used in JDK methods like String#format() for output conversion.
I was wondering if ther..
I am retrieving a lot of information in a list, linked to a database and I want to create a string of groups, for someone who is connected to the website.
I use this to test but this is not dynamic, ..
Previously, when I needed to store a number of related variables, I'd create a class.
function Item(id, speaker, country) {
this.id = id;
this.speaker = spkr;
this.country = country;
}
va..
i have a website in which i have to put some lines in Arabic.... how to do it...
where to get the Arabic text characters... how to make the page support Arabic...
i have to put a line per page and t..
Having a table with a column like: mydate DATETIME ...
I have a query such as:
SELECT SUM(foo), mydate FROM a_table GROUP BY a_table.mydate;
This will group by the full datetime, including hours a..
Edit :- Tried to format the question and accepted answer in more presentable way at mine Blog
Here is the original issue.
I am getting this error:
detailed message sun.security.validator.Valida..
I'm having an issue and I have no idea why this is happening and how to fix it. I'm working on developing a Videogame with python and pygame and I'm getting this error:
File "/home/matt/Smoking-Gam..
On my old Mac running Snow Leopard, I could type "ios" into spotlight and it would start up the iPhone/iPad emulator by itself.
I have since had to get a new machine running Lion. I have installed Xc..
When running a PHPUnit test, I would like to be able to dump output so I can debug one or two things.
I have tried the following (similar to the PHPUnit Manual example);
class theTest extends PHPUni..
There are plenty of programs out there that can create a diff patch, but I'm having a heck of a time trying to apply one. I'm trying to distribute a patch, and I got a question from a user about how t..
I am training in web developement and am learning about JSP & Servlets. I have some knowledge of HttpSession - I have used it in some of my sample projects.
In browsers I have seen the option to ..
I am trying to forward engineer my new schema onto my db server, but I can't figure out why I am getting this error. I've tried to search for the answer here, but everything I've found has said to ei..
I am trying to print out all the elements of a List, however it is printing the pointer of the Object rather than the value.
This is my printing code...
for(int i=0;i<list.size();i++){
System..
All reservations about unsecuring your SecureString by creating a System.String out of it aside, how can it be done?
How can I convert an ordinary System.Security.SecureString to System.String?
I'm ..
I am working on a Windows 2003 server (64-bit) with 8 GB RAM. How can I increase the heap memory maximum? I am using the -Xmx1500m flag to increase the heap size to 1500 Mb. Can I increase the heap me..
When trying to show a div element with jQuery, i got this error:
[23:50:35.971] TypeError: p.easing[this.easing] is not a function @ file:///D:/html5%20puzzle/jquery.js:2
The relevant function is t..
I'm making a page which has some interaction provided by javascript. Just as an example: links which send an AJAX request to get the content of articles and then display that data in a div. Obviously ..
I am having trouble running my Android app in a fullscreen mode per instructions of a video. When it tries to run, the app crashes with the error.
"You need to use a Theme.AppCompat theme (or descend..
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 have a csv file which isn't coming in correctly with pandas.read_csv when I filter the columns with usecols and use multiple indexes.
import pandas as pd
csv = r"""dummy,date,loc,x
bar,2009010..
While investigating a bug today, I noticed that calling sumr on a stream with 50 (Int, Int) tuples never completes, but it does on a smaller stream. Calling .toList on the larger stream first complete..
I'm doing a presentation on debugging in Xcode and would like to get more information on using NSLog efficiently.
In particular, I have two questions:
is there a way to easily NSLog the current met..
I have a few custom PHP functions for my Magento store that I stored in myfunc.php and I need to require it from in a few different .phtml files. How do I do that?
I mean I can use an absolute path b..
I've always handled optional parameters in JavaScript like this:
function myFunc(requiredArg, optionalArg){
optionalArg = optionalArg || 'defaultValue';
// Do stuff
}
Is there a better way to ..
In the Effective Java book, it states:
The language specification guarantees that reading or writing a
variable is atomic unless the variable is of type long or double [JLS,
17.4.7].
What d..
I don't know much about programming languages, but am interested in a career with facebook, so I was wondering if someone could tell me what programming language facebook uses.
Also, do any other soc..
I had developed a system that deals with excel sheets in 2006 using MS VS 2005. Now, I can not use the same reference with MS VS 2012.
var app = new Microsoft.Office.Interop.Excel.Application();
Wor..
I am trying to run a batch file that is in another directory from my Java executable. I have the following code :
try {
Process p = Runtime.getRuntime().exec("cmd /c start \"C:\\Program ..
How can custom headers be set for a Volley request? At the moment, there is way to set body content for a POST request. I've a simple GET request, but I need to pass the custom headers alongwith. I do..
Im passing data to my blade view with return View::make('blog', $posts); and in my blade view I'm trying to run an @foreach ($posts as $post) I end up with an error saying that $posts isn't defined.
..
I have a table table1 in SQL server 2008 and it has records in it.
I want the primary key table1_Sno column to be an auto-incrementing column. Can this be done without any data transfer or cloning ..
I need to search a multidimensional array for a specific value in any of the indexed subarrays.
In other words, I need to check a single column of the multidimensional array for a value. If the valu..
I wanted to know if there is any standard APIs in Java to validate a given URL?
I want to check both if the URL string is right i.e. the given protocol is valid and then to check if a connection can b..
I would like to be able to limit the number of characters in a textarea. The method I am using works great in Google Chrome, but is slow in Firefox, and doesn't work in IE.
Javascript:
function len(..
What's the (fastest/cleanest/straightforward) way to convert all keys in a hash from strings to symbols in Ruby?
This would be handy when parsing YAML.
my_hash = YAML.load_file('yml')
I'd like to ..
Does anyone use a rule of thumb basis to estimate the effort required for testing as a percentage of the effort required for development? And if so what percentage do you use?..
I have an ad in my header and a fixed ad at the bottom of my page that is always there. I want the fixed ad to appear only if the user has scrolled under the header ad. I looked into the JQuery docume..
I need the logic for the following situation. I am clueless in doing this.
Consider for January I have 10$ revenue and for February I have 20$ revenue.
My growth would be ((20-10)/10)*100% = 100..
This is a programming question asked during a written test for an interview.
"You have two singly linked lists that are already sorted, you have to merge them and return a the head of the new list wi..
In my script there are three divs. I want to display div with class="ab" when I hover on first line and display div with class="abc", when hover on second line. Otherwise I want to display div with cl..
We are doing some performance tests on our website and we are getting the following error a lot:
*** 'C:\inetpub\foo.plex' log message at: 2008/10/07 13:19:58
DBD::ODBC::st execute failed: [Microsoft..
I'am trying to change "onclick" attribute in jQuery but it doesn't change, here is my code:
$('#stop').click(function() {
$('next').attr('onclick','stopMoving()');
}
I have an element with id=..
I'm googling it and can't seem to find the syntax. My arraylist might be populated differently based on a user setting, so I've initialized it
ArrayList<Integer> arList = new ArrayList<Integ..
A few examples to show, just incase:
Inline Table Valued
CREATE FUNCTION MyNS.GetUnshippedOrders()
RETURNS TABLE
AS
RETURN SELECT a.SaleId, a.CustomerID, b.Qty
FROM Sales.Sales a INNER JOIN Sal..
Hello everybody I am learning DB2 and would like to know how to
see a table's characteristics after I create one.
Similar to the EXPLAIN TABLE command in MySQL.
Thank you...
I have a problem whereby google has indexed some pages with the wrong url.
The url they are indexing is:
http://www.example.com/index.php/section1/section2
I need it to redirect to:
http://www.ex..
Pressing Shift+F6 seems only to rename the last directory.
For example, in the project com.example.test it will offer to rename test only. The same applies if I navigate to package name in .java or Ma..
What's the difference between a Python module and a Python package?
See also: What's the difference between "package" and "module" (for other languages)..
I'm trying to write a VBScript and I'm using functions such as Randomize, and MsgBox. I'm curious as to what is the difference of using () and not using them. For example:
Randomize - This line works..
I installed TensorFlow on my Windows Python 3.5 Anaconda environment
The validation was successful (with a warning)
(tensorflow) C:\>python
Python 3.5.3 |Intel Corporation| (default, Apr 27 2017..
I am trying to trigger click event on hyperlink with jQuery like the way below. Hyperlink does not have any id but it does have cssclass
$(document).ready(function () { $('.cssbuttongo').trigger('c..
What is the difference between an XML Schema and WSDL?
The difference I noticed is that WSDL contains XSD and in WSDL we can declare operations, but not in XSD. Is that correct?..
I asked a general Spring question: Auto-cast Spring Beans and had multiple people respond that calling Spring's ApplicationContext.getBean() should be avoided as much as possible. Why is that?
How..
8 bits representing the number 7 look like this:
00000111
Three bits are set.
What are algorithms to determine the number of set bits in a 32-bit integer?..
I'm using the date filter to render a unix timestamp in a certain format. I've noticed the filter adds the local timezone to the output.
Is there any way to simply output the exact timestamp, without..
I'm having a debate with a co-worker about throwing exceptions from constructors, and thought I would like some feedback.
Is it OK to throw exceptions from constructors, from a design point of view?
..
Suppose I have two DataFrames like so:
left = pd.DataFrame({'key1': ['foo', 'bar'], 'lval': [1, 2]})
right = pd.DataFrame({'key2': ['foo', 'bar'], 'rval': [4, 5]})
I want to merge them, so I try s..
I have a bit of an issue with a function running in chrome that works properly in Safari, both webkit browsers...
I need to customize a variable in a function for Chrome, but not for Safari.
Sadly, ..
I am developing an application using Qt. I don't know which slot corresponds to the event of "the user clicking the 'X'(close) button of the window frame" i.e. this button:
If there isn't a slot fo..
I'm trying to run RSelenium using the rsDriver function, but when I run
rD <- rsDriver()
I get a message telling me I need a newer version of Chrome:
> rD <- rsDriver()
checking Selenium ..
I installed Flutter and set up Android Studio. Then I cloned an example of flutter on GitHub (https://github.com/flutter/flutter) and launched it in Android Studio, but it warns me "Dart SDK is n..
I try to write a script in .py for oracle connectivity:
#!/usr/bin/python
import cx_Oracle
connstr='username/pwd@database'
conn = cx_Oracle.connect(connstr)
curs = conn.cursor()
curs.execute('sele..
Is it possible to display a view from another controller?
Say for example I have a CategoriesController and a Category/NotFound.aspx view. While in the CategoriesController, I can easly return View("..
I have already created an SQLite database. I want to use this database file with my Android project. I want to bundle this database with my application.
Instead of creating a new database, how can t..
1. How can I set the default value for a component prop in Vue 2? For example, there is a simple movies component that can be used in this way:
<movies year="2016"><movies>
Vue.compone..
I'm looking for a simple Java in-memory cache that has good concurrency (so LinkedHashMap isn't good enough), and which can be serialized to disk periodically.
One feature I need, but which has prove..
I have a need for a "Runnable that accepts a parameter" although I know that such runnable doesn't really exist.
This may point to fundamental flaw in the design of my app and/or a mental block in my..
I want to match a regular expression special character, \^$.?*|+()[{. I tried:
x <- "a[b"
grepl("[", x)
## Error: invalid regular expression '[', reason 'Missing ']''
(Equivalently stringr::str..
Is it possible to set the src attribute value in CSS? At present, what I am doing is:
<img src="pathTo/myImage.jpg"/>
and I want it to be something like this
<img class="myClass"/>
...
How do I fetch upstream repo and make it replace master? I only have one branch on my repo, which is master, and I completely messed it up, so I basically need to start over from the upstream. I think..
So I have a little problem. I have a data set in scipy that is already in the histogram format, so I have the center of the bins and the number of events per bin. How can I now plot is as a histogram...
I have created a new rails3 project but I am seeing following logs many times in my server logs. Why I am getting these request and how can I avoid these?
Started GET "/apple-touch-icon-precompose..
I have a scenario where I need to convert columns of table to rows
eg -
table - stocks:
ScripName ScripCode Price
-----------------------------------------
20 MICRONS 533022 ..
CPU Cycles, Memory Usage, Execution Time, etc.?
Added: Is there a quantitative way of testing performance in JavaScript besides just perception of how fast the code runs?..
I have a formula in C2, say =A2+B2. Whenever C2 changes value (actual value, not formula) I want to have the present date and time updated in D2.
I have tried a lot of VBA codes and tricks and none o..
I have a simple program that takes an ID number and prints information for the person matching the ID. The information is stored in a .dat file, with one ID number per line.
The problem is that my pr..
I am trying to do simple thing: I just need to set some cells to values that are on the previous rows.
I have tried =A(Row()-1) but it does not work...
I have a table TblKit that has columns Id and Number. Id is primary key of type int and Number is varchar(50).
The data in the table looks like this:
Id Number
--- ------
1 KIT001
2 K..
I want to migrate my iPhone app to a new database version. Since I don't have some version saved, I need to check if certain column names exist.
This Stackoverflow entry suggests doing the select
SE..
What's the JavaScript equivalent to this C# Method:
var x = "|f|oo||";
var y = x.Trim('|'); // "f|oo"
C# trims the selected character only at the beginning and end of the string!..
I work on a dataframe with two column, mvv and count.
+---+-----+
|mvv|count|
+---+-----+
| 1 | 5 |
| 2 | 9 |
| 3 | 3 |
| 4 | 1 |
i would like to obtain two list containing mvv values and c..
I thought this code would work, but the regular expression doesn't ever match the \r\n. I have viewed the data I am reading in a hex editor and verified there really is a hex D and hex A pattern in th..
I am programming an iPhone app, and I need to force it to exit due to certain user actions. After cleaning up memory the app allocated, what's the appropriate method to call to terminate the applicat..
In Java, is it possible to have a lambda accept multiple different types?
I.e:
Single variable works:
Function <Integer, Integer> adder = i -> i + 1;
System.out.println (adder.apply..
I have a pandas series
object x
Ezh2 2
Hmgb 7
Irf1 1
I want to save this as a dataframe with column names Gene and Count respectively
I tried
x_df = pd.DataFrame(x,columns = ['Gene','count..
I have an Excel file which includes pictures in column B and I want like to export them into several files as .jpg (or any other picture file format). The name of the file should be generated from tex..
Complete newbie here, trying to set up Django to work with PostgreSQL.
I'm using mac osx 10.6.8. I have also installed PostgreSQL 9.3
When I run pip install psycopg2 in terminal I get the following..
If I want to use the pip command to download a package (and its dependencies), but keep all of the zipped files that get downloaded (say, django-socialregistration.tar.gz) - is there a way to do that?..
I'm new to Swift and I want to load a special image from assets. For example I have:
image 1 for iphone 4s = [email protected]
image 2 for iphone 5/5s = [email protected]
image 3 for iphon..
I've been looking around and people say that putting
set -g mouse-mode on
should let you scroll through the terminal output when running tmux. However, after both putting this in my ~/.tmux.conf f..
In the viewpoint of running code in the UI thread, is there any difference between:
MainActivity.this.runOnUiThread(new Runnable() {
public void run() {
Log.d("UI thread", "I am the UI th..
I'm trying to install the dependencies of some example: npm's express 2.5.8 that I've downloaded, but all of the apps throw the same error:
c:\node\stylus>npm install -d
npm info it worked if it e..
With Chrome 12.0.742.112, if I redirect with the following headers:
HTTP/1.1 302 Found
Location: http://0.0.0.0:3000/files/download.zip
Content-Type: text/html; charset=utf-8
Cache-Control: no-cache..
I am trying to get the request URL in a RestController. The RestController has multiple methods annotated with @RequestMapping for different URIs and I am wondering how I can get the absolute URL from..
I have some parameters that I want to POST form-encoded to my server:
{
'userName': '[email protected]',
'password': 'Password!',
'grant_type': 'password'
}
I'm sending my request (current..
Despite all of the others post, I can't find a solution for this error with GlassFish, on MacOSX, NetBeans 7.2.
Here the error :
SEVERE: Exception while invoking class org.glassfish.persistence.jpa.J..
I have a very large database (50+ GB). In order to free space in my hard drive, I tried deleting old records from one of the tables . I ran the command:
delete from Table1 where TheDate<'2004-01-0..
I am getting:
An error occurred (AccessDenied) when calling the ListObjects operation: Access Denied
When I try to get folder from my S3 bucket.
Using this command:
aws s3 cp s3://bucket-na..
I have this:
hash = { "a"=>["a", "b", "c"], "b"=>["b", "c"] }
and I want to get to this: [["a","b","c"],["b","c"]]
This seems like it should work but it doesn't:
hash.each{|key,value| val..
I have real difficulties with enabling mbstring extension on my localhost.
I'm using XAMPP 1.7.4, for Windows, which has PHP 5.3.5, and tried to edit my php.ini file according to the documentation a..
I have the date
1/11/2010
and use the function
= date(year(A1),month(A1),day(A1))
to convert the date to the number to 40189 with Excel.
Can I use MATLAB to convert the number 40189 back to the ..
Using any php application results in:
dyld: Library not loaded: /usr/local/lib/libpng15.15.dylib
Referenced from: /usr/local/bin/php
Reason: image not found
[1] 4494 trace trap php
Most of my p..
How would I go about removing all of the child elements of a DOM node in JavaScript?
Say I have the following (ugly) HTML:
<p id="foo">
<span>hello</span>
<div>world&..
I want to reset a file upload field when the user selects another option.
Is this possible via JavaScript? I'm suspecting that the file upload element is treated differently because it interacts with..
I had developed a mobile page by asp.net to play mp4 video.
I know iOS had disabled the autoplay function to minimize user bandwidth, so how can i
autoplay HTML5 mp4 video on Android ?
I had alrea..
Hi I don't want an image for my submit button so I have gone with the default submit button but I want to edit its width and height. How do I do that?
<input type="submit" id="search" value="Searc..
i'm trying to figure out how Angular works and am having trouble getting my view to update when the model changes..
HTML
<div ng-app="test">
<p ng-controller="TestCtrl">
..
I want to apply a change so That I can use Server GC settings for my C# 3.5 app - I can do that by editing the machine.config file.
The only problem is I do not know where that is.
How can I find th..
I have a dataframe, trip:
> head(trip.mutations)
Ref.y Variant.y
1 T C
2 G C
3 A C
4 T C
5 C A
6 G A
I want to add a third column, mutType, that follows these ru..
I need to count the number of occurrences of a char in a string using Bash.
In the following example, when the char is (for example) t, it echos the correct number of occurrences of t in var, but whe..
My Eclipse (Indigo) was running just fine. I created a simple class Hello. It is placed in package cont in the folder ch13. However, when I try to run it from Eclipse I get info from Java Virtual M..
I have a problem with the stream of Java 8 foreach attempting to move on next item in loop. I cannot set the command like continue;, only return; works but you will exit from the loop in this case. I ..
Why am I getting "Unable to find the requested .Net Framework Data Provider" when trying to setup a new datasource in Visual Studio 2010 Professional?
My stats:
Windows 7 64bit 16gig RAM
Visual Stu..
I am trying to discern the difference between
if
else
else if
When do you use them and when not?
I have a homework assignment with a ton of instances and I am running into code error due to no..
What is the best way of representing a DateTime in Excel? We use Syncfusions Essential XlsIO to output values to an Excel document which works great. But I can't figure out how to display a DateTime i..
Possible Duplicate:
The connection to adb is down, and a severe error has occured
I am currently trying to develop an application for Android in the latest release of Eclipse. When I try to..
I am using a Postgresql database in my rails application.
To store large file or data in database I have used blob data type in MySql.
For Postgres which data type I have to use instead of blob in MyS..
I'm using this code and I'm beyond frustration:
try {
$dbh = new PDO('mysql:dbname=' . DB . ';host=' . HOST, USER, PASS);
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
..
Is there a simple way to time the execution of a command in PowerShell, like the 'time' command in Linux?
I came up with this:
$s=Get-Date; .\do_something.ps1 ; $e=Get-Date; ($e - $s).TotalSeconds
..
How can I get the context in a fragment?
I need to use my database whose constructor takes in the context, but getApplicationContext() and FragmentClass.this don't work so what can I do?
Database co..
I'm confused a bit. I need to hide block if result have one of several cases. But seems it not working correctly...
<div *ngIf="currentStatus !== 'open' || currentStatus !== 'reopen' ">
&l..
this is my code I and I want to save this bitmap on my internal storage. The public boolean saveImageToInternalStorage is a code from google but I don't know how to use it. when I touch button2 follow..
I am trying to pass in a classname to a react component to change it's style and cannot seem to get working:
class Pill extends React.Component {
render() {
return (
<button classNam..
I'm trying to implement the binary classification example using the IMDb dataset in Google Colab. I have implemented this model before. But when I tried to do it again after a few days, it returned a ..
I am working with NCBI Reference Sequence accession numbers like variable a:
a <- c("NM_020506.1","NM_020519.1","NM_001030297.2","NM_010281.2","NM_011419.3", "NM_053155.2")
To get information ..
I have got this text file with latitude and longitude values of different points on a map.
How can I split my string into latitudes and longitudes? What is the general way to do these type of things ..
I'm passing to an activity the number to call by a bundle
and then, in such activity, I have a button to call to that number, this is the code:
callButton.setOnClickListener(new OnClickListener() {
..
A very frequently asked question here is how to do an upsert, which is what MySQL calls INSERT ... ON DUPLICATE UPDATE and the standard supports as part of the MERGE operation.
Given that PostgreSQL ..
ESLint is not working for me in VS Code. I have the plugin installed in VS Code, and ESLint itself as a developer dependency in my package.json, which I have installed as well.
I modified the followi..
I am trying to simply format a number as a percent with two decimal places. If it is 37 divided by 38 (aka .973684210526315789), I would like it to show 97.36 % in the SQL output. I know it is recomme..
I'm learning PHP and have installed Xampp on my computer.
But I have a problem with the setup as the email option doesn't seem to be working.
After doing some reading I think it has something to d..
I am using Jdbctemplate to retrieve a single String value from the db. Here is my method.
public String test() {
String cert=null;
String sql = "select ID_NMB_SRZ from codb_owner..
I have two solutions which have some common code, so I'd like to extract it out and share it between them. Furthermore, I'd like to be able to release that library independently because it might be us..
I have a bunch of client point of sale (POS) systems that periodically send new sales data to one centralized database, which stores the data into one big database for report generation.
The client P..
The following code (see Fiddle here) throws the stack overflow referred to in the question title. I'm trying to get a box shadow to display around a circular image in a pulse effect. Can anyone point ..
I know I can append to a string but I want to be able to add a specific character after every 5 characters within the string
from this
string alpha = abcdefghijklmnopqrstuvwxyz
to this
string alpha ..
An existing web application is running on Tomcat 4.1. There is an XSS issue with a page, but I can't modify the source. I've decided to write a servlet filter to sanitize the parameter before it is ..
How do I parse XML, and how can I navigate the result using jQuery? Here is my sample XML:
<Pages>
<Page Name="test">
<controls>
<test>this is a test.</test>..
I am looking for a CSS selector for the following table:
Peter | male | 34
Susanne | female | 12
Is there any selector to match all TDs containing "male"?..
How can I read in a .csv file (with no headers) and when I only want a subset of the columns (say 4th and 7th out of a total of 20 columns), using pandas? I cannot seem to be able to do usecols..
I am fairly new to VBA, so this may be a simple question but here goes.
I would like to initialize an entire array myArray, say of integers, in VBA. I know that I can do this by a simple initializati..
I am trying to show three buttons on one button click. Before a button click all three buttons are hidden. I set the hidden property and I am also calling a function on a button click. The problem is ..
Is there any other way to delete an item in a dictionary only if the given key exists, other than:
if key in mydict:
del mydict[key]
The scenario is that I'm given a collection of keys to be re..
I am writing application using AngularJS and Spring. I would like to send request to the server and download response returned from controller as a file. In controller I have content of csv file (as s..
I'm having an issue that is driving me crazy. I'm trying to modify the openid-selector to support facebook. I'm using RPXNow as my provider so it requires the form to be submitted to a different url t..
I installed android studio.. it was working fine. Now all the sudden, none of the auto complete features are working.. I can type anything anywhere no variable checking, no help with functions or chec..
I am trying to use ER (Extended Regular Expressions) with ls like ls .+\..+.
I am trying to print all files which contains an extension
(I know I could have used ls *.*, but I wanted to try using ER..
I am trying to resize an img with a percentage of itself. For example, I just want to shrink the image by half by resizing it to 50%. But applying width: 50%; will resize the image to be 50% of the co..
Ok I'm using Access 2003 and I've just started learning Access and VBA a few days ago.
I wrote some code in a module and there are no errors when I press the play button on the debugger toolbar up top..
Is there a way to slice only the first and last item in a list?
For example; If this is my list:
>>> some_list
['1', 'B', '3', 'D', '5', 'F']
I want to do this (obviously [0,-1] is not va..
Current Codes:
<?php
// See the AND operator; How do I simplify/shorten this line?
if( $some_variable !== 'uk' && $some_variable !== 'in' ) {
// Do something
}
?>
And:
..
I am using cPanel of my website to increase maximum upload file size for wordpress media uploads. I have used the codes(found out from google) for this purpose wp-config.php, .htaccess but nothing is ..
http://pypi.python.org/pypi/simplejson
I am just diving into the Python world and want to make a simple twitter application which requires the installation of simplejson but not sure how I can set it..
I am looking into using the HTML5 History API to resolve deep linking problems with AJAX loaded content, but I am struggling to get off the ground. Does any one know of any good resources?
I want to ..
The program is supposed to take in two names, and if they are the same length it should check if they are the same word. If it's the same word it will print "The names are the same". If they are the ..
I'm writing a REST web app (NetBeans 6.9, JAX-RS, TopLink Essentials) and trying to return JSON and HTTP status code. I have code ready and working that returns JSON when the HTTP GET method is called..
I have this simple scenario:
Input element which value is changed by jQuery's val() method.
I am trying to update the angular model with the value that jQuery set. I tried to write a simple direct..
I'm trying to find a way to print a string in hexadecimal. For example, I have this string which I then convert to its hexadecimal value.
my_string = "deadbeef"
my_hex = my_string.decode('hex')
How..
I'm running the following MySQL UPDATE statement:
mysql> update customer set account_import_id = 1;
ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction
I'm not using a tra..
How do i change the background image in CSS at run time? I have the following background image in body and can the image be changed at run time?
body {
height: 100%;
background: #fff8db url(../imag..
I am not very experience with java and this is driving me crazy. I wrote a java program FileManagement and I need to run it from the command line.
I can compile it from the command line with javac Fi..
I need to remove the first (and ONLY the first) occurrence of a string from another string.
Here is an example replacing the string "\\Iteration". This:
ProjectName\\Iteration\\Release1\\Iteration..
This is the Warning im getting in console, Im confused with this warning:
Loading class `com.mysql.jdbc.Driver'.
This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'.
The driver is ..
We have a REST API where clients can supply parameters representing values defined on the server in Java Enums.
So we can provide a descriptive error, we add this lookup method to each Enum. Seems l..