In object-oriented programming (OOP), an inner class or nested class is a class declared entirely within the body of another class or interface. However in Java, an inner class is a non-static nested class.
I'm trying to understand about nested classes in C#. I understand that a nested class is a class that is defined within another class, what I don't get is why I would ever need to do this...
What is the main difference between an inner class and a static nested class in Java? Does design / implementation play a role in choosing one of these?..
I'm playing with lambdas in Java 8 and I came across warning local variables referenced from a lambda expression must be final or effectively final. I know that when I use variables inside anonymous c..
I'm trying to understand scope in nested classes in Python. Here is my example code:
class OuterClass:
outer_var = 1
class InnerClass:
inner_var = outer_var
The creation of class do..
I have the following code. I want to get hold of the outer class object using which I created the inner class object inner. How can I do it?
public class OuterClass {
public class InnerClass {
..
Is it possible to create an instance of an interface in Java?
Somewhere I have read that using inner anonymous class we can do it as shown below:
interface Test {
public void wish();
}
class Main..
Can someone please point me towards some nice resources for understanding and using nested classes? I have some material like Programming Principles and things like this IBM Knowledge Center - Nested ..
I'm building a User Class for my new website, however this time I was thinking to build it little bit differently...
C++, Java and even Ruby (and probably other programming languages) are allowing th..
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 have an upload script that I need to check the file extension, then run separate functions based on that file extension. Does anybody know what code I should use?
if (FILE EXTENSION == ???)
{
FUNC..
I'm trying to do this query
INSERT INTO dbo.tbl_A_archive
SELECT *
FROM SERVER0031.DB.dbo.tbl_A
but even after I ran
set identity_insert dbo.tbl_A_archive on
I am getting this error message..
I'm trying to select all rows that contain only alphanumeric characters in MySQL using:
SELECT * FROM table WHERE column REGEXP '[A-Za-z0-9]';
However, it's returning all rows, regardless of the fa..
Using Jenkins 1.501 and Jenkins Git plugin 1.1.26
I have 3 different git repos each with multiple projects.
Now I need to checkout all projects from the 3 git repos into the same workspace on a Jenk..
This is my .cs code :
protected void Gridview1_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
Gridview1.DeleteRow(e.RowIndex);
Gridview1.DataBind();
}
and this is markup,
<asp:gridvi..
How do I import a Python module given its relative path?
For example, if dirFoo contains Foo.py and dirBar, and dirBar contains Bar.py, how do I import Bar.py into Foo.py?
Here's a visual representa..
I want to get value from the database, in my case I use List to get the value from the database but I got this error
Exception in thread "main" java.lang.ClassCastException: [Ljava.lang.Object; cann..
jQuery trim not working. I wrote the following command to remove white space. Whats wrong in it?
var str = $('input').val();
str = jquery.trim(str);
console.log(str);
Fiddle example...
I have an input field:
<input name="Name" value="Enter Your Name">
How would I get it to remove the pre-defined text (Enter Your Name) when the user clicks the box.
As far as I am aware Java..
I'm trying to parse a bit.ly JSON response in javascript.
I get the JSON via XmlHttpRequest.
var req = new XMLHttpRequest;
req.overrideMimeType("application/json");
req.open('GET', BITLY_CREATE_..
I need a simple floating point rounding function, thus:
double round(double);
round(0.1) = 0
round(-0.1) = 0
round(-0.9) = -1
I can find ceil() and floor() in the math.h - but not round().
Is it..
I downloaded bootstrap 3.0 and can't get the glyphicons to work. I get some kind of "E003" error. Any ideas why this is happening? I tried both locally and online and I still get the same problem...
I have a large image which is shown on my homepage, and when the user clicks the "next_img" button the large image on the homepage should change to the next image in the array.
However, the next arr..
I have a spreadsheet with some values in column G. Some cells are empty in between, and I need to get the last value from that column into another cell.
Something like:
=LAST(G2:G9999)
except that..
In SQL, how can I remove the first 4 characters of values of a specific column in a table? Column name is Student Code and an example value is ABCD123Stu1231.
I want to remove first 4 chars from my t..
I'm trying to download a file from google drive in a script, and I'm having a little trouble doing so. The files I'm trying to download are here.
I've looked online extensively and I finally managed ..
I'm working in a C++ unmanaged project.
I need to know how can I take a string like this "some data to encrypt" and get a byte[] array which I'm gonna use as the source for Encrypt.
In C# I do
fo..
Is there a better way other than looping to find data in JSON? It's for edit and delete.
for(var k in objJsonResp) {
if (objJsonResp[k].txtId == id) {
if (action == 'delete') {
objJsonRes..
The usual way to pass a variable by reference in C++(also C) is as follows:
void _someFunction(dataType *name){ // dataType e.g int,char,float etc.
/****
definition
*/
}
int main(){
dataType v;
..
I am trying to install PHP(5.5).
I extracted the zip file in C:\php folder. And I also set the 'Path' system variable to C:\php. But when I open command prompt and type php I get error saying:
The..
I'm trying to add data as one by one row to a datagridview here is my code and it says:
"Index was out of range. Must be non-negative and less than the size of the collection
parameter name:inde..
I am working with a ruby on rails application and I am trying to sync a fork. It is worth mentioning that I am also on a Mac. I committed the following action:
$ git remote -v
to get a view of my l..
I have a javascript that dynamically builds an html page. In the html page there are textarea boxes for the user to type information in. The information already exists in a database. I would like t..
I want to find a specific key in a given map. If the key is found, I then want to get the value of that key from the map.
This is what I managed so far:
def mymap = [name:"Gromit", likes:"cheese", i..
How do I invoke a console application from my .NET application and capture all the output generated in the console?
(Remember, I don't want to save the information first in a file and then relist as..
I'm using ReactJS and part of my app requires pretty printed JSON.
I get some JSON like: { "foo": 1, "bar": 2 }, and if I run that through JSON.stringify(obj, null, 4) in the browser console, it pr..
I'm running a bash script in cron to send mail to multiple recipients when a certain condition is met.
I've coded the variables like this:
subject="Subject"
from="[email protected]"
recipients="user1..
I am having trouble with a React form and managing the state properly. I have a time input field in a form (in a modal). The initial value is set as a state variable in getInitialState, and is passed ..
How to show yesterday's date in my textbox the yesterday's date and at the same time, the today's date in ?
I have this home.php where I show the date yesterday(user cannot modify this-readonly) and..
I'm trying to compare a character array against a string like so:
const char *var1 = " ";
var1 = getenv("myEnvVar");
if(var1 == "dev")
{
// do stuff
}
This if statement never validates as true...
With Python 3 I am requesting a json document from a URL.
response = urllib.request.urlopen(request)
The response object is a file-like object with read and readline methods. Normally a JSON object..
I have a slider for a survey that display the following strings based on the value of the slider: "Very Bad, Bad, Okay, Good, Very Good".
Here is the code for the slider:
- (IBAction) sliderValueC..
I have a custom tag in a routeProvider template that that calls for a directive template. The version attribute will be populated by the scope which then calls for the right template.
<hymn ver="b..
Possible Duplicate:
Sorting or Finding Max Value by the second element in a nested list. Python
I have a list with ~10^6 tuples in it like this:
[(101, 153), (255, 827), (361, 961), ...]
..
Note: I realise this could be seen as a duplicate but i have looked at the other responses and they didn't fix the problem for me.
I have recently installed Zend Studio and Zend Server with the mys..
I need help in creating the 'libs' folder in Android Studio for my project (It is not auto-generated in my project).
When I want to create a folder, it gives me lots of options, like AIDL, Assets, JN..
I like Ruby on Rails and I use it for all my web development projects. A few years ago there was a lot of talk about Rails being a memory hog and about how it didn't scale very well but these suggest..
I would like to set up a table in PostgreSQL such that two columns together must be unique. There can be multiple values of either value, so long as there are not two that share both.
For instance:
..
What is the correct type for React events. Initially I just used any for the sake of simplicity. Now, I am trying to clean things up and avoid use of any completely.
So in a simple form like this:
e..
I'm trying to test a complicated JavaScript interface with Selenium (using the Python interface, and across multiple browsers). I have a number of buttons of the form:
<div>My Button</div>..
Whenever I try to drop database I get:
ERROR: database "pilot" is being accessed by other users
DETAIL: There is 1 other session using the database.
When I use:
SELECT pg_terminate_backend(pg_st..
I'm trying to invoke a WS over https on a remote host:remote port and I get:
Error fetching http headers
using the PHP5 SoapClient; I can get the list of functions by doing $client->__getFunc..
I can't believe I couldn't find a working solution to this after an hour of searching. I'm following this article on Entity Framework 6.0 which gives a simple walk-through on Code First. I created the..
I was installing android studio, but I have this problem when the program is starting:
Error:(1, 0) Your project path contains non-ASCII characters. This
will most likely cause the build to fail..
I'm having a weird configuration problem with Maven in Eclipse. Although I can build the project and deploy it to tomcat without any errors, The Marker tab keeps showing the following message:
[-] Ma..
I am trying to run the code presented on the second page:
http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-00-introduction-to-computer-science-and-programming-fall-2008/video-..
Can someone explain in an easy way how to make jQuery send actual JSON instead of a query string?
$.ajax({
url : url,
dataType : 'json', // I was pretty sure this would do the trick
..
Where is it acceptable to put css folders and image file folders? I was thinking inside the view folder? However the controller always reroutes the path to the base url so I have to specify the path i..
I want get the maximum value for this record. Please help me:
SELECT rest.field1
FROM mastertable AS m
INNER JOIN (
SELECT t1.field1 field1,
t2.field2
FR..
I am trying to change some for-each loops to lambda forEach()-methods to discover the possibilities of lambda expressions. The following seems to be possible:
ArrayList<Player> playersOfTeam = ..
I am getting this PHP error:
PHP Notice: Undefined offset: 1
Here is the PHP code that throws it:
$file_handle = fopen($path."/Summary/data.txt","r"); //open text file
$data = array(); // create ..
var user = {};
now I want to create a setUsers() method that takes a key/value pair object and initializes the user variable.
setUsers = function(data) {
// loop and init user
}
where..
I have a question about an intent...
I try to launch the sms app...
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.setType("vnd.android-dir/mms-sms");
int flags = Intent.FLAG_ACTIVITY_NEW_TAS..
I am doing some scripts in python. I create a string that I save in a file. This string got lot of data, coming from the arborescence and filenames of a directory.
According to convmv, all my arboresc..
My corporate web application is using Java applet to access users file system. There is no way for us to replace it with anything else for now.
How do I enable Java in Microsoft Edge?..
How to select data from mysql table past date to current date? For example, Select data from 1 january 2009 until current date ??
My column "datetime" is in datetime date type. Please help, thanks
E..
I tried to parse XML to R data frame, this link helped me a lot:
how to create an R data frame from a xml file
But still I was not able to figure out my problem:
Here is my code:
data <- xmlPar..
Which one is better in performance between Array of type Object and ArrayList of type Object?
Assume we have a Array of Animal objects : Animal animal[] and a arraylist : ArrayList list<Animal&g..
I am trying to implement the SearchView from the support library. I want the user to be to use the SearchView to filter a List of movies in a RecyclerView.
I have followed a few tutorials so far and ..
I am trying to figure out how to calculate covariance with the Python Numpy function cov. When I pass it two one-dimentional arrays, I get back a 2x2 matrix of results. I don't know what to do with ..
This is the error that is thrown when trying to run my web app:
[INFO] WARNING: Nested in org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.b..
I have solution & project in Visual Studio 2012.
The project has a file packages.config in the root of the project.
For the purposes of this question, lets assume I accidentally removed these l..
I'm calling json_encode() on data that comes from a MySQL database with utf8_general_ci collation. The problem is that some rows have weird data which I can't clean. For example symbol ?, so once it r..
I am processing xhtml using javascript. I am getting the text content for a div node by concatenating the nodeValue of all child nodes where nodeType == Node.TEXT_NODE.
The resulting string sometimes..
I have an integer
{% set curYear = 2013 %}
In {% if %} statement I have to compare it with some string. I can't set curYear to string at the beginning because I have to decrement it in loop.
How c..
I am getting the following error in RAD:
java.net.URISyntaxException: Illegal character in path at index 16: file:/E:/Program Files/IBM/SDP/runtimes/base......
Could you please let me know what is ..
I have noticed that buttons and other elements have a default styling and behave in 3 steps: normal view, hover/focus view and mousedown/click view, in CSS I can change the styling of normal view and ..
Is facade a class which contains a lot of other classes?
What makes it a design pattern? To me, it is like a normal class.
Can you explain to me this Facade pattern?..
I define a struct ...
type Session struct {
playerId string
beehive string
timestamp time.Time
}
Sometimes I assign an empty session to it (because nil is not possible)
session = Sessi..
I want to plot a confusion matrix to visualize the classifer's performance, but it shows only the numbers of the labels, not the labels themselves:
from sklearn.metrics import confusion_matrix
import..
Is there a rule-of-thumb for how to best divide data into training and validation sets? Is an even 50/50 split advisable? Or are there clear advantages of having more training data relative to validat..
I was surprised to learn that R doesn't come with a handy function to check if the number is integer.
is.integer(66) # FALSE
The help files warns:
is.integer(x) does not test if x
contains in..
What is the proper syntax for the .gitignore file to ignore files in a directory?
Would it be
config/databases.yml
cache/*
log/*
data/sql/*
lib/filter/base/*
lib/form/base/*
lib/model/map/*
lib/mode..
I would like to see if a particular string exists in a particular column within my dataframe.
I'm getting the error
ValueError: The truth value of a Series is ambiguous. Use a.empty,
a.bool()..
I have made a dtsx package on my computer using SQL Server 2008. It imports data from a semicolon delimited csv file into a table where all of the field types are NVARCHAR MAX.
It works on my comput..
I'm looking for something like createdb in PostgreSQL or any other solution that would allow me to create database with a help of a shell command. Any hints?..
I'm using two Arduinos to sent plain text strings to each other using newsoftserial and an RF transceiver.
Each string is perhaps 20-30 characters in length. How do I convert Serial.read() into a str..
I'm working with MATLAB for few days and I'm having difficulties to import a CSV-file to a matrix.
My problem is that my CSV-file contains almost only Strings and some integer values, so that csvread..
In the AppDelegate, I'm alloc'ing an instance defined in a static library. This instance has an NSString property set a "copy". When I access the string property on this instance, the app crashes wi..
I am running VBA code on a large spreadsheet. How do I clear the memory between procedures/calls to prevent an "out of memory" issue occurring?
Thanks..
I configured Maven 3.0.3 and tried to download a sample project using archetypes with this command:
mvn archetype:generate -DarchetypeGroupId=org.graniteds.archetypes
-Darche..
I'm using twitter bootstrap for some web app I'm forced to do (I'm not a web developer) and I can't find a way to disable the row lines for tables.
As you can see from the Bootstrap documentation, th..
I have written a few JUnit tests with @Test annotation. If my test method throws a checked exception and if I want to assert the message along with the exception, is there a way to do so with JUnit @T..
How do you play a video with AV Kit Player View Controller in Swift?
override func viewDidLoad() {
super.viewDidLoad()
let videoURLWithPath = "http://****/5.m3u8"
let videoURL..
I have a Flash project, and it has many source files. I have a fairly heavily-used class, call it Jenine. I recently (and, perhaps, callously) relocated Jenine from one namespace to another. I thought..
i have been seeing the words binary and source release in many websites download sections.
What do they actually mean?
For example, I have seen this in Groovy download page.
My question is how ..
I am trying to print the first element on the two arrays in my Athlete class, country and name. I also need to create a object that simulates three dive attemps an athlete had (that is initially set t..
I have been trying to build a code using maven. But I am stuck with an error.
The code is available on this github repo. google-play-crawler
My system configurations as shown by maven is followning:
..
I know that for older versions of .NET, you can determine if a given version is installed by following
https://support.microsoft.com/en-us/kb/318785
Is there an official method of determining if..
I'm working through some exercises and have got a warning that states:
Implicit conversion loses integer precision: 'NSUInteger' (aka 'unsigned long') to 'int'
#import <Foundation/Foundation..
I have got downloaded a file that got downloaded in a format .pynb.txt extension. Can anyone help me to figure how to make it in a readable format?
Attaching a screenshot of the file when i tried open..
I am using the php sdk to access a user's albums and photos in a website.
I am able to login and also able to retrieve all the info about the albums and photos.
However, I am not able to display thes..
I am working on a project that needs to connect to an https site. Every time I connect, my code throws exception because the certificate of that site comes from untrusted site. Is there a way to bypa..
The user will read a line and i will retain the first word as a command for execvp.
Lets say he will type "cat file.txt" ... command will be cat . But i am not sure how to use this execvp(), i read ..
How do I get this directory out of conflict? I don't care if it's resolved using "theirs" or "mine" or whatever...
PS C:\Users\Mark\Desktop\myproject> svn ci -m "gr"
svn: Commit failed (details f..
I have this:
hash = { "a"=>["a", "b", "c"], "b"=>["b", "c"] }
and I want to get to this: [["a","b","c"],["b","c"]]
This seems like it should work but it doesn't:
hash.each{|key,value| val..
I have a WinForms app that I am trying to make full screen (somewhat like what VS does in full screen mode).
Currently I am setting FormBorderStyle to None and WindowState to Maximized which gives me..
There's an option to hide the version so it will display only nginx, but is there a way to hide that too so it will not show anything or change the header?..
I have the following code in a Selenium 2 Web Driver test which works when I am debugging but most of the time fails when I run it in the build. I know it must be something to do with the way the page..
In my application I need to get the hour and minute separately:
NSString *currentHour=[string1 substringWithRange: NSMakeRange(0,2)];
int currentHourInNumber=[currentHour intValue];
Conside..
In C++03, an expression is either an rvalue or an lvalue.
In C++11, an expression can be an:
rvalue
lvalue
xvalue
glvalue
prvalue
Two categories have become five categories.
What are these..
It is very simple question.
I am trying to return a table from a stored procedure, like
select * from emp where id=@id
I want to return this query result as a table. I have to do this through a st..
I have problem with changing a dict value and saving the dict to a text file (the format must be same), I only want to change the member_phone field.
My text file is the following format:
memberID:m..
I just updated Java to 1.8 u25, and now I get this message every time I try to open Eclipse
I have no clue what I'm doing wrong, when it comes to Eclipse. I have re-downloaded it number of times bu..
I am trying to pass in a JSON file and convert the data into a dictionary.
So far, this is what I have done:
import json
json1_file = open('json1')
json1_str = json1_file.read()
json1_data = json.lo..
We're creating a new project in IntelliJ and must have something wrong because when we right click on a directory, select New and then get the context menu, Java based options are not shown. Currently..
I have seen many programs consisting of structures like the one below
typedef struct
{
int i;
char k;
} elem;
elem user;
Why is it needed so often? Any specific reason or applicable area?..
What is the most idiomatic way to do the following?
def xstr(s):
if s is None:
return ''
else:
return s
s = xstr(a) + xstr(b)
update: I'm incorporating Tryptich's suggestio..
I am using Oracle SQL Developer.
I essentially have a table of pictures that holds the columns:
[DATE_CREATED(date), NUM_of_PICTURES(int)]
and if I do a select *, I would get an output similar to:
..
I can't seem to get Python to import a module in a subfolder. I get the error when I try to create an instance of the class from the imported module, but the import itself succeeds. Here is my directo..
What I have:
I have jQuery AJAX function that returns HTML after querying a database. Depending on the result of the query, the function will either return HTML code or nothing (i.e. blank) as desire..
doStuff(document.getElementById("myCircle1" "myCircle2" "myCircle3" "myCircle4"));
This doesn't work, so do I need a comma or semi-colon to make this work?..
I am trying to convert the Spark RDD to a DataFrame. I have seen the documentation and example where the scheme is passed to
sqlContext.CreateDataFrame(rdd,schema) function.
But I have 38 columns o..
My data looks like this:
library(tidyverse)
df <- tribble(
~a, ~b, ~c,
1, 2, 3,
1, NA, 3,
NA, 2, 3
)
I can remove all NA observations with drop_na():
df %>% drop_na()
Or..
I make my game run without mouse so using pointer is not a choice. High Score menu will show when player lose.
this is my code
highScore=new MyTextField("Your Name");
highScore.addKeyListene..
Is there a way to check if a column exists in a Pandas DataFrame?
Suppose that I have the following DataFrame:
>>> import pandas as pd
>>> from random import randint
>>> d..
In Python 2.5, is there a way to create a decorator that decorates a class? Specifically, I want to use a decorator to add a member to a class and change the constructor to take a value for that memb..
I am running this DB call to get me multi-dimensional array
I am trying to get the keys of each but when I try it comes up blank or as array.
$root_array = array();
$sites = $this->sites($membe..
I need to draw a horizontal line after some block, and I have three ways to do it:
1) Define a class h_line and add css features to it, like
#css
.hline { width:100%; height:1px; background: #fff }
..
I am evaluating Oracle SQL Developer.
My tnsnames.ora is populated, and a tnsping to a connection defined in tnsnames.ora works fine. Still, SQL Developer does not display any connections.
Oracle SQ..
if i had a query such as
select * from tbl_foo where name = 'sarmen'
and this table has multiple instances of name = sarmen how can i virtually assign row numbers to each row without having to crea..
Oracle's default date format is YYYY-MM-DD. Which means if I do:
select some_date from some_table
...I lose the time portion of my date.
Yes, I know you can "fix" this with:
alter session set ..
What is the main difference between
@Before and @BeforeClass
and in JUnit 5 @BeforeEach and @BeforeAll
@After and @AfterClass
According to the JUnit Api @Before is used in the following case:
..
I am following the tutorials at docs.mongodb.org, I have completed the first tutorial which was to install mongodb on a windows machine. I am now at the second stage which is getting started with mong..
If I wanted to auto-click a button element on page load, how would I go about this using jQuery?
The button html is
<button class="md-trigger" id="modal" data-modal="modal"></button>
A..
I am trying to restore the backup taken from a SQL Server 2012 to SQL Server 2008 R2, and it giving an error
Specified cast is not valid. (SqlManagerUI)
If you have any solution to this please ..
I am trying to get the background image of my content to appear behind the header and footer. Currently, the top of the content's background is sticking out onto the header, and you can see that the b..
Possible Duplicate:
Why can't I handle a KeyboardInterrupt in python?
I was playing around with some Python code and created an infinite loop:
y = 0
x = -4
itersLeft = x
while(itersLe..
How do I make an entire DIV a clickable hyperlink. Meaning, I essentially want to do:
<div class="myclass" href="example.com">
<div>...</div>
<table><tr>..</t..
I am new to Python and want to read keyboard input into an array. The python doc does not describe arrays well. Also I think I have some hiccups with the for loop in Python.
I am giving the C code sn..
So my MySQL database is behaving a little bit wierd. This is my table:
Name shares id price indvprc
cat 2 4 81 0
goog 4 4 20 20
fb 4 9 20 20
I'm getting th..
I need to call a method from a webservice, so I've written this code:
private string urlPath = "http://xxx.xxx.xxx/manager/";
string request = urlPath + "index.php/org/get_org_form";
WebRequest we..
I'm wondering how I can check if a string contains either "value1" or "value2"?
I tried this:
If strMyString.Contains("Something") Then
End if
This works, but this doesn't:
If strMyString.Contain..
Just started working with Node.js. In my app/js file, I am doing something like this:
app.js
var http = require('http');
http.createServer(function (request, response) {
response.writeHead(200, {..
I have a thread which extends Thread. The code looks a little like this;
class MyThread(Thread):
def run(self):
# Do stuff
my_threads = []
while has_jobs() and len(my_threads) < 5:
..
Some of my script are using different encoding, and when I try to combine them, this has becom an issue.
But I can't change the encoding they use, instead I want to change the encodig of the result f..
I need to upload only image file through <input type="file"> tag.
Right now, it accepts all file types. But, I want to restrict it to only specific image file extensions which include .jpg, .g..
I have a list of named values:
myList <- list('A' = 1, 'B' = 2, 'C' = 3)
I want a vector with the value 1:3
I can't figure out how to extract the values without defining a function. Is there a sim..
I need to set the text within a DIV element dynamically. What is the best, browser safe approach? I have prototypejs and scriptaculous available.
<div id="panel">
<div id="field_name">T..
I'm trying to create an alias that opens google chrome to localhost. Port 80 in this case.
I'd also really like to be able to be in any git directory and have it open that specific project in the br..
I have a certain element that I can select with Selenium 1.
Unfortunately I need to click the parent element to get the desired behaviour. The element I can easily locate has attribute unselectable, ..
How do I restart MySQL on Windows 7?
I'm using HeidiSql as a front end and there's no option in there.
The only other things I have is the MySQL 5.5 command line client...
I'm not sure if this is Flask specific, but when I run an app in dev mode (http://localhost:5000), I cannot access it from other machines on the network (with http://[dev-host-ip]:5000). With Rails in..
Since the last update, I'm having an error with cookies, related with SameSite attribute.
The cookies are from third party developers (Fontawesome, jQuery, Google Analytics, Google reCaptcha, Google ..
I have written a simple code to illustrate my predicament.
Sub test()
Dim sh As Worksheet
Set sh = ThisWorkbook.Sheets("Sheet1")
Dim k As Long
k = sh.Range("A1", sh.Range("A1").End..
I've build a web page that let's you select a page name from a drop down list and then transfers the browser to that page. The code that does the transfer is
if (url){
window.open(url, '_blank')..
VScode notifies you when you open a config of an extension:
remember to Restart VScode
But it says nothing about how. They use capital letter for restart word, so normally it should mean somet..
In my shell script I am running a command which is asking me for input.
How can I give the command the input it needs automatically?
For example:
$cat test.sh
ssh-copy-id [email protected]
When run..
I have a web document with scroll. I want to get the value, in pixels, of the current scroll position. When I run the below function it returns the value zero. How can I do this?
<script type="..
What kind of purpose do .axd files serve?
I know that it is used in the ASP.Net AJAX Toolkit and its controls. I'd like to know more about it.
I tried Googling for it, but could not find getting ba..
I'm creating a customized WordPress theme based on an existing site.
I want to use an alternate dashboard which I have created.
How can I have the user directed to 'news.php' after login instead of ..
I'm quite sure this a common question, but I'm pretty new to JS and am having some trouble with this.
I would like to load x.html into a div with id "y" without using iframes. I've tried a few things..
To be honest, I've tried to turn a dirty trick on IIS and just when I thought that I was going to get away with it, I realized my workaround doesn't work. Here's what I've tried to do:
1) I have ASP...
In an error condition, I tried to return nil, which throws the error:
cannot use nil as type time.Time in return argument
What is the zero value for time.Time?..
I am trying to use jQuery to do something like
if(jQuery('#id').click) {
//do-some-stuff
} else {
//run function2
}
But I'm unsure how to do this using jQuery ? Any help would be greatly ap..
I need to run a shell command asynchronously from a Python script. By this I mean that I want my Python script to continue running while the external command goes off and does whatever it needs to do...
Is there an immutable alternative to the primitive arrays in Java? Making a primitive array final doesn't actually prevent one from doing something like
final int[] array = new int[] {0, 1, 2, 3};
ar..
I usually run a program as :
./a.out arg1 arg2 <file
I would like to debug it using gdb.
I am aware of the set args functionality, but that only works from the gdb prompt...
I have multiple property files that I want to load from classpath. There is one default set under /src/main/resources which is part of myapp.jar. My springcontext expects files to be on the classpath...
Where does the name 'default' come from when launching a vagrant box?
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
Is there a way to set this?..
When I draw a shape using:
canvas.create_rectangle(10, 10, 50, 50, color="green")
Does Tkinter keep track of the fact that it was created?
In a simple game I'm making, my code has one Frame creat..
I have started to write app that can run on Google App Engine.
But when I wanted to use my code from Netbeans to Eclipse I had an errors on:
import javax.servlet.annotation.WebServlet;
and
@WebServle..
I'm really confused about the differences between big O, big Omega, and big Theta notation.
I understand that big O is the upper bound and big Omega is the lower bound, but what exactly does big ? (..
I am looking for a way to show or hide HTML5 video controls at will via javascript. The controls are currently only visible when the video starts to play
Is there a way to do this with the native vid..
I know that PHP doesn't yet have native Enumerations. But I have become accustomed to them from the Java world. I would love to use enums as a way to give predefined values which IDEs' auto-completion..
I'm reading the Laravel Blade documentation and I can't figure out how to assign variables inside a template for use later. I can't do {{ $old_section = "whatever" }} because that will echo "whatever"..
I have a JSON string (from PHP's json_encode() that looks like this:
[{"id": "1", "name":"Aaa"}, {"id": "2", "name":"Bbb"}]
I want to parse this into some sort of data structure for my iPhone app. ..
I am having an API endpoint and Authorization token for that API.
The said API is for .xls report download, how can I view the downloaded .xls file using (if possible) Postman?
If it is not possible..
When would you set location to a URL string versus setting location.href?
location = "http://www.stackoverflow.com";
vs
location.href = "http://www.stackoverflow.com";
Mozilla Developer Network ..
I am trying to develop a Android application using Android Studio,
so I created an Android app and I want to publish it.
Whenever I click on “build project“ to obtain the apk file,
I get this erro..
I have a REST service that reads a file and sends it to another console application after converting it to Byte array and then to Base64 string. This part works, but when the same stream is received a..
I know I can open config files that are related to an assembly with the static ConfigurationManager.OpenExe(exePath) method but I just want to open a config that is not related to an assembly. Just a ..
What exactly does the __block keyword in Objective-C mean? I know it allows you to modify variables within blocks, but I'd like to know...
What exactly does it tell the compiler?
Does it do anythin..
I am having aproblem using Twitter Bootstrap from my ASP.NET application. When I use the table table-striped css class to my asp:GridView control, it treats the Header of the table as a Row.
My GridV..
I'm trying to set the scroll position on a page so the scroller is scrolled all the way to the top.
I think I need something like this but it's not working:
(function () { alert('hello'); document...
I'm wondering if there's a way to count lines inside a div for example. Say we have a div like so:
<div id="content">hello how are you?</div>
Depending on many factors, the div can have..