innerHTML is a DOM node's property that gets or sets the inner HTML code of an HTML element. It is commonly used in Javascript to dynamically change or read from a page.
I tried to load some scripts into a page using innerHTML on a <div>. It appears that the script loads into the DOM, but it is never executed (at least in Firefox and Chrome). Is there a way to h..
Why do I get an error or Uncaught TypeError: Cannot set property 'innerHTML' of null?
I thought I understood innerHTML and had it working before.
<!DOCTYPE HTML>
<html>
<head>
<m..
Does anyone know how to get the HTML out of an IFRAME I have tried several different ways:
document.getElementById('iframe01').contentDocument.body.innerHTML
document.frames['iframe01'].document.body..
I'm trying to clear the div's innerHTML before repopulating it. I tried removeData() but once that's called, when I try to add the data, I get nothing from the next line after remove whereas if I rem..
Althought I pushed a parameter to getElementById I wonder from where is this 'is null' error coming from?
TypeError: document.getElementById(...) is null
[Break On This Error]
document.getElemen..
I'm trying to replace html using innerHTML javascript.
From:
aaaaaa/cat/bbbbbb
To:
<a href="http://www.google.com/cat/world">Helloworld</a>
This's my code
<html>
<head>..
Why doesn't the following work for me?
<script>
document.getElementById('lbltipAddedComment').innerHTML = 'Your tip has been submitted!';
</script>
<label id="lbltipAddedComment"&g..
I've been fiddling with this for a while but it won't work and I can't figure out why. Please help. Here is what I have:
<html>
<head>
<title>lala</title>
</head>
&l..
For a website I'm doing, I want to load one div, and hide another, then have two buttons that will toggle views between the div using JavaScript.
This is my current code
_x000D_
_x000D_
function rep..
In the following example code, I attach an onclick event handler to the span containing the text "foo". The handler is an anonymous function that pops up an alert().
However, if I assign to the paren..
Can I completely rely upon jQuery's html() method behaving identical to innerHTML? Is there any difference between innerHTML and jQuery's html() method? If these methods both do the same, can I use jQ..
Can anyone explain what is theses errors?
Uncaught TypeError: cannot read property 'innerHTML' of null
View on my website
This is the line which is causing the error:
var idPost=document.getEle..
I'm attempting to add this code to a dynamically created div element
style = "width:330px;float:left;"
The code in which creates the dynamic div is
var nFilter = document.createElement('div');
n..
Is there any "behind the scenes" difference from setting an element's innerHTML vs setting the dangerouslySetInnerHTML property on an element? Assume I'm properly sanitizing things for the sake of sim..
I want to be able to add multiple rows to a div and also removing them. I have a '+' button at the top of the page which is for adding content. Then to the right of every row there is a '-' button tha..
I've got a script that inserts some content into an element using innerHTML.
The content could for example be:
<script type="text/javascript">alert('test');</script>
<strong>test&l..
I need a way to append HTML to a container element without using innerHTML. The reason why I do not want to use innerHTML is because when it is use like this:
element.innerHTML += htmldata
It works ..
I have a php generated list whose list items are selectable using jquery selectable widget. The list for all intents and purposes is:
<ul id="#select-image">
<li class="ui-widget-content..
I am getting chunks of HTML codes from HTTP calls. I put the HTML blocks in a variable and insert it on my page with[innerHTML] but i can not style the inserted HTML block. Does anyone have any sugges..
When I refresh the page below in FF 3.0, I expected the web page to clear but it didn't.
Why doesn't document.body.innerHTML = "" clear the page?
UPDATE:
I am trying to clear the previous screen dur..
Are we supposed to use something else aside from image-url and others in Rails 4? They return different values that don't seem to make sense. If I have logo.png in /app/assets/images/logo.png and I do..
I have created an xcode project. Now I want to give .app file to my friend to use that application. From where do I get this file? How to install this .app file in his Applications folder using an ins..
I need to convert objects to a byte[] to be stored in the Tokyo Cabinet key-value store.
I also need to unbyte the byte[] to an Object when reading from the key-value store.
Are there any packages ou..
I am trying to deploy Rails app with the Puma web server. When trying to start Puma server with a config file bundle exec puma -C config/puma.rb I get an error that the address is already in use.
Doe..
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..
In Java is there a way to find out if first character of a string is a number?
One way is
string.startsWith("1")
and do the above all the way till 9, but that seems very inefficient. ..
I use Git in Windows, and want to push the executable shell script into git repo by one commit.
Usually I need to do two steps (git commit).
$ vi install.sh
$ git add install.sh
$ git commit -am "..
I would like to know to align the text in a p element to be vertically centered.
Here are my styles:
_x000D_
_x000D_
p.event_desc {
font: bold 12px "Helvetica Neue", Helvetica, Arial, sans-serif;..
I have a Windows 10 PC and I want to install pyaudio to use it with my chatbot, powered by chatterbot.
I tried 2 different ways to install pyaudio.
The first way is doing this on the command prompt:..
I am trying to make a scatter plot and annotate data points with different numbers from a list.
So, for example, I want to plot y vs x and annotate with corresponding numbers from n.
y = [2.56422, 3...
How could I make Python say some text?
I could use Festival with subprocess but I won't be able to control it (or maybe in interactive mode, but it won't be clean).
Is there a Python TTS library? Li..
I'm trying to export a complete CSV to Excel by using Powershell. I stuck at a point where static column names are used. But this doesn't work if my CSV has generic unknown header names.
Steps to rep..
I am attempting to filter users by a custom field in each users profile called profile. This field is called level and is an integer between 0-3.
If I filter using equals, I get a list of users with ..
Is there any real practical difference between "java -server" and "java -client"?
All I can find on Sun's site is a vague
"-server starts slower but should run faster".
What are the real d..
I have a poorly designed class in a 3rd-party JAR and I need to access one of its private fields. For example,
why should I need to choose private field is it necessary?
class IWasDesignedPoorly {
..
I am trying to use Console class to get input from user but a null object is returned when I call System.console(). Do I have to change anything before using System.console?
Console co=System.console..
I am running low on disk space and checked through a third party utility that among other things that ~/Library/Developer/Xcode/DerivedData directory is taking about 22GB of disk space.
I searched st..
I have below class
class Cdata12Mnt
{
public:
char IOBname[ID1_IOB_PIOTSUP-ID1_IOB_TOP][BOADNAM_MAX + 4];
char ExIOBname[ID1_MAX_INF-ID1_EXIOB_U1TOP][BOADNAM_MAX + 4];
char cflpath[256];
..
I have an SQL table with 11000 keywords in it.
I want a query that can find fields which contain a certain letter.
So, if I include "a" and "b" the query will select all fields which contain the let..
Before loading the collection view user sets the number of image in the array of collection view. All of the cells don't fit on the screen. I have 30 cells and only 6 on the screen.
The question: How..
Is there a way to disable margin-collapsing altogether? The only solutions I've found (by the name of "uncollapsing") entail using a 1px border or 1px padding. I find this unacceptable: the extraneo..
This is my first time here so I hope I'm doing things right.
First of all, I have been investigating this for quite a while, and have found many useful tips for manipulating cell colors in Excel, but..
I have access database file with 7 tables in it but I don't know how to connect and show all tables, If some one can help me?
this is my code but it doesn't show anything
private void button1_Click..
I have a problem where i'm initialising a variable on the scope in a controller. Then it gets changed in another controller when a user logs in. This variable is used to control things such as the nav..
Is there any good software that will allow me to search through my SVN respository for code snippets? I found 'FishEye' but the cost is 1,200 and well outside my budget...
I have a UITextField that I want to enlarge its width when tapped on. I set up the constraints and made sure the constraint on the left has the lower priority then the one that I am trying to animate ..
I receive a JSON object from an AJAX call to a REST server. This object has property names that match my TypeScript class (this is a follow-on to this question).
What is the best way to initialize it..
ERROR GServerHandler - java.io.IOException: Connection reset by peer
java.io.IOException: Connection reset by peer
at sun.nio.ch.FileDispatcher.read0(Native Method)
at sun.nio.ch.Sock..
I'm trying to read a BMP file in Python. I know the first two bytes
indicate the BMP firm. The next 4 bytes are the file size. When I execute:
fin = open("hi.bmp", "rb")
firm = fin.read(2)
file_si..
I'm trying to create a Python function that does the same thing as this wget command:
wget -c --read-timeout=5 --tries=0 "$URL"
-c - Continue from where you left off if the download is interrupted...
I would like to build a navigation-bar effect like it is on http://dootrix.com/ on my page (after scrolling down the bar getting smaller and the logo changes). Im using bootstrap 3 for my page. Is the..
Trying to follow various instructions on creating a self-signed cert for use with localhost, Most of the instructions seem to be for IIS, but I'm trying to use Nodejs/Express. None of them work pro..
I need to be able to parse XML using JavaScript. The XML will be in a variable. I would prefer not to use jQuery or other frameworks.
I have looked at this, XML > jQuery reading...
I need to make a toggle button using two image instead of ON/OFF state.
At off state i set a background image.But the OFF text can not removed while i use background image.
And i can not set another..
I was trying to make my JTextField fill the width and set a height for it but still failed. I tried adding the code setPreferredSize(new Dimension(320,200)); but still failed. Is there any way I can m..
I have a file with some custom tags and I'd like to write a regular expression to extract the string between the tags. For example if my tag is:
[customtag]String I want to extract[/customtag]
How..
I want to use jQuery to GET a URL and explicitly check if it responded with a 302 redirect, but not follow the redirect.
jQuery's $.ajax appears to always follow redirects. How can I prevent this, a..
I am using spring 3 MVC and i have below classes.
External system would call my application using below URL:
http://somehost/root/param1/param2/param3
I have a spring MVC controller method as belo..
For running an ASP.NET Core application, I generated a dockerfile which build the application and copys the source code in the container, which is fetched by Git using Jenkins. So in my workspace, I d..
I am trying to convert DO to DTO using java and looking for automated tool before start writing my own. I just wanted to know if there any free tool available for the same...
This is my 960 grid system case:
<div class="kundregister_grid_full">
<div class="kundregister_grid_1">ID</div>
<div class="kundregister_grid_1">Namn</div>
&..
How can I test an iOS application on my iPod Touch without registering for the Apple Developer Program or jailbreaking my iPod?
Neither is a viable option at the moment.
I'd like to test on the devi..
I have a Postgres db 9.1 running on AWS EC2, with ubuntu 12.04.
I messed a lot with the instance (i.e installed all kinds of postgres X.X before i settled on 9.1).
Now after a month working on that ..
I need to warn users about unsaved changes before they leave a page (a pretty common problem).
window.onbeforeunload = handler
This works but it raises a default dialog with an irritating standard me..
I'm writing a macro that creates tickets on a database based on alerts received from a Nagios server as an email. However, I cannot let the macro run in an infinite loop while checking for mails becau..
I've read various articles about mocking vs stubbing in testing, including Martin Fowler's Mocks Aren't Stubs, but still don't understand the difference...
I have create a js file in which i am creating the dynamic table and dynamically changing the click event for the calendar but onclicking the calender image for dynamic generated table, calendar popup..
In SQL Server 2008 Management Studio, when I right click on a database table and choose "Select Top 100 Rows", I can then e.g. easily add a "ORDER BY " statement to the SQL. That works fine.
But when..
I would like to take a database of say, 1000 users and select 20 random ones (ORDER BY rand(),LIMIT 20) then order the resulting set by the names. I came up with the following query which is not worki..
I am using JDK 1.7, Apache Tomcat 7.0.23 and I have placed JSTL core library(1.2) and STANDARD jar in WEB_INF lib folder it is not giving me any warning but when I will try to run the code
<%@ ta..
I want to know the context in which getContentResolver() is called?
I have a scenario like this:
I have an activity A that calls a method myFunc() of class B which is not an activity.
So, in class B ..
I created with Adobe Flash an .apk app through Air for Android.
Now I would like to make it ready for the Blackberry App World with this Blackberry online packager: https://bdsc.webapps.blackberry.co..
I'm curious if there's any way to do a query in Django that's not a "SELECT * FROM..." underneath. I'm trying to do a "SELECT DISTINCT columnName FROM ..." instead.
Specifically I have a model that l..
I'd need a program to be run every time I startup my ubuntu linux. So I'd need to add it to my startup programs list. Just one problem: I'd need to do it via terminal...
I know it sounds easy. I need to put a text in center, but when the text is too long it needs to go below, but still align in the center of my xml.
Here's my code :
<LinearLayout
android:la..
If I wish to submit a http get request using System.Net.HttpClient there seems to be no api to add parameters, is this correct?
Is there any simple api available to build the query string that doesn..
The general advise is that you should not call GC.Collect from your code, but what are the exceptions to this rule?
I can only think of a few very specific cases where it may make sense to force a ga..
We have two columns in a DataTable, like so:
COL1 COL2
Abc 5
Def 8
Ghi 3
We're trying to sort this datatable based on COL2 in decreasing order.
COL1 COL2
ghi 8
a..
I've got a project checked locally from GitHub, and that remote repository has since had changes made to it. What's the correct command to update my local copy with the latest changes?..
Please take a look at the picture below.
When we create an object in java with the new keyword, we are getting a memory address from the OS.
When we write out.println(objName) we can see a "special" ..
Our TFS server has some temporary connectivity issues right now, and as such VS has gone unresponsive, leaving 50+ developers unable to work!
Is it possible to switch TFS into an offline mode in the ..
I have a table with over million rows. I need to reset sequence and reassign id column with new values (1, 2, 3, 4... etc...). Is any easy way to do that?..
I read The Programming Language Swift by Apple in iBooks, but cannot figure out how to make an HTTP request (something like cURL) in Swift. Do I need to import Obj-C classes or do I just need to impor..
I am reading the Python cookbook at the moment and am currently looking at generators. I'm finding it hard to get my head round.
As I come from a Java background, is there a Java equivalent? The book..
I have a problem when I try to center the div block "products" because I don't know in advance the div width. Anybody have a solution?
Update: The problem I have is I don't know how many products I'..
How do I auto increment the primary key in a SQL Server database table, I've had a look through the forum but can't see how.
I've looked the the properties but can't see an option, I have seen an ans..
I am trying to deploy mod_wsgi with apache to run a django application but I am getting an error 500 internal server error The apache logs shows:
[Thu Jun 23 14:01:47 2011] [error] [client 152.78.95...
I want to verify if a method is called at least once through mockito verify. I used verify and it complains like this:
org.mockito.exceptions.verification.TooManyActualInvocations:
Wanted 1 time:
Bu..
Here is the question:
"Write a method named gcd that accepts two integers as parameters and returns the greatest common divisor of the two numbers. The greatest common divisor (GCD) of two integers a..
I know this is a very rudimentary question, but to my surprise, I could not find any document about Android SDK Build-tools.
Besides Android SDK Tools and Android SDK Platform-tools, there are a bunch..
Given a value I want to validate it to check if it is a valid year. My criteria is simple where the value should be an integer with 4 characters. I know this is not the best solution as it will not al..
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 always initialized my strings to NULL, with the thinking that NULL means the absence of a value and "" or String.Empty is a valid value. I have seen more examples lately of code wher..
I'm dealing with a JSON Response in one of my applications. I have established a connection using jsonp successfully. But I'm not able to parse my response.
Code:
<script type='text/javascript'&g..
I know we can set the following values to the android:gravity and android:layout_gravity properties:
center
center_vertical
center_horizontal, etc.
But I am confused regarding both of these.
Wha..
I have a simple JavaScript Array object containing a few numbers.
[267, 306, 108]
Is there a function that would find the largest number in this array?..
I am using a wordpress site. I just want to know , How to get a plain text from encrypted password(stored in wordpress database). I used the $wp_hasher->CheckPassword($plain_password, $password_has..
I have long titles and want truncate them but in a way that no words break, I mean the cutting happen between words not cutting a word.
How can I do it using jquery?..
If I want find the differences between two directory trees, I usually just execute:
diff -r dir1/ dir2/
This outputs exactly what the differences are between corresponding files. I'm interested in..
I'm working on a local environment and I'm not sure if I've written my src URl correctly because my functions aren't working. The bold script tag has the src in question.
<!DOCTYPE html>
<h..
I'm having trouble trying to achieve some very basic layout behavior with Auto Layout. My view controller looks like this in IB:
The top label is the title label, I don't know how many lines it wil..
How do I hide the x-axis label/text that is displayed in chart.js ?
Setting scaleShowLabels:false only removes the y-axis labels.
<script>
var options = {
scaleFontColor: "#fa0",
..
How to get the double value that is only two digit after decimal point.
for example
if
i=348842.
double i2=i/60000;
tv.setText(String.valueOf(i2));
this code generating 5.81403333.
But I want ..
This is an incredibly simple question, but I'm new to makefiles. I am trying to make a makefile that will compile two independent programs:
program1:
gcc -o prog1 program1.c
program2:
gcc -o..
How do I use a ConcurrentLinkedQueue in Java?
Using this LinkedQueue, do I need to be worried about concurrency in the queue? Or do I just have to define two methods (one to retrive elements from the ..
I would like to include an "AND" condition for one of the conditions I have in my COUNTIFS clause.
Something like this:
=COUNTIFS(A1:A196;{"Yes"or "NO"};J1:J196;"Agree")
So, it should return the n..
I am creating the following array from data attributes and I need to be able to grab the highest and lowest value from it so I can pass it to another function later on.
var allProducts = $(products)...
I use Ubuntu and installed cURL on it. I want to test my Spring REST application with cURL. I wrote my POST code at the Java side. However, I want to test it with cURL. I am trying to post a JSON data..
I have a python script parse.py, which in the script open a file, say file1, and then do something maybe print out the total number of characters.
filename = 'file1'
f = open(filename, 'r')
content ..
I have big Maven (Tycho) project witch about 400 plug-ins.
We have specified version of application in each POM file.
Is there a way how to specify the version for all POM:s only on one place?
I wo..
I'm looking for the best way to change the backgroundColor of an NSView. I'd also like to be able to set the appropriate alpha mask for the NSView. Something like:
myView.backgroundColor = [NSColor..
Quick and short of it is I'm having problems summarizing count and aggregate functions with conditions on the same factor.
Suppose I have this dataframe:
library(dplyr)
df = tbl_df(data.frame(
..
Is there any function that would be the equivalent of a combination of df.isin() and df[col].str.contains()?
For example, say I have the series
s = pd.Series(['cat','hat','dog','fog','pet']), and I ..
The Java API for regular expressions states that \s will match whitespace. So the regex \\s\\s should match two spaces.
Pattern whitespace = Pattern.compile("\\s\\s");
matcher = whitespace.matcher(mo..
I am trying to add a width to a div, but I seem to be running into a problem because it has no content.
Here is the CSS and HTML I have so far, but it is not working:
CSS
body{
margin:0 auto;
width:10..
I am beginner to spring, ESP Inversion of control. I was puzzled understanding the difference between the following
<bean id="demo" class="Demo" lazy-init="false"/>
<bean id="demo" class=..
I need to loop through a form by moving to the next record in the recordset.
I am using the Form_Current event to loop thru.
I have used a couple of statements and have different outcomes.
This one ..
What is the difference between a single precision floating point operation and double precision floating operation?
I'm especially interested in practical terms in relation to video game consoles. Fo..
I'am new to C and would like to play with threads a bit. I would like to return some value from a thread using pthread_exit()
My code is as follows:
#include <pthread.h>
#include <stdio.h&g..
I want to convert the following JSON string to a java object:
String jsonString = "{
"libraryname":"My Library",
"mymusic":[{"Artist Name":"Aaron","Song Name":"Beautiful"},
{"Artist Name":"Britney","..
I have just switched from a MAMP installation to a native Apache, MySql and PHP installation. I have got everything working, but I have started using my web app in the new environment and suddenly any..
I would like to make several statements that give standard output without seeing newlines in between statements.
Specifically, suppose I have:
for item in range(1,100):
print item
The result i..
I am writing some python code and I am receiving the error message as in the title, from searching this has to do with the character set.
Here is the line that causes the error
hc = HealthCheck("in..
A common problem that new Java developers experience is that their programs fail to run with the error message: Could not find or load main class ...
What does this mean, what causes it, and how sho..
This will be my first git use. I have added new files ( a lot ) to the folder/project ( git local repository).
I went through online tutorials and forums and see i can do
git commit -a
So I go to the..
I'm new to php and wanted to run php from command line. I have installed WAMP and set the "System Variables" to my php folder ( which is C:\wamp\bin\php\php5.4.3).
When i go to Run -> CMD -> Type php..
This is my package.json:
{
"name": "my-example-app",
"version": "0.1.0",
"dependencies": {
"request": "*",
"nano": "3.3.x",
"async": "~0.2"
}
}
Now, when I open the cmd and run npm install..
Is there a way to get the (to-be-generated) SQL from a Hibernate Criteria?
Ideally, I would have something like:
Criteria criteria = session.createCriteria(Operator.class);
... build up the criteri..
I am trying to figure out how to toggle an active class onClick to change CSS properties.
I have taken many approaches, and read many SO answers. Using jquery it would be relatively simple , however,..
Possible Duplicate:
Difference between OnClick() event and OnClickListener?
I'm semi-new to Android development and when I first started I tried to avoid using the xml layout by any means n..
I have a pandas dataframe. I want to print the unique values of one of its columns in ascending order. This is how I am doing it:
import pandas as pd
df = pd.DataFrame({'A':[1,1,3,2,6,2,8]})
a = df['..
I have a simple POST script that I need to return to the page that was doing the Posting.
Is there any way to do it like this?
if($done)
{
//go to page
}
..
A colleague once told me that the last option when everything has failed to debug on Linux was to use strace.
I tried to learn the science behind this strange tool, but I am not a system admin guru a..
I have a long string (a DNA sequence). It does not contain any whitespace character.
For example:
ACTGATCGAGCTGAAGCGCAGTGCGATGCTTCGATGATGCTGACGATGCTACGATGCGAGCATCTACGATCAGTCGATGTAGCTAGTAGCATGTAGTGA
..
I installed nodejs on ubuntu from instructions given here
When I write node --version in the terminal I see this :
-bash: /usr/sbin/node: No such file or directory
I can see node in the /usr/sbin/ ..
What is an easy way to check if a value is a valid date, any known date format allowed.
For example I have the values 10-11-2009, 10/11/2009, 2009-11-10T07:00:00+0000 which should all be recognized ..
In python, what's the best way to test if a variable contains a list or a tuple? (ie. a collection)
Is isinstance() as evil as suggested here? http://www.canonical.org/~kragen/isinstance/
Update: th..
I just started using pandas/matplotlib as a replacement for Excel to generate stacked bar charts. I am running into an issue
(1) there are only 5 colors in the default colormap, so if I have more ..
How can I make a complete backup of mysql database using mysqldump?
When I am making a backup, my tables from specified database are only getting backed up. The procedures and functions are not.
Here..
I have the next code, eslint throw:
react/prop-types onClickOut; is missing in props validation
react/prop-types children; is missing in props validation
propTypes was defined but eslint does not re..
I'm building an app on Google App Engine. I'm incredibly new to Python and have been beating my head against the following problem for the past 3 days.
I have a class to represent an RSS Feed and in ..
I have a constructor function which registers an event handler:
_x000D_
_x000D_
function MyConstructor(data, transport) {_x000D_
this.data = data;_x000D_
transport.on('data', function () {_x0..
If I want to check for the null string I would do
[ -z $mystr ]
but what if I want to check whether the variable has been defined at all? Or is there no distinction in Bash scripting?..
I have used a ruby script to convert iso time stamp to epoch, the files that I am parsing has following time stamp structure:
2009-03-08T00:27:31.807
Since I want to keep milliseconds I used follo..
I am trying to embed the new iframe version of a YouTube video and get it to auto play.
As far as I can tell, there is no way of doing this by amending flags to the URL. Is there a way to do it by u..
my $line = "file1.gz file2.gz file3.gz";
my @abc = split('', $line);
print "@abc\n";
Expected output:
file1.gz
file2.gz
file3.gz
I want the output to be file1.gz in $abc[0], file2.gz in $abc[1], ..
I am new to C#.net MVC and am trying to add FullCalendar to an MVC application.
The FullCalendar script automatically adds ?start={}&end={} to the URL...which is fine, but I have no idea how to..
What I am trying to accomplish is splitting a column into multiple columns. I would prefer the first column to contain "F", second column "US", third "CA6" or "DL", and the fourth to be "Z13" or "U13..
I want to use a view throughout multiple viewcontrollers in a storyboard. Thus, I thought about designing the view in an external xib so changes are reflected in every viewcontroller. But how can one ..
Using a Linux shell, how do I start a program with a different working directory from the current working directory?
For example, I have a binary file helloworld that creates the file hello-world.txt..
Can I declare a list or array in a batch file like this:
set list = "A B C D"
And then I need to write these to a file, with the spaces between:
A
B
C
D
..
I need some help with this error :
Uncaught SyntaxError: Unexpected end of JSON input
at JSON.parse ()
at Object.success (dashboard.js:22)
at fire (jquery-3.3.1.js:3268)
at..
I thought .net had some kind of easy conversion method to use for converting an int into a byte array? I did a quick search and all solutions are bit masking/shifting one byte at a time, like "the goo..
I work with an advertising company, where we tag certain pages to track activity. A client of mine wants to fire off a javascript tag to track activity AFTER the page has finished loading entirely (to..
Ok, this may be the dumbest question ever, but I swear I searched for the answer and don't know what to do.
I need to install Visual Studio 2008. The free version. I need it in order to compile somet..
I'm new to Android development and Android Studio, so pardon my ignorance.
findViewById of a button I added always resolves to null. Hence if I try to setonClickListener it fails the whole Activity...
sorry to be a pain... I have: HashMap<String, String> o
o.get('uses_votes'); // "1"
Yet...
Boolean.parseBoolean(o.get('uses_votes')); // "false"
I'm guessing that ....parseBoolean doesn't ..
Imagine that you want to develop a non-trivial end-user desktop (not web) application in Python. What is the best way to structure the project's folder hierarchy?
Desirable features are ease of maint..
I've got a jar that loads great with java web start when I browse through the IP address of the server.
Once I try the server name instead I get the following exception:
com.sun.deploy.net.FailedDow..
I've just discovered Sass, and I've been so excited about it.
In my website I implement a tree-like navigation menu, styled using the child combinator (E > F).
Is there any way to rewrite this ..
I'm new to R but I've made numerous correlation plots with smaller data sets. However, when I try to plot a large dataset (2gb+), I can produce the plot just fine, but the legend doesn't show up. Any ..
I have an input that I want to validate:
<input type="text" id="input" />
And here's the JS:
jQuery("#input").live('change', function() {
if("#input:not(:empty)") {
..
I used to think I knew how to do this. But then I actually tried to do it. Here's the program I wrote but the Berkeley S*** simulator for mac said there was a syntax error on the last line. What did I..
I don't understand why I cannot make the following code work. I want to connect with JavaScript to my server console application. And then send data to the server.
Here is the server code:
stati..
I have found myself using JavaScript and I ran across childNodes and children properties. I am wondering what the difference between them is. Also is one preferred to the other?..
When Creating a new Angular 5 project:
node version: 8.9.2
npm version: 5.5.1
My Command is
npm install -g @angular/cli
the Error is
npm ERR! **Unexpected end of JSON input while parsing near..
Im still somewhat of a newbie on jQuery and the ajax scene, but I have an $.ajax request performing a GET to retrieve some XML files (~6KB or less), however for the duration the user spends on that pa..
Currently, I'm using Jackson to send out JSON results from my Spring-based web application.
The problem I'm having is trying to get all money fields to output with 2 decimal places. I wasn't able to ..
I need to create a custom volume slider for a WMP object. The current slider is complicated to modify, and use, is there a simple way to generate a slider on an HTML page that can have it's value pas..
I'm building a mobile app and am using JWT for authentication.
It seems like the best way to do this is to pair the JWT access token with a refresh token so that I can expire the access token as freq..
For example, in a Windows folder, if we create some files and name them 1.html, 2.txt, 3.txt, photo.jpg, zen.png the order will be as is. But if we create another file with the name _file.doc it will ..
What is the life cycle of an Android activity? Why are so many similar sounding methods (onCreate(), onStart(), onResume()) called during initialization, and so many others (onPause(), onStop(), onDes..
There are two ways of configuring and using log4net. First one is when I can configure my own appender and associated logger:
<!-- language: xml -->
<appender name="myLogAppender" type="log..
How would i get my cursor to change to this loading icon when a function is called and how would i change it back to a normal cursor in javascript/jquery..
$text_to_search = "example text with [foo] and more";
$search_string = "[foo]";
if ($text_to_search =~ m/$search_string/)
print "wee";
Please observe the above code. For some reason I would lik..
I'm looking to "cut" the top left corner of a div, like if you had folded the corner of a page down.
I'd like to do it in pure CSS, are there any methods?..
Is there any way to create a java.io.File object from an java.io.InputStream ?
My requirement is reading the File from a RAR . I am not trying to write a temporary File, I have a file inside RAR arch..
I am having a very strange problem with git and github. When I try and push, I am getting:
git push -u origin master
ERROR: Repository not found.
fatal: The remote end hung up unexpectedly
I added ..
What's the recommended timestamp format for a REST GET API like this:
http://api.example.com/start_date/{timestamp}
I think the actual date format should be ISO 8601 format, such as YYYY-MM-DDThh:m..
Is it possible to generate a random number between 2 doubles?
Example:
public double GetRandomeNumber(double minimum, double maximum)
{
return Random.NextDouble(minimum, maximum)
}
Then I cal..
I am trying to display a list gym classes (Yoga, Pilates etc). For each class type there are several classes, so I want to group all the Yoga classes, and all the Pilates classes and so on.
I made th..
Is there a quick and simple way to check if a key exists in a NameValueCollection without looping through it?
Looking for something like Dictionary.ContainsKey() or similar.
There are many ways to s..
Is it possible to read the raw HTML content of a web page that has been loaded into a UIWebView?
If not, is there another way to pull raw HTML content from a web page in the iPhone SDK (such as an eq..
I am making a scatter plot in matplotlib and need to change the background of the actual plot to black. I know how to change the face color of the plot using:
fig = plt.figure()
fig.patch.set_faceco..
Caused by: org.springframework.orm.hibernate3.HibernateSystemException: ids for this class must be manually assigned before calling save(): com.rfid.model.Role; nested exception is org.hibernate.id.I..
I have an Asp.Net MVC 5 website with EntityFramework codefirst approach in a shared hosting plan. It uses the open source WebbsitePanel for control panel and its SQL Server panel is somewhat limited. ..
Is it possible to debug the Windows services in Visual Studio?
I used code like
System.Diagnostics.Debugger.Break();
but it is giving some code error like:
I got two event error: eventID 4096
..
How can I encrypt a large file with a public key so that no one other than who has the private key be able to decrypt it?
I can make RSA public and private keys but when it comes to encrypting a lar..
How can I adjust only the size of Y-axis labels in R?
I know that cex.axis alters the size of the axis labels but it only affects the x-axis. Why, and how can I adjust the y axis?..
I am getting the following error trying to read from a socket. I'm doing a readInt() on that InputStream, and I am getting this error. Perusing the documentation this suggests that the client part of ..
How can I undo every change made to my directory after the last commit, including deleting added files, resetting modified files, and adding back deleted files?..
I have dumped all my tables everyweek to got the backup. But later I understand that it is only storing the .frm file of the table. It is not showing .MYD and .MYI files of a table. So I have only my ..
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 ..
I'm looking for a counter-part of git commit --amend in Mercurial, i.e. a way to modify the commit which my working copy is linked to. I'm only interested in the last commit, not an arbitrary earlier ..
I am new to Python. I need to write some data from my program to a spreadsheet. I've searched online and there seem to be many packages available (xlwt, XlsXcessive, openpyxl). Others suggest to write..
Is it necessary to use # before creating a temporary table in SQL server?
Example:
SELECT column1, column2, someInt, someVarChar
INTO ItemBack1
FROM table2
WHERE table2.ID = 7
For ItemBack1 is i..
I want to set up a complete Python IDE in Sublime Text 2.
I want to know how to run the Python code from within the editor. Is it done using build system? How do I do it ?..
I've been trying to add the Python path to the command line on Windows 7, yet no matter the method I try, nothing seems to work. I've used the set command, I've tried adding it through the Edit Enviro..
How can I inspect an Object in an alert box? Normally alerting an Object just throws the nodename:
alert(document);
But I want to get the properties and methods of the object in the alert box. How ..