Code Analysis is the process of analyzing the code of the application to discover, review, validate or verify certain properties of the application. This is useful during the process of development and for testing the application before it is put in production mode, especially for checking the security related aspects.
What tools are there available for static analysis against C# code? I know about FxCop and StyleCop. Are there others? I've run across NStatic before but it's been in development for what seems like f..
Is there a static analysis tool for PHP source files?
The binary itself can check for syntax errors, but I'm looking for something that does more, like:
unused variable assignments
arrays that are as..
I'm trying to write code that returns whether or not a given integer is divisible evenly by 1 to 20, but I keep receiving the following error:
error CS0161: 'ProblemFive.isTwenty(int)': not all c..
I've got a Python project using PyDev in Eclipse, and PyDev keeps generating false errors for my code. I have a module settings that defines a settings object. I import that in module b and assign a..
I've created a chain hierarchy like this.
root-ca ==> signing-ca ==> subordinate-ca ==> server
It is mentioned to create chain bundle, the lowest should go first.
$ cat server.crt subordi..
I am trying to build a Dropdownlist, but battling with the Html.DropDownList rendering.
I have a class:
public class AccountTransactionView
{
public IEnumerable<SelectListItem> Accounts { ..
I continually get these errors when I try to update tables based on another table. I end up rewriting the query, change the order of joins, change some groupings and then it eventually works, but I ju..
How can I add a new field to every document in an existent collection?
I know how to update an existing document's field but not how to add a new field to every document in a collection. How can I do..
I wanted to run some PHP right on my Mac, uncommented httpd.conf, activated web sharing, installed MySQL etc.
I can't seem to find my PHP files, most importantly, PHP.ini.
On my old machine it was lo..
If I have one long list: myList = [0,2,1,0,2,1] that I split into two lists:
a = [0,2,1]
b = [0,2,1]
how can I compare these two lists to see if they are both equal/identical, with the constraint t..
My company has been evaluating Spring MVC to determine if we should use it in one of our next projects. So far I love what I've seen, and right now I'm taking a look at the Spring Security module to d..
class MyClass
def mymethod
MYCONSTANT = "blah"
end
end
gives me the error:
SyntaxError: dynamic constant assignment error
Why is this considered a dynamic constant? I'm just assigning ..
What would be a proper way to check/uncheck checkbox that's placed inside the element that triggers my function?
Here's my code:
<table id="news_list">
<tr>
<td><input type=..
I'm trying to change the colour of the active or current page navigation link which is selected by the user on my website. What am I doing wrong? Thanks.
So far the CSS looks like this:
div.menuBar
..
My development team recently was forced over to a remote development environment where we do not have full access to the servers. Before the change over we had a JAR that was running fine on Java 1.7..
My application creates a JavaScript object, like the following:
myObj= {1:[Array-Data], 2:[Array-Data]}
But I need this object as an array.
array[1]:[Array-Data]
array[2]:[Array-Data]
So I trie..
Let's say I have a spark data frame df1, with several columns (among which the column id) and data frame df2 with two columns, id and other.
Is there a way to replicate the following command
sqlContex..
So how do you check if a string has a particular word in it?
So this is my code:
a.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View arg0) {
..
conda 4.2.13
MacOSX 10.12.1
I am trying to install packages from pip to a fresh environment (virtual) created using anaconda. In the Anaconda docs it says this is perfectly fine. It is done the sam..
I want to detect whether an alert is popped up or not. Currently I am using the following code:
try {
Alert alert = webDriver.switchTo().alert();
// check if alert exists
..
I tried to convert my Go map to a json string with encoding/json Marshal, but it resulted in a empty string.
Here's my code :
package main
import (
"encoding/json"
"fmt"
)
type Foo struct ..
If I use len(np.array([[2,3,1,0], [2,3,1,0], [3,2,1,1]])), I get back 3.
Why is there no argument for len() about which axis I want the length of in multidimensional arrays? This is alarming. Is t..
Possible Duplicate:
jQuery: get the file name selected from <input type=“file” />
I have a standard file input box
<input type="file" name="imafile">
I also have ..
This question will expand on: Best way to open a socket in Python
When opening a socket how can I test to see if it has been established, and that it did not timeout, or generally fail.
Edit:
I tried..
I am using Python 2.5. And using the standard classes from Python, I want to determine the image size of a file.
I've heard PIL (Python Image Library), but it requires installation to work.
How migh..
I'm using LINQ on an IQueryable returned from NHibernate and I need to select the row with the maximum value(s) in a couple of fields.
I've simplified the bit that I'm sticking on. I need to select ..
I just wrote a tiny method to count the number of pages for cell phone SMS. I didn't have the option to round up using Math.ceil, and honestly it seems to be very ugly.
Here is my code:
public class..
Sometimes, Activerecord data types confuse me. Err, often. One of my eternal questions is, for a given case,
Should I use :decimal or :float?
I've often come across this link, ActiveRecord: :dec..
I have been searching the web looking for a definition for declarative and imperative programming that would shed some light for me. However, the language used at some of the resources that I have fou..
I have been using R CMD BATCH my_script.R from a terminal to execute an R script. I am now at the point where I would like to pass an argument to the command, but am having some issues getting it wor..
When I played with <input type="range">, Firefox triggers an onchange event only if we drop the slider to a new position where Chrome and others triggers onchange events while the slider is drag..
Is there a way to have all links on a page be relative to the root directory?
For example, on www.example.com/fruits/apples/apple.html I could have a link saying:
<a href="fruits/index.html">B..
I'm looking for the same effect as alert() in JavaScript.
I wrote a simple web-based interpreter this afternoon using Twisted.web. You basically submit a block of Python code through a form, and the ..
I am trying to create a new virtual machine with Oracle VirtualBox, using an already-existing hard disk. When I try to select the existing hard disk file, a .vhd file, it displays an error saying the ..
I am using CentOS minimal version and I am trying to locate a file, but I have no idea how to search all of the server for the file.
I am sure there is a command out there to do it, can anyone help me..
I'm using PHPMailer in a Simple Script For Send Email's Through Gmail, and I'm getting an "Unknown Error" (At least for me!):
SMTP Error: Could not authenticate.
Error: SMTP Error: Could not
a..
I currently have my background set to top right as:
#thedivstatus {
background-image: url("imagestatus.gif");
background-position: right top;
background-repeat: no-repeat;
}
BUT! I need..
For example consider following code:
int main(int argc,char *argv[])
{
int *p,*q;
p = (int *)malloc(sizeof(int)*10);
q = (int *)malloc(sizeof(int)*10);
if (p == 0)
{
printf("ERROR: Ou..
How can I set multiple attributes at once with JavaScript? Unfortunately, I'm not able to use a framework like jQuery on this project. Here is what I have now:
var elem = document.createElement("img"..
Is there any way to check if a particular plugin is available?
Imagine that you are developing a plugin that depends on another plugin being loaded.
For example I want the jQuery Validation plugin t..
How would I tell Python to check the below for the letter x and then print "Yes"? The below is what I have so far...
dog = "xdasds"
if "x" is in dog:
print "Yes!"
..
When trying to run my app with eclipse/linux on tomcat
I got the following info message:
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments w..
In Java, is it legal to call remove on a collection when iterating through the collection using a foreach loop? For instance:
List<String> names = ....
for (String name : names) {
// Do som..
I'm trying to use an ASP.NET RangeValidator to validate a date on a textbox. The format of the date entered on the textbox is dd MMMM yyyy.
How can I use the range validator to validate a valid date?..
I have few log files around 100MBs each.
Personally I find it cumbersome to deal with such big files. I know that log lines that are interesting to me are only between 200 to 400 lines or so.
What w..
How can I find out the min and the max date from an array of dates? Currently, I am creating an array like this:
var dates = [];
dates.push(new Date("2011/06/25"))
dates.push(new Date("2011/06/26"))
..
I'm trying to install maven through the terminal by following these instructions.
So far I got this
export M2_HOME=/user/apple/apache-maven-3.0.3
export M2=$M2_HOME/bin
export PATH=$M2:$PATH
export ..
Is there a way to use math functions in AngularJS bindings?
e.g.
<p>The percentage is {{Math.round(100*count/total)}}%</p>
This fiddle shows the problem
http://jsfiddle.net/ricick/jt..
I want the left side to be green and the right side to be gray. As pictured above would be PERFECT. Preferably a pure CSS solution (only need to worry about WebKit).
Is such a thing possible?..
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?..
Does anyone know how I can take a MySQL datetime data type value, such as YYYY-MM-DD HH:MM:SS and either parse it or convert it to work in JavaScript's Date() function, for example:- Date('YYYY, MM, D..
I've recently encountered an error trying to host my asp.net site with IIS. I have found a solution that many swear by.
Solution:
Add IIS_IUSRS with Read permission on files in the folder
Change II..
I am trying to create a matrix transpose function for python but I can't seem to make it work.
Say I have
theArray = [['a','b','c'],['d','e','f'],['g','h','i']]
and I want my function to come up w..
I need to run web.exe file from my developer command prompt in Visual Studio 2013. By default, the command prompt is not installed in Visual Studio 2013.
Previously, I was using Visual Studio 2012. I..
(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..
Getting the classname of an object as String using:
object_getClassName(myViewController)
returns something like this:
_TtC5AppName22CalendarViewController
I am looking for the pure version: "Ca..
What's the trivial example of how to generate random colors for passing to plotting functions?
I'm calling scatter inside a loop and want each plot a different color.
for X,Y in data:
scatter(X, ..
I am trying to create an array of strings in C using malloc. The number of strings that the array will hold can change at run time, but the length of the strings will always be consistent.
I've attem..
Consider a non-DOM scenario where you'd want to remove all non-numeric characters from a string using JavaScript/ECMAScript. Any characters that are in range 0 - 9 should be kept.
var myString = 'abc..
I've a form which I'm submitting (through GET as it is required this way) to a crm (ViciDial). I can successfully submit the form however if I do that the processing file at crm will just echo a succe..
I am trying to write a program that will download mp3's off of a website then join them together but whenever I try to download the files I get this error:
Traceback (most recent call last):
File "/h..
I have terminal access to a VPS running centos 5.9 and default python 2.4.3 installed. I also installed python 2.7.3 via these commands: (I used make altinstall instead of make install)
wget http://w..
How do I add a certain number of days to the current date in PHP?
I already got the current date with:
$today = date('y:m:d');
Just need to add x number of days to it..
I am trying to alter column datatype of a primary key to tinyint from int.This column is a foreign key in other tables.So,I get the following error:
Msg 5074, Level 16, State 1, Line 1 The objec..
Do you know of a JAXB setting to prevent standalone="yes" from being generated in the resulting XML?
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
..
I have this code in jQuery: (the file name is javascript.js ...I was using JavaScript before...)
$(document).ready(function() {
$("#readFile").click(function() {
$.get('test.txt', function(data)..
I'm relative new to the webservices world and my research seems to have confused me more than enlighten me, my problem is that I was given a library(jar) which I have to extend with some webservice fu..
How can I check if a var is a string in JavaScript?
I've tried this and it doesn't work...
var a_string = "Hello, I'm a string.";
if (a_string typeof 'string') {
// this is a string
}
..
The W3C validator doesn't like self-closing tags (those that end with "/>") on non-void elements. (Void elements are those that may not ever contain any content.) Are they still valid in HTML5?
So..
There is quite a lot of gui frameworks out there for java, but what is recognized as today's framework of choice?
The following is my understanding of the different frameworks, please correct me if i..
I am trying to use getResources method in a non-activity class. How do I get the reference to the "resources" object so that I can access the xml file stored under resources folder?
Example:
XmlPull..
I want to throw an alert when an input has a 'readonly' attribute. I have tried this:
if($('input').attr('readonly') == 'readonly'){
alert("foo");
}
I think that 'if' is not even the best ..
How can I UPDATE a field of a table with the result of a SELECT query in Microsoft Access 2007.
Here's the Select Query:
SELECT Min(TAX.Tax_Code) AS MinOfTax_Code
FROM TAX, FUNCTIONS
WHERE (((FUNCT..
I'm writing an android application that uses tabs with different contents (activities).
In one of these activities, I would like to lock the screen orientation to "Landscape"-mode,
but in the other ac..
I'd like to change the value of the onclick attribute on an anchor. I want to set it to a new string that contains JavaScript. (That string is provided to the client-side JavaScript code by the server..
Those who use Visual Studio will be familiar with the Shift + F11 hotkey, which steps out of a function, meaning it continues execution of the current function until it returns to its caller, at which..
I need to determine the critical t values for one-sided tails of 75% and 99%, for 40 degrees of freedom.
The following is code for a two-sided 99% critical t values:
qt(0.01, 40)
but how can I det..
Any way to cast java.lang.Double to java.lang.Integer?
It throws an exception
"java.lang.ClassCastException: java.lang.Double incompatible with java.lang.Integer"
..
I'm writing an application in C# that opens an Excel template file for read/write operations. I want to when user closes the application, excel application process has been closed, without saving exce..
In C++ do you always have initialize a pointer to an object with the new keyword?
Or can you just have this too:
MyClass *myclass;
myclass->DoSomething();
I thought this was a pointer allocate..
I can't seem to successfully send to multiple addresses when using Laravel's Mail::send() callback, the code does however work when I only specify one recipient.
I've tried chaining:
// for example
..
I have also tried
from PIL import Image
but it gives me ImportError: No module named PIL.
I have installed PIL successfully using
pip install pil
and I've also installed xcode command line too..
I'm trying to import a trusted certificated into the Java cacerts keystore, but I have a problem. I tried to list existing trusted certificates and it seems that the keystore isn't password protected...
:vsplit (short form: :vs) split the Vim viewport vertically. :30vs splits the viewport, making the new window 30 characters wide. Once this 30 char window is created, how would one change it's size to..
When I press F5 in the VBA editor I would always like to run my "Sub Skynet()" procedure. Is there any way to assign a keyboard shortcut to this procedure...
In postgres, how do I change an existing user to be a superuser? I don't want to delete the existing user, for various reasons.
# alter user myuser ...?
..
I'm using Webpack in my application, in which I create two entry points - bundle.js for all my JavaScript files/codes, and vendors.js for all libraries like jQuery and React. What do I do in order to ..
Can somebody tell me what all happens behind the scenes from the time I type in a URL in the browser to the time when I get to see the page on the browser? A detailed account of the process would be o..
I have created the meat and guts of my application but I want to add a different activity that will be the starting point (sort of a log-in screen).
Couple questions:
1 I have a fairly decent handl..
I've been trying to show a "Do you want to exit?" type of dialog when the user attempts to exit an Activity.
However I can't find the appropriate API hooks. Activity.onUserLeaveHint() initially lo..
I'm getting following error when trying to compile my project in Android Studio:
Gradle: error: diamond operator is not supported in -source 1.6
I have 1.7 set as target in all project preferences ..
For some reason this code is printing three values for the highest value in the array when I'm trying to print just one (which is 11.3). Can someone please explain to me why it is doing this?
Thanks...
I'm working with Eclipse on Windows 7, x64. I'm getting an error when running ADT bundle of android development:
Error: Error parsing the AVDs
Unable to get the Android SDK home directory.
Make sure ..
I m using bootstrap 3.0 to creating a website. I am new to bootstrap. what i want, i want image in center of div when browser size is extra small i have this code.
<div class="col-lg-10 ccol-lg-of..
What is JavaScript garbage collection? What's important for a web programmer to understand about JavaScript garbage collection, in order to write better code?..
I want to make simple Yes/No choiced MessageBox, but I think it is nonsense to design a form for that. I thought I could use MessageBox, add buttons, etc. to accomplish this. It is simple, but since t..
Difference between inner and outer join. i am using two table and want to fetch data from both table so which type join we should use owning of that we can solve our problem ..
I have two expressions of type Expression<Func<T, bool>> and I want to take to OR, AND or NOT of these and get a new expression of the same type
Expression<Func<T, bool>> expr..
Is it possible to set up Android in ad-hoc peer-to-peer wifi mode? For example, I would like to have one phone broadcast a message, and have all peers in the network receive the broadcast, without ha..
I am trying to validate datetime format MM/DD/YYYY. Here is the code I am trying please help.
function ValidateDate(testdate) {
var Status
var reg = /^(((0[1-9]|[12]\d|3[01])\/(0[135..
Originally I wanted to ask this question, but then I found it was already thought of before...
Googling around I found this example of extending configparser. The following works with Python 3:
$ pyth..
I have been working with a string[] array in C# that gets returned from a function call. I could possibly cast to a Generic collection, but I was wondering if there was a better way to do it, possibly..
I know Angular2 beta has just been released but I can't reproduce the steps from their official site tutorial ( https://angular.io/guide/quickstart ). Maybe someone has had similar issues and knows ..
what is the difference between
try { ... }
catch{ throw }
and
try{ ... }
catch(Exception e) {throw new Exception(e.message) }
Regardless that the second shows a message ?..
I have an application which updates my datagrid each time a log file that I'm watching gets updated (Appended with new text) in the following manner:
private void DGAddRow(string name, FunctionType f..
I have a Tomcat based web application. I am intermittently getting the following exception,
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Nat..
I'm developing a solution which uses an ActiveX control (a commercial one which we bought and that I did not develop). I need to develop the proper installation pages to simulate what happens when a u..
formatCalendarDate = function (dateTime) {
return moment.utc(dateTime).format('LLL');
};
It displays: "28 februari 2013 09:24"
But I would like to remove the time at the end. How can I do that?..
Is there a quick, one-liner way to convert a Unix timestamp to a date from the Unix command line?
date might work, except it's rather awkward to specify each element (month, day, year, hour, etc.), an..
IplImage* img = cvLoadImage("something.jpg");
IplImage* src = cvLoadImage("src.jpg");
cvSub(src, img, img);
But the size of the source image is different from img.
Is there any opencv function to r..
I'm using a hosted Linux machine so I don't have permissions to write
into the /usr/lib directory.
When I try to install a CPAN module by doing the usual:
perl Makefile.PL
make test
make install
T..
Hi I have an infuriating problem.
I have a url pattern like this:
# mproject/myapp.urls.py
url(r'^project/(?P<project_id>\d+)/$','user_profile.views.EditProject',name='edit_project'),
it wo..
I installed MariaDB on CentOS 7 but I had some problems with some configuration, now it is completely misconfigured.
Thus, I wanted to remove the MariaDB with “yum remove mariadb mariadb-server”..
I am trying to add a new column that will be a foreign key. I have been able to add the column and the foreign key constraint using two separate ALTER TABLE commands:
ALTER TABLE one
ADD two_id integ..
I have a array of int which I have to sort by descending.
Since I did not find any method to sort the array in descending order.Currently I am sorting the array in descending order as below
int[] a..
I'm using TFS Preview (Team Foundation Service) with one of my projects with Visual Studio 2012. I'm also using an on-premises TFS server with most of my projects. When I use my on-premises TFS after ..
I wrote a PHP code like this
$site="http://www.google.com";
$content = file_get_content($site);
echo $content;
But when I remove "http://" from $site I get the following warning:
Warning:
fil..
I would like to use flexbox to vertically align some content inside an <li> but not having great success.
I've checked online and many of the tutorials actually use a wrapper div which gets the..
I know this might be very rudimentary, but I am new to OpenCV. Could you please tell me how to obtain the size of a matrix in OpenCV?. I googled and I am still searching, but if any of you know the an..
I am trying to update a LARGE MyISAM table (25 million records) using a CLI script. The table is not being locked/used by anything else.
I figured instead of doing single UPDATE queries for each reco..
What is the final version of the ADT Bundle that was released by Google?
Since "Android Studio" was announced as official IDE for the development of Android apps, the ADT Bundle (Eclipse with ADT Pl..
I'm new to Objective-C and I want to download a file from the web (if it was changed on the webserver) and save it locally so it can be used by my application.
Mainly I want to implement what wget --..
I am trying to use git to push my repository to a visual studio team services project, but I get the error:
fatal: Authentication failed for (url of team project)
I am using the commands:
git remote ..
Edit:
Some people started to mark my question as a duplicate. Do not forget that many similar questions existed when I asked this one (see e.g. the list below). However, none of these answers solved..
I need to get my code to read if file doesnt exist create else append. Right now it is reading if it does exist create and append. Here is the code:
if (File.Exists(path))
{
using (StreamWriter s..
I'm starting a number of screens in a bash script, then running django's runserver command in each of them. I'd like to be able to programmatically stop them all as well, which requires me to send Con..
I can't understand why Python doesn't have a sign function. It has an abs builtin (which I consider sign's sister), but no sign.
In python 2.6 there is even a copysign function (in math), but no sign..
I have a struct as follows, with a pointer to a function called "length" that will return the length of the chars member.
typedef struct pstring_t {
char * chars;
int (* length)();
} PString;..
I have a div tag with a fixed height. Most of the images have the same height and width.
I want to align the images at the bottom of the div so that they are nicely arranged. Here is what I have so..
How do I automatically create an enum and subsequently use its values in C# based on values in a database lookup table (using enterprise library data layer)?
For example, If I add a new lookup value ..
I configured tomcat to work with a different external open source.
However, after the tomcat is running for a few minutes I get:
SEVERE: The web application [/MyProject] created a ThreadLocal wit..
I am getting the mvn command not recognized as an internal or external command.
I have setup the M2_HOME, JAVA_HOME and added %M2_HOME%/bin to the path variable. All are system variables. Still getti..
I need to always crop a random-sized image to a square 160x160 using only CSS.
The images should stay centered when cropped.
My markup should be:
<a href="#" class="cropper">
<img src="i..
I want to create a toggle button in html using css. I want it so that when you click on it , it stays pushed in and than when you click it on it again it pops out.
If theres no way of doing it just..
I have made 3 git commits, but have not been pushed.
How can I amend the older one (ddc6859af44) and (47175e84c) which is not the most recent one?
$git log
commit f4074f289b8a49250b15a4f25ca4b4601745..
I have a php script that I want to be run using a bash script, so I can use Cron to run the php script every minute or so.
As far as I'm aware I need to create the bash script to handle the php scrip..
I need a regex to match if anywhere in a sentence there is NOT either < or >.
If either < or > are in the string then it must return false.
I had a partial success with this but only if my <..
Can anyone give me an example that uses onResume() in Android?
Also, if I want to restart the activity at the end of the execution of another, which method is executed—onCreate() or onResume()?
An..
In PHP: I am getting an error:
SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://xxx.xxxx.asmx?WSDL' :
failed to load external entity "http://xxx.xxxx.asmx?WSDL"
My code is:
<?php
..
I want to display:
49 as 49.00
and:
54.9 as 54.90
Regardless of the length of the decimal or whether there are are any decimal places, I would like to display a Decimal with 2 decimal places, and ..
I have a system where people fill in their information and later can go back and edit certain parts, basically the enter personal info and check whether they want to know extra info, these bits of ext..
I have to list all "shift" data to be assigned to an "employee" but shift data must not be included if it is already existing in employee's data. Let's see the image sample.
This query solves the..
Is it possible to run only a part of a program in PyCharm?
In other editors there is something like a cell which I can run, but I can't find such an option in PyCharm?
If this function doesn't exist..
This is my below code from which I need to parse the JSONObject to get individual items. This is the first time I am working with JSON. So not sure how to parse JSONObject to get the individual items ..
I have a simple key/value list in JSON being sent back to ASP.NET via POST. Example:
{ "key1": "value1", "key2": "value2"}
I AM NOT TRYING TO DESERIALIZE INTO STRONGLY-TYPED .NET OBJECTS
I simply ..
I have read lots that Backbone doesn't do two way binding but I don't exactly understand this concept.
Could somebody give me an example of how two way binding works in an MVC codebase and how it doe..
I want to allow allow_url_fopen on my server . I have asked my host and they said it can be done with a .htaccess file. Can anyone tell me how to go about this ?..
What is best way to check if value is null or empty string in Postgres sql statements?
Value can be long expression so it is preferable that it is written only once in check.
Currently I'm using:
c..
I wrote a program to solve y = a^x and then project it on a graph. The problem is that whenever a < 1 I get the error:
ValueError: invalid literal for int () with base 10.
Any suggestions?
..
I find that recently often when I try to install a Python package using pip, I get the error(s) below.
I found a reference online that one has to use "python2 setup.py install" from the download dire..
What is the best/proper way to vertically align the text in the middle of its column? The image height is statically set in the CSS.
I have tried setting an outer div to display: table and an inner d..
Important notice:
If you register for testing, go to your profile settings and to your interests add delete profile.
Trying to login with Facebook to my website:
I get the following error:
URL..
I have setup a new blank react native app.
After installing few node modules I got this error.
Running application on PGN518.
internal/fs/watchers.js:173
throw error;
^
Error: ENOSPC: System l..
I am learning GUI in Java, and for that I have created a demo program:
import java.awt.*;
public class FrameDemo extends Frame {
public FrameDemo(){
super("Frame Demo");
setSize..
I'm using System.Net.Http, I found several examples on the web. I managed to create this code for make a POST request:
public static string POST(string resource, string token)
{
using (var client..
I want to perform a query using sysdate like:
select up_time from exam where up_time like sysdate
which is possible in Oracle.
However, it seems that PostgreSQL doesn't support sysdate. I couldn't..
Is there a good way to check a form input using regex to make sure it is a proper style email address? Been searching since last night and everybody that has answered peoples questions regarding this ..
I am using pycharm IDE for python development it works perfectly fine for django code so suspected that converting tabs to spaces is default behaviour, however in python IDE is giving errors everywher..
I'd like a very simple XML configuration file with a console and a file appender using log4j2.
(The Apache Website is killing me with much Information.)..
I have a series of textboxes on a form. When the user inserts numbers into these textboxes, calculations are made and <asp:Label> controls are updated via JavaScript to reflect these calculatio..
I'm new to webpack, and I need a hand in setting up to generate sourcemaps. I'm running webpack serve from the command line, which compiles successfully. But I really need sourcemaps. This is my webpa..
I am a Java developer, new to .NET. I am working on a .NET MVC2 project where I want to have a partial view to wrap a widget. Each JavaScript widget object has a JSON data object that would be populat..
This has never happened before. Usually it displays the error, but now it just gives me a 500 internal server error. Of course before, when it displayed the error, it was different servers. Now I'm on..
I have a big problem in my diploma project and would be very glad if you guys could help me!
I made a Maven Multi Module Project and have 3 "Core-projects"
NaviClean: (Parent)
NaviCleanDomain: conta..
I want to create a div that can change its width/height as the window's width changes.
Are there any CSS3 rules that would allow the height to change according to the width, while maintaining its asp..
In SQL Server 2000 and 2005:
what is the difference between these two WHERE clauses?
which one I should use on which scenarios?
Query 1:
SELECT EventId, EventName
FROM EventMaster
WHERE EventDate..
I'm trying to base64 encode an image in a shell script and put it into variable:
test="$(printf DSC_0251.JPG | base64)"
echo $test
RFNDXzAyNTEuSlBH
I've also tried something like this:
test=\`echo..
I want to get a list of the column headers from a pandas DataFrame. The DataFrame will come from user input so I won't know how many columns there will be or what they will be called.
For example, if..
In an example from Zed Shaw's Learn Python the Hard Way, one of the exercises displays the following code:
next = raw_input("> ")
if "0" in next or "1" in next:
how_much = int(next)
I'm havi..
I want to do something like this:
private User PopulateUsersList(DataRow row)
{
Users user = new Users();
user.Id = int.Parse(row["US_ID"].ToString());
..
There is a lot of hype around Haskell, however, it is hard to get information on how it is used in the real world applications. What are the most popular projects / usages of Haskell and why it excels..
When I try to autowire Spring RestTemplate, I am getting following error:
nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.springfr..
I've read the similar posts on this topic, and can't for the life of me figure out how to do this properly.
I checked in about 1000 files that I don't want, and I'd rather not have to go through 1by1..
I have no experience with any image processing/editing tools. I am doing a project which requires me to convert the images(small icon) with background colour(red/blue/white) to transparent for the web..
I am fairly new to R and am attempting to plot two time series lines simultaneously (using different colors, of course) making use of ggplot2.
I have 2 data frames. the first one has 'Percent change..
I have the following query which uses a date variable, which is generated inside the stored procedure:
DECLARE @sp_Date DATETIME
SET @sp_Date = DateAdd(m, -6, GETDATE())
SELECT DISTINCT pat.Publicati..
Git is installed and is in the path.
Platform: Red Hat Enterprise Linux 5.8.
>which git
/usr/local/bin/git
Yet bower can't find it:
bower angular#1.0.6 ENOGIT git is not installed or not in t..
When I updated the Hibernate version from 3.6.8 to 4.0.0, I got a warning about deprecated method buildSessionFactory() in this line:
private static final SessionFactory sessionFactory =
new..
I have an application that I have behind a reverse proxy, I would like for it to only listen to localhost/127.0.0.1.
I expected this to work:
app.listen(3001, 'localhost');
or
app.listen(3001, '12..
Possible Duplicate:
File to byte[] in Java
I want to read data from file and unmarshal it to Parcel.
In documentation it is not clear, that FileInputStream has method to read all its conten..
Looking at the php documentation on setting a cookie I see that I can set an expiration date for the cookie. You can set the cookie to expire at the end of the browser session or at some time in the ..
Since my app got support for all orientation. I would like to lock only portrait mode to specific UIViewController.
e.g. assume it was Tabbed Application and when SignIn View appear modally, I only w..
I'm using Bootstrap for my JSP page.
I want to use <fieldset> and <legend> for my form. This is my code.
<fieldset class="scheduler-border">
<legend class="scheduler-border"..
I have a double[] and I want to filter out (create a new array without) negative values in one line without adding for loops. Is this possible using Java 8 lambda expressions?
In python it would be t..
I have an imageView that I want to display a little icon of the country that you are currently in. I can get the country code, but problem is I can't dynamically change the imageView resource. My imag..
I'm using Java's built in XML transformer to take a DOM document and print out the resulting XML. The problem is that it isn't indenting the text at all despite having set the parameter "indent" expli..
To add a new pair to Hash I do:
{:a => 1, :b => 2}.merge!({:c => 3}) #=> {:a => 1, :b => 2, :c => 3}
Is there a similar way to delete a key from Hash ?
This works:
{:a =>..
I am very new to django and was able to finish the tutorial on djangoproject.com without any errors. I am now going through the Django REST framework tutorial found at http://www.django-rest-framework..