FASTA is a software package for sequence alignment of proteins and nucleic acids. FASTA is also the name of the file format used by these programs to represent sequences of peptides or nucleotides. The format is a de facto standard in bioinformatics.
I am very, very new to UNIX programming (running on MacOSX Mountain Lion via Terminal). I've been learning the basics from a bioinformatics and molecular methods course (we've had two classes) where w..
I am running a (bio)python script which results in the following error:
from: can't read /var/mail/Bio
seeing as my script doesn't have anything to with mail, I don't understand why my script is lo..
Suppose from index.py with CGI, I have post file foo.fasta to display file. I want to change foo.fasta's file extension to be foo.aln in display file. How can I do it?..
I'm currently running an ec2 micro instance and i've been finding that the instance occasionally runs out of memory.
Other than using a larger instance size, what else can be done?..
How can I go about rolling back to a specific commit in git?
The best answer someone could give me was to use git revert X times until I reach the desired commit.
So let's say I want to revert bac..
I understand JQuery in the basic sense but am definitely new to it, and suspect this is very easy.
I've got my image src and id in a JSON response (converted to an object), and therefore the correct ..
I'm trying to make a Tetris game and I'm getting the compiler error
Shape is not an enclosing class
when I try to create an object
public class Test {
public static void main(String[] args..
I am using the SciPy's pearsonr(x,y) method and I cannot figure out why the following error is happening:
ValueError: shape mismatch: objects cannot be broadcast to a single shape
It computes th..
I am getting following error while generating certificates on my local machine.
C:\Users\abc>keytool -genkey -alias tomcat -keyalg RSA
Enter keystore password:
keytool error: java.io.IOException: ..
Here's some sample code:
function addTextNode(){
var newtext = document.createTextNode(" Some text added dynamically. ");
var para = document.getElementById("p1");
para.appendChild(newtex..
I have a dictionary and I would like to get some values from it based on some keys. For example, I have a dictionary for users with their first name, last name, username, address, age and so on. Let's..
The following Java program takes on average between 0.50 secs and 0.55 secs to run:
public static void main(String[] args) {
long startTime = System.nanoTime();
int n = 0;
for (int i = 0;..
I have the following:
<Route name="app" path="/" handler={App}>
<Route name="dashboards" path="dashboards" handler={Dashboard}>
<Route name="exploreDashboard" path="explore..
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 don't want to rename a remote branch, as described in Rename master branch for both local and remote Git repositories.
How can I rename a local branch which hasn't been pushed to a remote branch?
..
I'm trying to read the request body in the OnActionExecuting method, but I always get null for the body.
var request = context.HttpContext.Request;
var stream = new StreamReader(request.Body);
var bod..
In one of my php applications I have to find out the latitude and longitude of the place from address.
I tried this code:
$json = file_get_contents("http://maps.google.com/maps/api/geocode/json?ad..
The visible property of html table does not work.
Why do they have that property if its defective? I had to use style="visibility:hidden" in order to hide a table.
Please explain why. I am very cu..
I'm having trouble with figuring out how to use the delimiter for csv.writer in Python.
I have a csv file in which the strings separated by commas are in single cell and I need to have each word in ea..
I know what base64 encoding is and how to calculate base64 encoding in C#, however I have seen several times that when I convert a string into base64, there is an = at the end.
A few questions came u..
I know slightly close questions have been asked before but this question is a bit different.
We are a start-up company with a very limited budget and we are looking for a completely free Agile softwa..
I have an Integration Test Suite. I have a IntegrationTestBase class for all my tests to extend. This base class has a @Before (public void setUp()) and @After (public void tearDown()) method to estab..
Observations:
Java has a logical AND operator.
Java has a logical OR operator.
Java has a logical NOT operator.
Problem:
Java has no logical XOR operator, according to sun. I would like to define..
I am sent an XML string that I'm trying to parse via an XmlReader and I'm trying to strip out the \" characters.
I've tried
.Replace(@"\", "")
.Replace("\\''", "''")
.Replace("\\''", "\"")
plus s..
Especially during the transition from webpack v1 to v2, it would be important to programmatically determine what webpack version is installed, but I cannot seem to find the appropriate API...
In order to test some functionality I would like to create a DataFrame from a string. Let's say my test data looks like:
TESTDATA="""col1;col2;col3
1;4.4;99
2;4.5;200
3;4.7;65
4;3.2;140
"""
What is..
Is there a way to change the type of interface property defined in a *.d.ts in typescript?
for example:
An interface in x.d.ts is defined as
interface A {
property: number;
}
I want to change ..
I want to use my customize icon on Google map, and added icon url on the code. But it's still not reflecting on the map. Can anyone suggest, what i am missing here. Why icon is not changing, after add..
I have image galley app in that app I placed all the images into the drawable-hdpi folder.
and i called images in my activity like this :
private Integer[] imageIDs = {
R.drawable.wall1, R.dra..
I am storing a number of HTML blocks inside a CMS for reasons of easier maintenance. They are represented by <textarea>s.
Does anybody know a JavaScript Widget of some sort that can do syntax h..
I've got a large-ish class (40 or so methods) that is part of a package I will be submitting as course-work. Currently, the methods are pretty jumbled up in terms of utility public/private etc. and I ..
This answer is great for seeing a visual diff between two files that are checked into git:
How do I view 'git diff' output with a visual diff program?
However, I'd like to see a visual diff ..
Despite Docker's Interactive tutorial and faq I lose my data when the container exits.
I have installed Docker as described here: http://docs.docker.io/en/latest/installation/ubuntulinux
without any ..
can I import,use class from other package?
In Eclipse I made 2 packages
one is main other is second
main
-main (class)
second
-second (class)
and I wanted the main function of main class to call..
I would like to make a simple HTTP POST using JSON in Java.
Let's say the URL is www.site.com
and it takes in the value {"name":"myname","age":"20"} labeled as 'details' for example.
How would I g..
I have been working with git for just over a month. Indeed I have used reset for the first time only yesterday, but the soft reset still doesn't make much sense to me.
I understand I can use the soft..
I have an application that has a couple of commands.
When you type a certain command, you have to type in additional info about something/someone.
Now that info has to be strictly an integer or a stri..
I created a report model using SSRS (2005) and published to the local server. But when I tried to run the report for the model I published using report builder I get the following error.
Report e..
I would like to know the command to perform a mysqldump of a database without the prompt for the password.
REASON:
I would like to run a cron job, which takes a mysqldump of the database once everyda..
I have an Activity with an EditText, a button and a ListView. The purpose is to type a search screen in the EditText, press the button and have the search results populate this list.
This is all wor..
I'm trying to learn Python and decided to use PyCharm. When I try to start a new project I get a dialog that says "No Python interpreter selected". It has a drop down to select a interpreter, but th..
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 an ASP.NET core project and I'm getting this error when I try to build it:
error TS18003: Build:No inputs were found in config file 'Z:/Projects/client/ZV/src/ZV/Scripts/tsconfig.json'. Specif..
I'd like to know more about the advantages and disadvantages of forking a github project vs. creating a branch of a github project.
Forking makes my version of the project more isolated from the orig..
Something I've been wondering for a while whilst doing CSS design.
Are decimal places in CSS widths respected? Or are they rounded?
.percentage {
width: 49.5%;
}
or
.pixel {
width: 122.5px;
}..
How do you import a plain text file as single character string in R? I think that this will probably have a very simple answer but when I tried this today I found that I couldn't find a function to do..
I have this powershell script to sending emails with attachments, but when I add multiple recipients, only the first one gets the message. I've read the documentation and still can't figure it out. Th..
I'm looking for a way to calculate the age of a person, given their DOB in the format dd/mm/yyyy.
I was using the following function which worked fine for several months until some kind of glitch ca..
I want to read a file line by line, but without completely loading it in memory.
My file is too large to open in memory, and if try to do so I always get out of memory errors.
The file size is 1 GB...
Sample code
<a href="page" style="text-decoration:none;display:block;">
<span onclick="hide()">Hide me</span>
</a>
Since the a tag is over the span is not possible to cl..
I'm trying to split a photo into multiple pieces using PIL.
def crop(Path,input,height,width,i,k,x,y,page):
im = Image.open(input)
imgwidth = im.size[0]
imgheight = im.size[1]
for i i..
How can I kill all my postgresql connections?
I'm trying a rake db:drop but I get:
ERROR: database "database_name" is being accessed by other users
DETAIL: There are 1 other session(s) using the d..
I have heard that C++ class member function templates can't be virtual. Is this true?
If they can be virtual, what is an example of a scenario in which one would use such a function?..
What is the preferred method for returning null values in JSON? Is there a different preference for primitives?
For example, if my object on the server has an Integer called "myCount" with n..
I am trying to convert an ISO 8601 formatted String to a java.util.Date.
I found the pattern yyyy-MM-dd'T'HH:mm:ssZ to be ISO8601-compliant if used with a Locale (compare sample).
However, using th..
I am trying to figure out how I can send some information from a form to a Web API action. This is the jQuery/AJAX I'm trying to use:
var source = {
'ID': 0,
'ProductID': $('#ID').v..
I'm reading and parsing an Amazon XML file and while the XML file shows a ' , when I try to print it I get the following error:
'ascii' codec can't encode character u'\u2019' in position 16: ordinal ..
I'm trying to access the url of an object stored in an array, but I'm getting errors no matters what methods I'm using.
let userPhotos = currentUser?.photos
for var i = 0; i < userPhotos!.cou..
I am receiving the error of SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens on line 102 in comments.php below:
<?php
/**
* Class to handle ar..
My application installs other applications, and it needs to keep track of what applications it has installed. Of course, this could be achieved by simply keeping a list of installed applications. But ..
My app was killed by the oom-killer. It is Ubuntu 11.10 running on a live USB with no swap and the PC has 1 Gig of RAM. The only app running (other than all the built in Ubuntu stuff) is my program ..
I have a problem with
import cycle not allowed
It appears, when I am trying to test my controller. As output I've got
can't load package: import cycle not allowed
package project/controllers/a..
I have a datetime that looks like this:
201210120956
ccyyMMDDhhmm
When I try this:
Dim convertedDate As Date = Date.Parse(DateString)
Return convertedDate
I get back this:
#10/12/2012#
I'm lo..
This is with Microsoft SQL Server 2008.
I've got 2 tables, Employee and EmployeeResult and I'm trying to write a simple INSERT trigger on EmployeeResult that does this - each time an INSERT is done i..
I have an ArrayList and want sort it in descending order. I use for it java.util.stream.Stream.sorted(Comparator) method. Here is a description according Java API:
Returns a stream consisting of t..
I've moved a file manually and then I've modified it. According to Git, it is a new file and a removed file. Is there any way to force Git into treating it as a file move?..
A number of blogs have expressed the performance gain in 'tricking' the GPU to think that an element is 3D by using transform: translateZ(0) to speed up animations and transitions. I was wondering if ..
I have a browser which sends utf-8 characters to my Python server, but when I retrieve it from the query string, the encoding that Python returns is ASCII. How can I convert the plain string to utf-8?..
I have a component that has a <p> element. It's (click) event will change it into a <textarea>. So, the user can edit the data. My question is:
How can I make the focus on the textarea?
H..
loginService.islogged()
Above function return a string like "failed".
However, when I try to run then function on it, it will return error of
TypeError: Cannot read property 'then' of undefined
..
I am not able to clone or push to a git repository at Bitbucket in Eclipse:
It's weird, because a day before I didn't have any problem. I have downloaded the sts 3 times with no luck. This error ke..
I'm running Ruby on Windows though I don't know if that should make a difference. All I want to do is get the current working directory's absolute path. Is this possible from irb? Apparently from a..
I've been hearing a lot about the PyPy project. They claim it is 6.3 times faster than the CPython interpreter on their site.
Whenever we talk about dynamic languages like Python, speed is one of the..
Need some jquery help copying a DIV into another DIV and hoping that this is possible. I have the following HTML:
<div class="container">
<div class="button"></div>
</div&g..
Could someone provide me with a good way of importing a whole directory of modules?
I have a structure like this:
/Foo
bar.py
spam.py
eggs.py
I tried just converting it to a package by ..
I want to ask a question about converting a jsonArray to a StringArray on Android. Here is my code to get jsonArray from server.
try {
DefaultHttpClient defaultClient = new DefaultHttpClient();
..
I tried this but showing "undefined".
function test() {
var t = document.getElementById('superman').value;
alert(t); }
Is there any way to get the value using simple Javascript no jQuery Please!..
I want to know exactly what {} \; and {} \+ and | xargs ... do. Please clarify these with explanations.
Below 3 commands run and output same result but the first command takes a little time and the f..
In Python, trying to do the most basic append function to a list with a loop:
Not sure what i am missing here:
a=[]
for i in range(5):
a=a.append(i)
a
returns:
'NoneType' object has no attr..
I need to fetch top first row out of each duplicate set of records from table given below.
I need to use this query in view
please no temp table as I have already done it by adding identity column a..
I have the following jQuery code. I am able to get the following data from server [{"value":"1","label":"xyz"}, {"value":"2","label":"abc"}]. How do I iterate over this and fill a select box with id=c..
I have two json arrays like
var json1 = [{id:1, name: 'xxx' ...}]
var json2 = [{id:2, name: 'xyz' ...}]
I want them merge in to single arrays
var finalObj = [{id:1, name: 'xxx' ...},{id:2, name: '..
I need to write the following data into a text file using JSON format in C#. The brackets are important for it to be valid JSON format.
[
{
"Id": 1,
"SSN": 123,
"Message": "whatever"
..
I am running the exact same code on both windows and mac, with python 3.5 64 bit.
On windows, it looks like this:
>>> import numpy as np
>>> preds = np.zeros((1, 3), dtype=int)
&g..
I have forgotten my Keystore password and I don't really know what to do anymore (I can't or won't give any excuses for it). I want to update my app because I just fixed a bug but it's not possible an..
I want every character to be a different color.
for example,
cout << "Hello world" << endl;
H would be red
e would be blue
l would be orange
and so on.
I know this can be done, I ju..
I am using jQuery. How do I get the path of the current URL and assign it to a variable?
Example URL:
http://localhost/menuname.de?foo=bar&number=0
..
We're using Doctrine, a PHP ORM. I am creating a query like this:
$q = Doctrine_Query::create()->select('id')->from('MyTable');
and then in the function I'm adding in various where clauses an..
How can I use the Twitter Bootstrap date picker? I used the code below but its not working.
<html>
<head>
<title>DatePicker Demo</title>
<script src="js/jquery-..
What is the best way to convert a JSON code as this:
{
"data" :
{
"field1" : "value1",
"field2" : "value2"
}
}
in a Java Map in which one the keys are (field1, field..
I'm wondering how to go about obtaining the value of a POST/GET request variable using Python with Flask.
With Ruby, I'd do something like this:
variable_name = params["FormFieldValue"]
How would ..
I have this little batch script:
SET @var = "GREG"
ECHO %@var%
PAUSE
When I run it, it prints:
H:\Dynamics>SET @var = "GREG"
H:\Dynamics>ECHO
ECHO is on.
H:\Dynamics>PAUSE
Press any key..
It's easy to set inline CSS values with javascript. If I want to change the width and I have html like this:
<div style="width: 10px"></div>
All I need to do is:
document.getElementByI..
I am using AngularJS v1.2.0-rc.2 with ui-router v0.2.0. I want to pass the referrer state to another state so I use the toParams of $state.go like so:
$state.go('toState', {referer: $state.current.na..
I have some PNG images which consist of a black shape and a transparent background.
Unfortunately, IrfanView shows transparent background as black color, so I see just black on black. I've found in Ir..
I need some help in writing a batch file.
I have a path stored in a variable root as follows:
set root=D:\Work\Root
Then I am changing my working directory to this root as follows:
cd %root%
Whe..
I'm trying to run a web service using PHP & SOAP, but all I'm getting so far is this:
(SoapFault)[2] message which states: 'SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://localhost/MyReg..
I wanted to compare reading lines of string input from stdin using Python and C++ and was shocked to see my C++ code run an order of magnitude slower than the equivalent Python code. Since my C++ is r..
I'm working with a CMS, which prevents editing HTML source for <head> element.
For example I want to add the following above the <title> tag:
<meta http-equiv="X-UA-Compatible" conten..
I've tried the following with no success:
function a(args){
b(arguments);
}
function b(args){
// arguments are lost?
}
a(1,2,3);
In function a, I can use the arguments keyword to access a..
I have code that references a web service, and I'd like the address of that web service to be dynamic (read from a database, config file, etc.) so that it is easily changed. One major use of this wil..
Why does Python give the "wrong" answer?
x = 16
sqrt = x**(.5) #returns 4
sqrt = x**(1/2) #returns 1
Yes, I know import math and use sqrt. But I'm looking for an answer to the above...
I was trying for my web test selecting an option. An example can be found here: http://www.tizag.com/phpT/examples/formex.php
Everything works great except the selecting an option part. How to select..
I am trying to simulate a click on on an element.
HTML for the same is as follows
<a id="gift-close" href="javascript:void(0)" class="cart-mask-close p-abs" onclick="_gaq.push(['_trackEvent','vouc..
TL;DR -> How can one create a legend for a line graph in Matplotlib's PyPlot without creating any extra variables?
Please consider the graphing script below:
if __name__ == '__main__':
PyPlo..
I need to be able to start/stop MongoDB on the cli. It is quite simple to start:
./mongod
But to stop mongo DB, I need to run open mongo shell first and then type two commands:
$ ./mongo
use admin
..
The common method to store images in a database is to convert the image to base64 data before storing the data. This process will increase the size by 33%. Alternatively it is possible to directly sto..
I am working with a team and we want to use Git (Not with GitHub, we have a private remote machine). We were using SVN until now.
We have a remote machine that works like an SVN repository.
Now, we wa..
I have a typical set up A,M,P and i am just doing some testing on my localhost server for setting up a webpage. I'm a bit new to php and dynamic sites so I'm muddling my way though. So I am at an impa..
I am trying to receive field value via reflection. The problem is I don't know the fields type and have to decide it while getting the value.
This code results with this exception:
Can not set java...
I am a new ASP.NET developer and I am trying to learn Linq-To-Entities. I am trying to bind a DropDownList with the Linq statement for retrieving the list of status in the Status Entity. Everything is..
All I want is to be able to change the color of a bullet in a list to a light gray. It defaults to black, and I can't figure out how to change it.
I know I could just use an image; I'd rather not do ..
I have a foreach loop and need to execute some logic when the last item is chosen from the List, e.g.:
foreach (Item result in Model.Results)
{
//if current result is the last item in Model.R..
I have a simple "Hello Android" application on my computer (Eclipse environment), and I have built an APK file. How do I transfer the APK file to my Android phone for testing?
My phone is Ideos runni..
develop branch
--> dashboard (working branch)
I use git merge --no-ff develop to merge any upstream changes into dashboard
git log:
commit 88113a64a21bf8a51409ee2a1321442fd08db705
Merge: 981bc2..
I'm in the middle of updating my DNS setup to use all CNAMEs instead of A records, because I need support for VIP swaps between Staging and Production. I can't use A records for this because that put..
Firstly, I saw this topic but I couldn't understand that.
Question :
There is a batch file in D:\path\to\file.bat with following content :
echo %cd%
pause
Output is :
C:\
It must be D:\path\to..
Trying to insert a row into my database with CodeIgniter.
My database table is Customer_Orders and the fields are CustomerName and OrderLines. The variables are being submitted correctly.
My Control..
I am trying to select of the duplicate rows in mysql table it's working fine for me but the problem is that it is not letting me select all the fields in that query , just letting me select the field ..
I'm writing a web crawler in python, and it involves taking headlines from websites.
One of the headlines should've read : And the Hip's coming, too
But instead it said: And the Hip’s coming,..
I'm trying to send a call using Ajax but in Chrome it is rising error but in Firefox there is no error. But still it can't calling the method. I tried to record my call in Firebug but there is no call..
How can I make button become a link only and have a popup in bootstrap 3?
code
<a href="" data-toggle="modal" data-target=".bannerformmodal">Load me</a>
<div class="modal fade banne..
I would like to keep my .bashrc and .bash_login files in version control so that I can use them between all the computers I use. The problem is I have some OS specific aliases so I was looking for a w..
I want to build a query for sunburnt(solr interface) using class inheritance and therefore adding key - value pairs together. The sunburnt interface takes keyword arguments. How can I transform a dict..
I'm trying to get the GPS coordinates to display when I click a button in my activity layout. The following is the method that gets called when I click the button:
public void getLocation(View view) ..
I'd like to find out if an input is a checkbox or not, and the following doesn't work:
$("#myinput").attr('checked') === undefined
Thank you once again!..
I think according to W3 spec, you're supposed to do
<input type="checkbox" checked="checked" />
And
selected="selected"
But, most browsers will accept it you just write "CHECKED" and don'..
So, in about 1 hour my extensions failed hard.
I was doing my extension and it was doing what I pretended. I made some changes, and as I didnt liked I deleted them, and now my extension is throwing e..
Here is my code ... I am getting indentation error but i don't know why it occurs.
->
# loop
while d <= end_date:
# print d.strftime("%Y%m%d")
fecha = d.strftime("%Y%m%d")
# set url
..
When I want to try or debug smthing I run rails console and do some stuff there. I can print some text or variables from code by raising exception with raise "blablabla".
Question: How I can just writ..
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..
<div class="outer">
<div class="inner"></div>
</div>
how do I find the inner div here?
$container.find('.outer .inner')
is just going to look for a div with class="out..
How can I find the unique lines and remove all duplicates from a file?
My input file is
1
1
2
3
5
5
7
7
I would like the result to be:
2
3
sort file | uniq will not do the job. Will show all va..
I'm coming from a relational database background and trying to work with amazon's DynamoDB
I have a table with a hash key "DataID" and a range "CreatedAt" and a bunch of items in it.
I'm trying to g..
I need to recover two Git branches that I somehow deleted during a push.
These two branches were created on a different system and then pushed to my "shared" (github) repository.
On my system, I (ap..
I need to replace some characters as follows: & ? \&, # ? \#, ...
I coded as follows, but I guess there should be some better way. Any hints?
strs = strs.replace('&', '\&')
strs = st..
In the same context i have another query
<select multiple="multiple" name="prodSKUs">
<c:forEach items="${productSubCategoryList}" var="productSubCategoryList">
<..
I have a dropdown list with several option, each option has a name attribute. When I select an option, a different list of checkboxes needs to appear - when another options is selected, that checkbox ..
I have this string:
"some text\nandsomemore"
I need to remove the "\n" from it. I've tried
"some text\nandsomemore".gsub('\n','')
but it doesn't work. How do I do it? Thanks for reading...
Here is the dropdown in question:
<select name="data" class="autotime" id="EventStartTimeMin">
<option value=""></option>
<option value="00">00</option>
<..
I have a jQuery ajax function and would like to submit an entire form as post data. We are constantly updating the form so it becomes tedious to constantly update the form inputs that should be sent i..
I have a server that sends my android app a session cookie to be used for
authenticated communication. I am trying to load a WebView with a URL
pointing to that same server and I'm trying to pass i..
I'm trying to display a grayscale image using matplotlib.pyplot.imshow(). My problem is that the grayscale image is displayed as a colormap. I need the grayscale because I want to draw on top of the..
I have worked on number of J2EE projects where the view layer is JSP. In most projects, I have seen that we reference external resources i.e. images, javascript, jsp's, css etc. using the contextPath ..
Ive got a block of text, and i want to write the authors name and date bellow it in small italics, so i put it in a <span> block and styled it, but i want to space the name out a little bit so i..
Can anyone give me a sample/example of JavaScript with a multidimensional array of inputs? Hope you could help because I'm still new to the JavaScript.
Like when you input 2 rows and 2 columns the ou..
Given a JS object
var obj = { a: { b: '1', c: '2' } }
and a string
"a.b"
how can I convert the string to dot notation so I can go
var val = obj.a.b
If the string was just 'a', I could use obj..
NodeJS interpreter name(node) on Ubuntu has been renamed to nodejs because of a name conflict with another package. Here's what the readme. Debian says:
The upstream name for the Node.js interpret..
I'm looking for an equivalent to sscanf() in Python. I want to parse /proc/net/* files, in C I could do something like this:
int matches = sscanf(
buffer,
"%*d: %64[0-9A-Fa-f]:%X %64[..
Im getting this error: HTTP Status 405 - Request method 'POST' not supported
What I am trying to do is make a form with a drop down box that get populated based on the other value selected in anothe..
I have multiple files that I need to load so I'm using a dict to shorten things. When I run I get a
TypeError: 'type' object is not subscriptable
Error. How can I get this to work?
m1 = pygame.i..
What's the difference between these two?
I noticed that if I changed from socket.emit to socket.send in a working program, the server failed to receive the message, although I don't understand why.
..
I had my solution in Visual Studio 2012 (which is under TFS source control) open and the TFS server (2010) was down. When I then made a change to one of the files and attempted to save it I got a prom..
I have a form that can have 0-hundreds of <input type="file"> elements. I have named them sequentially depending on how many are dynamically added to the page.
For example:
<input type="fi..
I am trying to write code to search all children for a div that has a specific class. The DIV does not have an ID. Here is the HTML I will be using.
<div class="outerBUBGDiv">
<div class="..
In C++, I can create a array like...
int* a = new int[10];
in python,I just know that I can declare a list,than append some items,or like..
l = [1,2,3,4]
l = range(10)
Can I initialize a list by..
I find myself frequently using Python's interpreter to work with databases, files, etc -- basically a lot of manual formatting of semi-structured data. I don't properly save and clean up the useful b..
I'm looking to make a service which I can use to make calls to a web-based REST API.
Basically I want to start a service on app init then I want to be able to ask that service to request a url and re..
I am trying to understand the advantages of multiprocessing over threading. I know that multiprocessing gets around the Global Interpreter Lock, but what other advantages are there, and can threading ..
This may be simple, but I looked around and couldn't find an answer. What's the best way to reference a single item in a list from a Django template?
In other words how do I do the equivalent of {{ ..
I have a simple input field like this.
<div class="search">
<input type="text" value="y u no work"/>
</div>?
And I'm trying to focus() it inside a function.
So inside of a rand..
So here's the deal. Let's say I have a directory named "web", so
$ ls -la
drwx------ 4 rimmer rimmer 4096 2010-11-18 06:02 web
BUT inside this directory, web/php/
$ ls -la
-rw-r--r-- 1 rimmer r..
I am referring to this stackoverflow answer:
How can I select from list of values in SQL Server
How could something similar be done in Oracle?
I've seen the other answers on this page that use UNION a..
I'm developing an Android app, which I therefore endlessly build and install on my test device. Since a couple days I get with every build/install a question asking
Google may regularly check ins..
The Microsoft .NET Framework 4.0 full installer (32- and 64-bit) is 48.1 MB and the Client Profile installer is 41.0 MB. The extracted installation files are 237 MB and 194 MB resp..
i have here a code from http://jqueryui.com/autocomplete/ it works really good but i cant find a way to get the value of selected item in the text view i tried something like this but its not working ..
I have the following render method in my React Native code:
render() {
const {height, width} = Dimensions.get('window');
return (
<View style={styles.container}>
<Image..
How do I convert a string of format mmddyyyy into datetime in SQL Server 2008?
My target column is in DateTime
I have tried with Convert and most of the Date style values however I get an error mess..
I understand that I can specify system properties to Tomcat by passing arguments with the -D parameter, for example "-Dmy.prop=value".
I am wondering if there is a cleaner way of doing this by specif..
I have a UIImageView and the objective is to scale it down proportionally by giving it either a height or width.
UIImage *image = [[UIImage alloc] initWithData:[NSData dataWithContentsOfURL:[NSURL U..
How can I pass an integer by reference in Python?
I want to modify the value of a variable that I am passing to the function. I have read that everything in Python is pass by value, but there has to ..
I am using bootstrap date-picker in my angular application. However when I select a date from that date-picker underlying ng-model that I have bind gets updated I want that ng-model in one date format..
I'm new to java (& to OOP too) and I'm trying to understand about the class ArrayList
but I don't understand how to use the get(). I tried searching in net, but couldn't find anything helpful...
The thing I want to achieve is whenever the <select> dropdown is changed I want the value of the dropdown before change. I am using 1.3.2 version of jQuery and using on change event but the valu..
I'm writing a web application in Google app Engine. It allows people to basically edit html code that gets stored as an .html file in the blobstore.
I'm using fetchData to return a byte[] of all the ..
I need to zip an entire directory using Node.js. I'm currently using node-zip and each time the process runs it generates an invalid ZIP file (as you can see from this Github issue).
Is there another..
I have folder run in folder system32. When I run cmd from within Total Commander opening a command prompt window with C:\Users\admin as current directory and want to go into that folder, the following..
Are these both the same? Is H.264 codec of MPEG-4? What if I need to convert flv to high definition H.264 video format? I want make online tv streaming and want to use PHP or Python...
I have a model:
public class DbUserRole
{
public int UserRoleId { get; set; }
public string UserRole { get; set; }
}
public class DbUserRoles
{
public List<DbU..
Is it possible to specify a position (left or right hand side) for the placement of a vertical scrollbar on a div?
For example look at this page which explains how to use the overflow attribute. Is ..
I know about the document.form.button.click() method. However, I'd like to know how to simulate the onclick event.
I found this code somewhere here on Stack Overflow, but I don't know how to use..
I'd like to clean up my local repository, which has a ton of old branches: for example 3.2, 3.2.1, 3.2.2, etc.
I was hoping for a sneaky way to remove a lot of them at once. Since they mostly follow ..
I have a System app that uses system permissions and I have those permissions listed in the manifest. Eclipse gives the following error when I try to make a build(command line build works):
Permis..
My understanding of x86 registers say that each register can be accessed by the entire 32 bit code and it is broken into multiple accessible registers.
In this example EAX being a 32 bit register, if..
I have the following two peer controllers. There's no parent to these:
<div data-ng-controller="Controller1">
</div>
<div data-ng-controller="Controller2">
The value of xxx is:..
I got this list:
words = ['how', 'much', 'is[br]', 'the', 'fish[br]', 'no', 'really']
What I would like is to replace [br] with some fantastic value similar to <br /> and thus getting..