Python allows easy creation of an integer from a string of a given base via
int(str, base).
I want to perform the inverse: creation of a string from an integer,
i.e. I want some function int2bas..
How do I default the value of a non-selected radio button to 0?
I have the following HTML:
<input type="radio" name="myradiobutton" value="1" />1
<input type="radio" name="myradiobutton" va..
Why does this work?
<table border=1>
And this doesn't?
<table style="border-width:1px;border-color:black">
I get the same result in Chrome and in IE9...
Which of them are preferred in which circumstances?
I'd like to see the list of evaluation crtieria for the various modes, and maybe a discussion of the applicability of each criterion.
For exampl..
Have small clarifications,
As of my knowledge these are the relative and absolute paths,
Completely relative: <img src="kitten.png"/>
Absolute in all respects: <img src="http://www.foo.c..
I found this code in some website, and it works perfectly. It validates that the phone number is in one of these formats:
(123) 456-7890 or 123-456-7890
The problem is that my client (I don't know ..
A while ago I was making some test in Javascript,
and played with a code to get the text of all elements with a certain class,
Now I was trying to make something like this but obtain all elements by..
What is the simplest way of doing two way encryption in common PHP installs?
I need to be able to encrypt data with a string key, and use the same key to decrypt on the other end.
The security isn't..
Is there a better way of getting this result? This function fails if num has more digits than digits, and I feel like it should be in the library somewhere (like Integer.toString(x,"%3d") or something..
I am sending NSString and UIImage using bluetooth. I decided to store both in a NSDictionary and then convert the dictionary to NSData.
My question is how to convert NSDictionary to NSData and visa v..
Here is a sample code that I have:
void test()
{
Object1 *obj = new Object1();
.
.
.
delete obj;
}
I run it in Visual Studio, and it crashes at the line with 'delete obj;'.
Isn't thi..
I'm doing some assembly-level debugging in GDB. Is there a way to get GDB to show me the current assembly instruction in the same way that it shows the current source line? The default output after ev..
How can I change my default xampp localhost c:xampp/htdoc to another folder i.e. c:/alan? When I use the IP address I should be able to view my website file in C:/alan.
Thanks for helping me...
I'm pretty new to databases and programming. I'm not very good with the computer lingo so stick with me. I have a csv file that I'm trying to load into my Oracle database. It contains account informat..
At the moment if I am doing a query on the database that should only return one row, using:
...query stuff...
$query = $this->db->get();
$ret = $query->result();
return $ret[0]->campaign_..
I am getting the result in SQL Server as
SELECT StudentId FROM Student WHERE condition = xyz
I am getting the output like
StudentId
1236
7656
8990
........
The output parameter of the stored..
This is a summary of what I am trying to do:
$array[0] = 1;
$array[1] = 2;
$sql = "SELECT * FROM table WHERE some_id = $array"
Obviously, there are some syntax issues, but this is what I want to d..
I've read numerous posts about people having problems with viewWillAppear when you do not create your view hierarchy just right. My problem is I can't figure out what that means.
If I create a RootVi..
I have no idea why this is happenning, since I think I have everything properly declared and defined.
I have the following program, designed with templates. It's a simple implementation of a queue, w..
I would like to check whether a variable is either an array or a single value in JavaScript.
I have found a possible solution...
if (variable.constructor == Array)...
Is this the best way this can..
I'm just new comer at Javascript so when I read a Javascript document, and there're many complex structures that I cannot follow.
Here is the short explanation of Javascript code that I'm reading : i..
I am working on a Java EE Application in a Windows environment. (I am using Windows 7)
I am using Tomcat Server, unfortunately port number 8080 is busy (used by Oracle). Now I want to assign a differ..
I installed Anaconda 4.4.0 (Python 3.6 version) on Windows 10 by following the instructions here: https://www.continuum.io/downloads. However, when I open the Command prompt window and try to write
..
I want to delete specific values/data from one column with the WHERE condition. Putting in another way, I don't want to delete the complete row. Is it possible?..
Trying to remove all of the files in a certain directory gives me the follwing error:
OSError: [Errno 2] No such file or directory: '/home/me/test/*'
The code I'm running is:
import os
test = "..
I want to handle POST of the following API-Call:
/v1/location/deviceid/appid
Additional Parameter are coming from the Post-Body.
This all works fine for me. Now I wnat to extend my code by allowing..
I want to handle AssertionErrors both to hide unnecessary parts of the stack trace from the user and to print a message as to why the error occurred and what the user should do about it.
Is there any..
In "Programming Python", Mark Lutz mentions "mixins". I'm from a C/C++/C# background and I have not heard the term before. What is a mixin?
Reading between the lines of this example (which I've link..
MySQL has an OPTIMIZE TABLE command which can be used to reclaim unused space in a MySQL install. Is there a way (built-in command or common stored procedure) to run this optimization for every table..
I have a git submodule (RestKit) which I have added to my repo.
I accidentally changed some files in there and I'd like to go back to the source version. In order to do that, I tried to run
Mac:app..
I have open the Google Play store using the following code
Intent i = new Intent(android.content.Intent.ACTION_VIEW);
i.setData(Uri.parse("https://play.google.com/store/apps/details?id=my packagenam..
I have a view (Index.cshtml) with a submit button. When the submit button is clicked, it calls an action (Action01) within the controller (TestController.cs) so at the end of the action I want to retu..
I want to change the date format which is fetched from database.
now I got 2016-10-01{{$user->from_date}} .I want to change the format 'd-m-y' in laravel 5.3
{{ $user->from_date->format('d/..
I have a .txt file on my web server (locally) and wish to display the contents within a page (stored on the same server) via PHP echo.
The .txt file contains a number that is updated by another scrip..
I have a wizard generated app with navigation drawer in android studio 0.8.2
I have created a fragment and added it with newInstance() and I get this error:
com.domain.myapp E/AndroidRuntime? FAT..
I am trying to "decode" this following Base64 string:
OBFZDTcPCxlCKhdXCQ0kMQhKPh9uIgYIAQxALBtZAwUeOzcdcUEeW0dMO1kbPElWCV1ISFFKZ0kdWFlLAURPZhEFQVseXVtPOUUICVhMAzcfZ14AVEdIVVgfAUIBWVpOUlAeaUVMXFlKIy..
I want use ToolBar instead of ActionBar, but don't show me menu in toolbar!!! i want set menu such as Refresh or Setting buttons in ActionBar.
Toolbar.xml code :
<?xml version="1.0" encoding="u..
I'm running Windows on my laptop at the moment and I want to upload files from my laptop to my uni's general purpose server, which runs both Linux and MacOSX.
So, I already opened up a connection to ..
How should I compute log to the base two in python. Eg. I have this equation where I am using log base 2
import math
e = -(t/T)* math.log((t/T)[, 2])
..
I have followed this article to implement an OAuth Authorization server. However when I use post man to get a token, I get an error in the response:
"error": "unsupported_grant_type"
I read some..
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 ..
The following code gives me error 9 "subscript out of range". I meant to declare a dynamic array so that the dimension changes as I add elements to it. Do I have to create a "spot" on the array before..
I have to count all the values in a matrix (2-d array) that are greater than 200.
The code I wrote down for this is:
za=0
p31 = numpy.asarray(o31)
for i in range(o31.size[0]):
for j in ..
I need to debug a web application that uses jQuery to do some fairly complex and messy DOM manipulation. At one point, some of the events that were bound to particular elements, are not fired and simp..
How to host a Node.Js application in a shared hosting
I want to host a node.js application in shared hosting. Does anyone have any reference or documentation to refer to?..
Sat Dec 01 00:00:00 GMT 2012
I have to convert above date into below format
2012-12-01
How can i?
i have tried with following method but its not working
public Date ConvertDate(Date date..
I am trying to sign an app with my client's certificates. I have received the following file from the client
I tried installing the ios_distribution certificate and the key (.p12). Also I have inst..
Any ideas?
SELECT * INTO OUTFILE '/home/myacnt/docs/mysqlCSVtest.csv'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '*'
LINES TERMINATED BY '\n'
FROM tbl_property
WHERE managerGroupID = {$manager..
I'm using placeholders for text inputs which is working out just fine. But I'd like to use a placeholder for my selectboxes as well. Of course I can just use this code:
<select>
<option ..
I am learning angular 2 and for the first time I am using the angular CLI project to create a sandbox project.
I was able to run the command "ng serve" and it works great. I wanted to stop it from r..
I have the following scenario :
SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
System.out.println(dateFormat.parse("31/05/2011"));
gives an output
Tue May 31 00:00:00 SGT 2011
..
I just want to flip a boolean based on what it already is. If it's true - make it false. If it's false - make it true.
Here is my code excerpt:
switch(wParam) {
case VK_F11:
if (flipVal == true) ..
I have mongoDB 3.2 installed locally for Windows 7. I would like to find out its specific version (like is it 3.2.1, or 3.2.3 or...). How could I find it? If I open the database shell (mongo.exe), I c..
I have a one-dimensional array of integer in JavaScript that I'd like to add data from comma separated string, Is there a simple way to do this?
e.g : var strVale = "130,235,342,124 ";..
As the title reads, I'm trying to assign more memory to my container. I'm using an image from docker hub called "aallam/tomcat-mysql" in case that's relevant.
When I start it normally without any spe..
I have made a button using
Button buttonOk = new Button();
along with other code, how can I detect if the created button has been clicked?
And make it that if clicked the Form will close?..
When I am running the following inside batch....
set PATH='C:\Users\DEB\Downloads\10.1.1.0.4'
cd !PATH!
I get error "The filename, directory name, or volume label syntax is incorrect"
Update: The..
I would like to execute a single PHP statement like if(function_exists("my_func")) echo 'function exists'; directly with the command line without having to use a separate PHP file.
How is it..
How can I get all products from customers1 and customers2 include their customer names?
customer1 table
cid name1
1 john
2 joe
customer2 table
cid name2
p1 sandy
p2 linda
product table
pid ci..
I have a list which consists of float values but they're too detailed to proceed. I know we can shorten them by using the ("%.f" % variable) operator, like:
result = [359.70000000000005]
result = "%...
I use Jupyter notebook in a browser for Python programming, I have installed Anaconda (Python 3.5). But I'm quite sure that Jupyter in running my python commands with the native python interpreter and..
I am trying to print a page. In that page I have given a table a background color.
When I view the print preview in chrome its not taking on the background color property...
So I tried this property:..
How can I configure windows command dialog to run different python versions in it? For example when I type python2 it runs python 2.7 and when I type python3 it runs python 3.3? I know how to configur..
I have a class called Questions (plural). In this class there is an enum called Question (singular) which looks like this.
public enum Question
{
Role = 2,
ProjectFunding = 3,
TotalEmploy..
I'm deleting several items from a table using Entity Framework. There isn't a foreign key / parent object so I can't handle this with OnDeleteCascade.
Right now I'm doing this:
var widgets = context..
I would like to make a UILabel clickable.
I have tried this, but it doesn't work:
class DetailViewController: UIViewController {
@IBOutlet weak var tripDetails: UILabel!
override func view..
How can I display and count the values whose dates are yesterday?
I used time() to insert date in the database. Example:
URL: google.com youtube.com google.com youtube.com test.com youtube.com
DateVi..
I need a page with checkboxes and visible div if at minimum 1 is checked.
Here I got page that if i check checkbox, the div will show. It's okay and works correctly.
When I check 3 checkboxes and ..
In pre-historic times (Python 1.4) we did:
fp = open('filename.txt')
while 1:
line = fp.readline()
if not line:
break
print line
after Python 2.1, we did:
for line in open('fil..
I have a YouTube video embedded on our website and when I shrink the screen to tablet or phone sizes it stops shrinking at around 560px in width. Is this standard for YouTube videos or is there someth..
I have this script where I want to add an object to an array called $Target in every foreach.
foreach ($Machine in $Machines)
{
$TargetProperties = @{Name=$Machine}
$TargetObject = New-Object P..
I wrote the following code:
Function find_results_idle()
Public iRaw As Integer
Public iColumn As Integer
iRaw = 1
iColumn = 1
And I get the error message:
"invalid attribute i..
I have had C++ experience but not MSVC.
What I am trying to do is incorporate a .dll from an open source project into my project. The code is available and I have built it. I have the .dll as well as..
I had created the xml document with xml version="1.0".
In that document I need to use the greater than symbol > and less than symbol <.
How should I include those symbols? It's not working.
&..
IMO both make the function to have a scope of the translation unit only.
What's the difference between "static" and "static inline" function?
Why should inline be put in a header file, not in .c fil..
I'm trying to style a button using <input type="button"> instead of just <button>. With the code I have, the button extends all the way across the screen. I just want to be able to fit it ..
I have a datetime field in my Postgresql, named "dt".
I'd like to do something like
SELECT * FROM myTable WHERE extract (date from dt) = '01/01/11'
What is the right syntax to do that?
Thanks!..
When do you use map vs flatMap in RxJava?
Say, for example, we want to map Files containing JSON into Strings that contain the JSON--
Using map, we have to deal with the Exception somehow. But how?:..
I want to implement a good error handling in my app, I have forced this file for catching the error.
App\Services\PayUService
try {
$this->buildXMLHeader; // Should be $this->buildXMLHeader(..
What is the fastest way to check if a string matches a regular expression in Ruby?
My problem is that I have to "egrep" through a huge list of strings to find which are the ones that match a regexp t..
At the top of my file I have
#define AGE "42"
Later in the file I use ID multiple times including some lines that look like
1 std::string name = "Obama";
2 std::string str = "Hello " + name + " yo..
I want to be able to set a single cookie, and read that single cookie with each request made to the nodejs server instance. Can it be done in a few lines of code, without the need to pull in a third p..
Possible Duplicate:
A Transpose/Unzip Function in Python
I have a list of tuples, where I want to unzip this list into two independent lists. I'm looking for some standardized operation in ..
I've been trying to stream mp3's over http using Android's built in MediaPlayer class. The documentation would suggest to me that this should be as easy as :
MediaPlayer mp = new MediaPlayer();
mp.se..
I need to count the number of files in a directory using Python.
I guess the easiest way is len(glob.glob('*')), but that also counts the directory itself as a file.
Is there any way to count only t..
Please read this carefully. Please do not send me a link on how to import a certificate.
I I am using Postman for QA and testing work. I have a test system I frequently rebuild myself and so it is co..
I'm trying to perform some offline maintenance (dev database restore from live backup) on my dev database, but the 'Take Offline' command via SQL Server Management Studio is performing extremely slowl..
I have a very weird problem. After writing this:
for (File f : currentFile.listFiles()) {
if (f.isDirectory()){
System.out.println(f.getName()+"\t"+"Dir\t"+Command.getpremiss..
I need to get height of an element that is within a div that is hidden. Right now I show the div, get the height, and hide the parent div. This seems a bit silly. Is there a better way?
I'm using jQu..
Can anybody help with effective and safe way of removing quotes from batch variables?
I have written a batch file which successfully imports a list of parameters %1, %2, %3 etc. and places them into n..
I am trying to parse JSON strings in Java and find the key-value pairs so that I can determine the approximate structure of the JSON object since object structure of JSON string is unknown.
For examp..
How can I retrieve a bash variable value if I have the variable name as string? var1="this is the real value"
a="var1"
Do something to get value of var1 just using variable a.
Con..
I have the latest android Studio (2.3 beta 3) and it seems ConstraintLayout is the default when creating a project. How can I make Android Studio use the RelativeLayout as the default layout element f..
Executing the command git clone [email protected]:whatever creates a directory in my current folder named whatever, and drops the contents of the Git repository into that folder:
/httpdocs/whatever/publ..
According to AngularJS doc, calls to $http return the following:
Returns a promise object with the standard then method and two http specific methods: success and error. The then method takes two ..
I'm working on a CMS that fetches a user's profile image from their Facebook URL (that is, http://facebook.com/users_unique_url). How can I accomplish this? Is there a Faceboook API call that fetches ..
I'm trying to compile using g++ and either the -std=c++11 or c++0x flags.
However, I get this error
cc1plus: error: unrecognized command line option "-std=c++11"
g++ --version
g++ (GCC) 4.1.2 20..
So this question isn't about integrating an existing payment gateway into my site. This is more of a architectural question.
I want to build a system similar to Paypal. Now I understand that Paypal o..
I have a small app on heroku. Whenever I want to see the logs I go to the command line and do
heroku logs
That only shows me about 100 lines. Is there not a way to see complete logs for our appl..
While coding I added print statements into some files to keep track of what was going on.
When I am done, is it possible to revert changes in some files, but commit the file I actually worked on?
S..
I have written an axios POST request as recommended from the npm package documentation like:
var data = {
'key1': 'val1',
'key2': 'val2'
}
axios.post(Helper.getUserAPI(), data)
.then((..
How do I know what version of Java is being run in Eclipse?
Is there a way to write code to find out?
Is "JRE System Library [JavaSE-1.6]" in "Package Explorer" the right version?..
I'm trying to setup a Amazon Linux AMI(ami-f0091d91) and have a script that runs a copy command to copy from a S3 bucket.
aws --debug s3 cp s3://aws-codedeploy-us-west-2/latest/codedeploy-agent.noar..
I have a process that fails regularly & sometimes starts duplicate instances..
When I run:
ps x |grep -v grep |grep -c "processname"
I will get:
2
This is normal as the process runs with a recove..
You can get the same output with for and while loops:
While:
$i = 0;
while ($i <= 10){
print $i."\n";
$i++;
};
For:
for ($i = 0; $i <= 10; $i++){
print $i."\n";
}
But which one is f..
I already have a window open with the web site I'm debugging. I don't need VS to launch another one for me every time I need to debug.
Is there a way to stop this behavior?..
Python 2.7.1
I am trying to use python regular expression to extract words inside of a pattern
I have some string that looks like this
someline abc
someother line
name my_user_name is valid
some mor..
I'm using two ListViews like this:
<ListView
android:id="@+id/ListView"
android:text="@string/Website"
android:layout_height="30px"
android:layout_width="150px"
android:scrollbars="..
Is there a convenience method to strip any leading or trailing spaces from a Java String?
Something like:
String myString = " keep this ";
String stripppedString = myString.strip();
System.out.pri..
def play_game(word_list):
hand = deal_hand(HAND_SIZE) # random init
while True:
cmd = raw_input('Enter n to deal a new hand, r to replay the last hand, or e to end game: ')
if ..
Is there a way to create a dynamic array of strings on Javascript?
What I mean is, on a page the user can enter one number or thirty numbers, then he/she presses the OK button and the next page shows ..
I want to apply my custom function (it uses an if-else ladder) to these six columns (ERI_Hispanic, ERI_AmerInd_AKNatv, ERI_Asian, ERI_Black_Afr.Amer, ERI_HI_PacIsl, ERI_White) in each row of my datafr..
I am currently trying to learn JSP. My question is, at present I used to include the header and footer of the page using:
<%@include file="includes/header.jsp" %>
and
<%@include file="in..
I'm doing active development on my schema in SQL Server 2008 and frequently want to rerun my drop/create database script. When I run
USE [master]
GO
IF EXISTS (SELECT name FROM sys.databases WHERE..
I've installed eclipse gradle plugin from here
http://kaczanowscy.pl/tomek/2010-03/gradle-ide-integration-eclipse-plugin
Is there a simple way to import into eclipse gradle project using gui, not d..
EDIT Jan 2016: Since this still gets attention. Since asking this I've completed a few AngularJS projects, and for those I mostly used factory, built up an object and returned the object at the end. M..
I am running this query on MySQL
SELECT ID FROM (
SELECT ID, msisdn
FROM (
SELECT * FROM TT2
)
);
and it is giving this error:
Every derived table must have its own alias.
..
I'm quite familiar with Django, but I recently noticed there exists an on_delete=models.CASCADE option with the models. I have searched for the documentation for the same, but I couldn't find anything..
I have a formula in Excel that needs to be run on several rows of a column based on the numbers in that row divided by one constant. When I copy that formula and apply it to every cell in the range, a..
I'm a newbie, so bear with me...
I am trying to copy all .doc files that I have scattered throughout several subdirectories of one main directory into another directory using a batch file. I have ma..
I'm having trouble with import cv in my python code.
My issue is I need to draw a rectangle around regions of interest in an image.
How can this be done in python? I'm doing object detection and woul..
In class we are doing sorting algorithms and, although I understand them fine when talking about them and writing pseudocode, I am having problems writing actual code for them.
This is my attempt in ..
How to use ngStyle to add background-image?
My code doesn't work:
this.photo = 'http://dl27.fotosklad.org.ua/20121020/6d0d7b1596285466e8bb06114a88c903.jpg';
<div [ngStyle]="{'background-image': u..
I have a list:
a = [32, 37, 28, 30, 37, 25, 27, 24, 35, 55, 23, 31, 55, 21, 40, 18, 50,
35, 41, 49, 37, 19, 40, 41, 31]
max element is 55 (two elements on position 9 and 12)
I need to..
So I wonder if it is possible to get a variable from a specific php-file when the variable-name is used in multiple php-file.
An example is this:
<header>
<title>
<?php echo $var1; ..
I'd like to call a function using an array as parameters:
const x = ['p0', 'p1', 'p2'];
call_me(x[0], x[1], x[2]); // I don't like it
function call_me (param0, param1, param2 ) {
// ...
}
Is the..
trying to call a python script on Vba and I am a newb. I tried converting the main script to an exe using py2exe and then calling it from VBA (shell) but the main script calls other scripts therefore ..
How do I create a login page that goes to the next screen if the password is correct?
<html>
<p> Enter Username and Password </p>
<FORM action="file:///android_asset/www/Browse.h..
I have a form where a user can add multiple select boxes for multiple cities. The problem is that each newly generated select box needs to have a unique id. Can this be done is JavaScript?
UPDATE: he..
If I include <stdlib.h> or <stdio.h> in a C program I don't have to link these when compiling but I do have to link to <math.h>, using -lm with gcc, for example:
gcc test.c -o test ..
How can I load a custom dll file in my web application? I've tried the following:
Copied all required dlls in system32 folder and tried to load one of them in Servlet constructor System.loadLibrary
C..
I have researched a lot to adjust the layout when softkeyboard is active and I have successfully implemented it but the problem comes when I use android:theme="@android:style/Theme.NoTitleBar.Fullscre..
On Learn Python the Hard Way page 21, I see this code example:
x = "There are %d types of people." % 10
...
print "I said: %r." % x
Why is %r used here instead of %s? When would you use %r, and wh..
I'm using following HTML markup for my grid.
<section class="grid">
<article class="grid-item width-2x height-2x">....</article>
<article class="grid-item">....</ar..
I've always been told never to represent money with double or float types, and this time I pose the question to you: why?
I'm sure there is a very good reason, I simply do not know what it is...
I want to create an input type text in my web form dynamically. More specifically, I have a textfield where the user enters the number of desired text fields; I want the text fields to be generated dy..
With https://dev.twitter.com/docs/api/1/get/statuses/user_timeline I can get 3,200 most recent tweets. However, certain sites like http://www.mytweet16.com/ seems to bypass the limit, and my browse th..
Just wondering if .NET provides a clean way to do this:
int64 x = 1000000;
string y = null;
if (x / 1024 == 0) {
y = x + " bytes";
}
else if (x / (1024 * 1024) == 0) {
y = string.Format("{0:n..
I'm getting an error when trying to commit a change to a repository. I'm sure that my resources (classes) are not locked but it still gives me the error:
Some resources were not updated.
svn: E1550..
I have a data set asking a customer how many pets they have for example. Is there a way with one query I can count the distinct values (1,2,3, etc)?
Thanks!
+----------+------+
| Customer | Pets |
+-..
I have this array... how do you print each of the filepath and filename? What is the best way to do this?
Array (
[0] => Array (
[fid] => 14
[list] => 1
..
I would like to type the mathematical forumla in VBA code which many lines. I would like to split it into many lines. How do I do it?
For example:
U_matrix(i, j, n + 1) = k * b_xyt(xi, yi, tn) / (4 ..
Can two Java methods have the same name with different return type? The return type of the methods are different and they are declared with the same method's name.
Is that allowed?..
It's hard to find Mac-specific answers to this question on the web, so I'm hoping someone out there can put this one to rest for me? My permissions are screwed up on my sites and I'm not sure how to f..
I want a custom error page shown for 500, 404 and 403. Here's what I have done:
Enabled custom errors in the web.config as follows:
<customErrors mode="On"
defaultRedirect="~/View..
I have arrival column of type timestamp in table reservations ( I'm using postgres ).
How would I select all dates within this year for example?
I know I could do something like this:
select * FROM ..
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 select values from different table and inset it in to the temporary table.
I need a identity field in the temporary table. When I try to execute the following code it throws an error: ..
I have situation, when click on button opens the new browser window with search results.
Is there any way to connect and focus to new opened browser window?
And work with it, then return back to or..
Python's http.server (or SimpleHTTPServer for Python 2) is a great way of serve the contents of the current directory from the command line:
python -m http.server
However, as far as web servers go, i..
Is it possible to raise an error in a stored procedure manually to stop execution and jump to BEGIN CATCH block? Some analog of throw new Exception() in C#.
Here is my stored procedure's body:
BEGIN..
Supposed I have an image that I want to tag as 0.10.24 (in my case it's an image containing Node.js 0.10.24). I built that image using a Dockerfile and executing docker build and by providing a tag us..
I send the user over to a page on a button click. This page is a UITableViewController.
Now if the user taps on a cell, I would like to push him back to the previous page.
I thought about something..
I would like to reload an <iframe> using JavaScript. The best way I found until now was set the iframe’s src attribute to itself, but this isn’t very clean. Any ideas?..
I saw this sticky header on this website:
http://dunked.com/ (no longer active, view archived site)
When you scroll down the sticky header comes down from the top.
I looked at the code, but it looks..
I am trying to toggle the state of a component in ReactJS but I get an error stating:
Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWill..
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 have a table called products with primary key Id. I want to select all items in the table. This is the code is I'm using:
$batch_get_response = $dynamodb->batch_get_item(array(
'RequestItems..
I have an app where I capture a video using the camera. I can get the video's file path, but I need it as a Uri.
The file path I'm getting:
/storage/emulated/0/DCIM/Camera/20141219_133139.mp4
What..
I'm trying to storage 5000 data elements on an array. This 5000 elements are storage on an existent file (therefore it's not empty).
But I'm getting an error and I don't know what is causing it.
I..
I am new to the Java world and JPA. I was studying JPA and came across many new terms like Entity, persistence. While reading, I could not understand the exact definition for Persistence Context.
Can..
I'm trying to provide static IP address to containers. I understand that I have to create a custom network. I create it and the bridge interface is up on the host machine (Ubuntu 16.x). The containers..
How do I initialize a dynamic array allocated with malloc? Can I do this:
int *p;
p = malloc(3 * sizeof(*p));
p = {0, 1, 2};
...
free(p);
Or do I need to do something like this:
int *p, x;
p = m..
How is git revert used?
This might sound like a duplicate question but when people ask it, the response is often, use git reset as per Revert to a commit by a SHA hash in Git?
Then when someone asks..
How can I select all elements whose id starts with "player_"?
I have multiple elements like this:
<div id="player_290x3dfda">text</div>
Every id has a unique stamp on it. How can I sel..
I have read NgStyle Documentation For Angular 2, and it is a little bit confusing for me. How do I use NgStyle with condition like (if...else) to set background image of any element? ..
I'm recently playing with bootsrap3. I compiled it from sources and included distr js and css to my project. The thing is, I see in GH dev tools, that it's trying to get .map.css file. Why does it wan..
I have a working program which takes the first letter of a word then switches it to the back of the word and adds "ay to the end. It works fine but I am trying to store the original word and the newW..
Myself and my group are horrendous at incrementing assembly version numbers and we frequently ship assemblies with 1.0.0.0 versions. Obviously, this causes a lot of headaches.
We're getting a lot be..
I want to get a number of rows in my table using max(id). When it returns NULL - if there are no rows in the table - I want to return 0. And when there are rows I want to return max(id) + 1.
My rows ..
Is there any simple way to convert .xls file to .csv file ? (Excel)
in C# code ?
i mean to take an existing .xls file and convert them to .csv file
Thanks in advance..
I tried this
WebDriver driver = new ChromeDriver();
But I'm getting the error as
Failed tests: setUp(com.TEST): The path to the driver executable must be set by the webdriver.chrome.driver system ..
I've made encrypting of the password in my register script and they are stored in the database, and I have to use them to login, so I would want to use the unencrypted ones to login. I've read some of..
What is the simplest most basic way to find out if a number/variable is odd or even in PHP?
Is it something to do with mod?
I've tried a few scripts but.. google isn't delivering at the moment...
I've just recently switched to a Mac from Ubuntu. I was disappointed that mac doesn't have the convenient sudo apt-get in Ubuntu. I've heard that I should use homebrew but I'm not exactly sure what ho..
I'm looking for a php function that will take an input string and return a sanitized version of it by stripping away all special characters leaving only alpha-numeric.
I need a second function that d..
I want to write a batch file that will do following things in given order:
Open cmd
Run cmd command cd c:\Program files\IIS Express
Run cmd command iisexpress /path:"C:\FormsAdmin.Site" /port:8088 /..
I'm trying to define my own exception class the easiest way, and this is what I'm getting:
public class MyException extends Exception {}
public class Foo {
public bar() throws MyException {
th..