Here is my code (well, some of it). The question I have is, can I get the first 9 numbers to show with a leading 00 and numbers 10 - 99 with a leading 0.
I have to show all of the 360 monthly payment..
I am facing a problem with overlaying a 100% height div. I could use position fixed to solve the cover, but that's not really what I want because you should be able to scroll down on the 'cover' > so ..
Is there any way with CSS to target all inputs based on their type? I have a disabled class I use on various disabled form elements, and I'm setting the background color for text boxes, but I don't wa..
I familiar with the fact that I should set the HTTP_RPOXY environment variable to the proxy address.
Generally urllib works fine, the problem is dealing with urllib2.
>>> urllib2.urlopen(&quo..
I've got 2 ways I can create a <div> using jQuery.
Either:
var div = $("<div></div>");
$("#box").append(div);
Or:
$("#box").append("<div></div>");
What are the dra..
I have a docker container with some processes (uwsgi and celery) running inside. I want to create a celery user and a uwsgi user for these processes as well as a worker group that they will both belon..
I wanted to check if a certain website exists, this is what I'm doing:
user_agent = 'Mozilla/20.0.1 (compatible; MSIE 5.5; Windows NT)'
headers = { 'User-Agent':user_agent }
link = "http://www.abc.co..
It appears that when you type in a number in Java, the compiler automatically reads it as an integer, which is why when you type in (long) 6000000000 (not in integer's range) it will complain that 600..
I'm trying to figure out Python lambdas. Is lambda one of those "interesting" language items that in real life should be forgotten?
I'm sure there are some edge cases where it might be needed, but ..
is there a way to put an image in a bundle and pass it to another activity? i've done my research and came up with putParcelable but i don't know how to get the passed image from the other activity an..
I am trying to open existing android project in android studio and it gradle cannot build the app without the error
Error android studio keeps on throwing
Error:(74, 1) A problem occurred evaluating..
I'm trying to get the current directory of the file in Javascript so I can use that to trigger a different jquery function for each section of my site.
if (current_directory) = "example" {
var active..
It is known that Excel sheets can display a maximum of 1 million rows. Is there any row limit for csv data, i.e. does Excel allow more than 1 million rows in csv format?
One more question: About this..
I've looked at similar questions on SO, but nothing quite matches my issue as far as I can tell.
The exception message:
Could not load file or assembly 'CrystalDecisions.ReportAppServer.ClientDoc..
How do you perform debounce in React.js?
I want to debounce the handleOnChange.
I tried with debounce(this.handleOnChange, 200) but it doesn't work.
function debounce(fn, delay) {
var timer = nul..
When I try to run this code:
import java.io.*;
import java.util.*;
public class TwoColor
{
public static void main(String[] args)
{
Queue<Edge> theQueue = new Queue<Edge&g..
I'm coming from the angular world where I could extract logic to a service/factory and consume them in my controllers.
I'm trying to understand how can I achieve the same in a React application.
Let..
Is it possible to store multiple different JSONObjects into a single JSONArray? This is the structure, I want to store in a JSONArray.
[{"value1":1,"value2":900,"value3":1368349},{"value1":2,"value2"..
So today's problem is getting me mad because that should be easy and i can not find the answer :
How to declare a public array in VBA ? I'm using an array with the letters A, B, C,... because i'm wor..
If I have several classes with functions that I need but want to store separately for organisation, can I extend a class to have both?
i.e. class a extends b extends c
edit: I know how to extend cla..
In Eclipse, I've created a project from a source and now it shows errors - "R cannot be resolved to a variable". From what I found here, I had cleared and rebuilt the project, but still the R file doe..
As the title says, I've got a string and I want to split into segments of n characters.
For example:
var str = 'abcdefghijkl';
after some magic with n=3, it will become
var arr = ['abc','def','gh..
I am using Linux, Oracle10g.
I have created one user called test. and granted create session and select any dictionary permission to the same user.
i also granted sysdba and sysoper roles to the same..
I am trying to implement a dictionary (as in the physical book). I have a list of words and their meanings.
What data structure / type does Java provide to store a list of words and their meanings a..
Hello, I am currently having an issue with MySQL!
What's going wrong here? I am a cPanel user, and yes I have searched this and found no definitive answers. It appears this is more specific than othe..
I created the following Oracle Directory csvDir:
create or replace directory csvDir as
'd:\oracle\oradata\external_data\downloadedFiles';
Now, how can I retrieve the path from this csvDir alias?
..
I am working with a team and we want to use Git (Not with GitHub, we have a private remote machine). We were using SVN until now.
We have a remote machine that works like an SVN repository.
Now, we wa..
I'm trying to create a log of hibernate statements.
I perform my sql statements using JPA where Hibernate 2.0 is the persistence provider (my application server is JBoss AS 6.0).
I call my CRUD method..
I am getting a lot of decimals in the output of this code (Fahrenheit to Celsius converter).
My code currently looks like this:
def main():
printC(formeln(typeHere()))
def typeHere():
globa..
I am a beginner to Java. I am making a simple text editor in netbeans 7(.3) IDE, using its GUI editor. The main problem I face in it is that I can't make it to save/open the file. I have created the "..
I realize the Swift book provided an implementation of a random number generator. Is the best practice to copy and paste this implementation in one's own program? Or is there a library that does thi..
About a year ago I asked about header dependencies in CMake.
I realized recently that the issue seemed to be that CMake considered those header files to be external to the project. At least, when gen..
I want to get all the error messages out of the modelState without knowing the key values. Looping through to grab all the error messages that the ModelState contains.
How can I do this?..
I have run into an issue in pre-selecting values on a dropdown list in Angular 2.
I set an array of colours in the component which I bind successfully to the dropdown list. The issue I'm experienc..
For example:
class A {
static int i=0;
static int j;
static void method() {
// static k=0; can't use static for local variables only final is permitted
// static int L;
..
I am trying to style a select option dropdown list. Is it possible to make the font-sizes of the options different from the default value?
For example, the default:
-- Select Country --
Would be ..
I have this query in sql server 2000:
select pwdencrypt('AAAA')
which outputs an encrypted string of 'AAAA':
0x0100CF465B7B12625EF019E157120D58DD46569AC7BF4118455D12625EF019E157120D58DD46569AC7BF..
I'm trying a very basic example of creating a div inside an already existing div.
It doesn't seem to be working when I use:
document.getElementbyId('lc').appendChild(element)
but works fine when I..
How do you solve the problem with soft hyphens on your web pages? In a text there can be long words which you might want to line break with a hyphen. But you do not want the hyphen to show if the whol..
I want to prevent maven from displaying INFO messages, I want to see only WARNINGS and ERRORS (if any).
How can I achieve this, preferably by changing the command line that calls maven?..
I am trying to set git up with http://danielmiessler.com/study/git/#website to manage my site.
I have gotten to the last step in the instructions: git push website +master:refs/heads/master
I am wo..
Python gives us the ability to create 'private' methods and variables within a class by prepending double underscores to the name, like this: __myPrivateMethod(). How, then, can one explain this
>>> ..
I did a git stash pop and ended up with merge conflicts. I removed the files from the file system and did a git checkout as shown below, but it thinks the files are still unmerged. I then tried replac..
I am using Bootstrap 3 for a site I am designing.
I want to have a footer like this sample.
Sample
Please note that I don't want it FIXED so bootstrap navbar-fixed-bottom does not solve my problem. ..
To put it simple, there's a simple java swing app that consists of JFrame with some components in it. One of the components is a JPanel that is meant to be replaced by another JPanel on user action.
..
I have just installed GitLab.
I created a project called project-x.
I have created few users and assigned it to the project.
Now I tried to clone:
git clone [email protected]:project-x.git
It p..
Given
Dim arr1 As Variant
Dim arr2 As Variant
Dim arr3 As Variant
arr1 = Array("A", 1, "B", 2)
arr2 = Array("C", 3, "D", 4)
What kind of operations can I do on arr1 and arr2 and store result in a..
I have a generic list of objects in C#, and wish to clone the list. The items within the list are cloneable, but there doesn't seem to be an option to do list.Clone().
Is there an easy way around thi..
Is this possible?
example:
$('a.change').click(function(){
//code to change p tag to h5 tag
});
<p>Hello!</p>
<a id="change">change</a>
So clicking the change anchor shou..
I want to get all the rows from a table through an expression:
table.date <= 2014-07-10
But if the column contains a datetime let's say:
2014-07-10 12:00:00
But if I do:
where('date', '<..
I have a MySQL database, with a column that is date type DATETIME.
I am getting a string value for a date / time from an external application. That string value looks like this:
'5/15/2012 8:06:26..
What is the appropriate way of dealing with large text files in Objective-C? Let's say I need to read each line separately and want to treat each line as an NSString. What is the most efficient way of..
This is not a realworld problem, I'm just trying to understand how promises are created.
I need to understand how to make a promise for a function that returns nothing, like setTimeout.
Suppose I ha..
On the settings page, I want to include three links to
My app support site
YouTube app tutorial
My primary site (ie: linked to a 'Created by Dale Dietrich' label.)
I've searched this site and the ..
How would I get the first character from the first string in a list in Python?
It seems that I could use mylist[0][1:] but that does not give me the first character.
>>> mylist = []
>&..
I need to count unique ID values in every domain
I have data
ID, domain
123, 'vk.com'
123, 'vk.com'
123, 'twitter.com'
456, 'vk.com'
456, 'facebook.com'
456, 'vk.com'
456, 'google.com'
789, 'twitter...
I have the following simplified code:
#include <stdio.h>
int main ()
{
printf("Hello ");
goto Cleanup;
Cleanup:
char *str = "World\n";
printf("%s\n", str);
}
I get an error b..
I'm creating RDLC reports in VS10. When the program is NOT running, I can see the toolbox, and add controls to the report, but the "Report Data" pane is nowhere to be found, so I can't fill the contr..
I need to sort my HashMap according to the values stored in it. The HashMap contains the contacts name stored in phone.
Also I need that the keys get automatically sorted as soon as I sort the values..
I am using something similar to the following code:
<div style="opacity:0.4; background-image:url(...);">
<div style="opacity:1.0;">
Text
</div>
</div>
I ex..
I have a class with a unique_ptr member.
class Foo {
private:
std::unique_ptr<Bar> bar;
...
};
The Bar is a third party class that has a create() function and a destroy() function.
I..
For the emulator I have below, I am getting the error message that "Google Play Services not installed on the device".
As per the developer site, it says that 'The Android emulator with an AVD that r..
Below is my xml file. In preview there is two error'Failed to load AppCompat ActionBar with unknown error' & 'Failed to instaniate more than one class'. How ever am able to run the app.But the app..
Anaconda (listed as "Python 3.6.0 (Anaconda 4.3.1 64 bit)" ) is in my programs and features list, but there is seeming no Anaconda Navigator desktop app, as their seems to be no icon on my desktop and..
Why when i use SimpleCursorAdapter for ListView i have items height in ListView like this -
(My code based on this)
But when using arrays Listview items have big height
(I learn listview based..
I have looked to no avail, and I'm afraid that it might be such a simple question that nobody dares ask it.
Can one input multiple things from standard input in one line? I mean this:
float a, b;
ch..
How can I access a function name from inside that function?
// parasitic inheritance
var ns.parent.child = function() {
var parent = new ns.parent();
parent.newFunc = function() {
}
return..
I would like to change decimal point to another character in C#. I have a double variable value
double value;
and when I use the command:
Console.WriteLine(value.ToString()); // output is 1,25
I..
I have a very similar question to this question, but still one step behind. I have only one version of Python 3 installed on my Windows 7 (sorry) 64-bit system.
I installed numpy following this link ..
I am trying to get the number of occurrences of a certain character such as & in the following string.
string test = "key1=value1&key2=value2&key3=value3";
How do I determine that there..
I installed Apache Tomcat 6.0 to a C:/Program Files folder and I set the environmental variables JAVA_HOME and CATALINA_HOME, but when I start the server using startup.bat, I am getting the error:
..
I want to match a regular expression on a whole word.
In the following example I am trying to match s or season but what I have matches s, e, a, o and n.
[s|season]
How do I make a regular expre..
How should I implement simple file download servlet?
The idea is that with the GET request index.jsp?filename=file.txt, the user can download for example. file.txt from the file servlet and the file..
I have a set of dynamically generated checkboxes, where each of them has a data-id attribute corresponding to a database integer id. When i populate my html-form with an object to edit, there is a lis..
How can I create an array with 40 elements, with random values from 0 to 39 ?
Like
[4, 23, 7, 39, 19, 0, 9, 14, ...]
I tried using solutions from here:
http://freewebdesigntutorials.com/javaScript..
i'm new in JQ
i have this script i found on the internet and its do exactly what i need
but i want the sliding will be from the right to the left
how can i do it? please help
this is the code
<sc..
UPDATE²: With Git 2.23 (August 2019), there's a new command git restore that does this, see the accepted answer.
UPDATE: This will work more intuitively as of Git 1.8.3, see my own answer.
..
I'm trying to compare a time stamp from an incoming request to a database stored value. SQL Server of course keeps some precision of milliseconds on the time, and when read into a .NET DateTime, it in..
I need to figure out a way uniquely identify each computer which visits the web site I am creating. Does anybody have any advice on how to achieve this?
Because i want the solution to work on all mach..
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 = "..
How can I get the tree of a module available to npm, but not installed locally ?
npm ll does the job for locally installed packages. But it doesn't work for modules not installed or modules installed..
Maybe I'm just not seeing it, but CRC32 seems either needlessly complicated, or insufficiently explained anywhere I could find on the web.
I understand that it is the remainder from a non-carry-based..
I am using TypeScript Version 2 for an Angular 2 component code.
I am getting error "Property 'value' does not exist on type 'EventTarget'" for below code, what could be the solution. Thanks..
How do I parse XML, and how can I navigate the result using jQuery? Here is my sample XML:
<Pages>
<Page Name="test">
<controls>
<test>this is a test.</test>..
For an Android app, I have the following functionality
private ArrayList<String> _categories; // eg ["horses","camels"[,etc]]
private int getCategoryPos(String category) {
for(int i = 0; i..
I have a data frame ("data") with lots and lots of columns. Some of the columns contain a certain string ("search_string").
How can I use dplyr::select() to give me a subset including only the column..
I'm trying to understand the difference between ng-if and ng-show/ng-hide, but they look the same to me.
Is there a difference that I should keep in mind choosing to use one or the other?..
Is there a simple way to set the focus (input cursor) of a web page on the first input element (textbox, dropdownlist, ...) on loading the page without having to know the id of the element?
I would l..
I want to make a replacement using regex and preg_replace function. this is my code
$verif = "/wordA(\s*)wordB(?! wordc)/i";
$replacement = 'wordA wordb wordc';
$newvar = preg_replace($verif, $replac..
I need to create a query that looks at yesterdays date but at a specific time. I would like the time portion to be in the 'hh24:mi:ss' format as this is how the search field is formated. when I run ..
Using Xcode 9.1, after building an iOS app, I want to archive it and upload it to the appStore for beta-testing.
But I get the following issue after clicking the button Upload to the App Store... and ..
I have a form that has three submit buttons as follows:
<input type="submit" name="COMMAND" value="‹ Prev">
<input type="submit" name="COMMAND" value="Save">
<input type="re..
I want to sort the following data items in the order they are presented below (numbers 1-12):
1
2
3
4
5
6
7
8
9
10
11
12
However, my query - using order by xxxxx asc sorts by the first digit above ..
How can I get the difference between two timestamps in days? Should I be using a datetime column for this?
I switched my column to datetime. Simple subtraction doesn't seem to give me a result in day..
Suppose I have the following code in a Python unit test:
aw = aps.Request("nv1")
aw2 = aps.Request("nv2", aw)
Is there an easy way to assert that a particular method (in my case aw.Clear()) was cal..
I need to run a batch file which needs to register a DLL. The DLL registration is failing because the Batch file is not starting the command prompt as "administrator".
Is there any way to start the ..
I want to create a near 100% load on a Linux machine. It's quad core system and I want all cores going full speed. Ideally, the CPU load would last a designated amount of time and then stop. I'm ho..
I have two dictionaries. I need to find the difference between the two which should give me both key and value.
I have searched and found some addons/packages like datadiff, dictdiff-master but when ..
I just installed Cygwin, and it looks like the home directory in the bash prompt is on my Z: drive. That's not where I want it.
How can I change this?..
In Ruby, one can append values to existing arrays using <<:
a = []
a << "foo"
but, can you also append key/value pairs to an existing hash?
h = {}
h << :key "bar"
I know you ca..
I know this.
Calling C function from C++:
If my application was in C++ and I had to call functions from a library written in C. Then I would have used
//main.cpp
extern "C" void C_library_functio..
I assume this information is available in Oracle metadata tables, but where exactly ?
I need the directory object for BFILENAME as in this answer: Using PL/SQL how do you I get a file's contents ..
So I'm trying to make a very basic node.js server that with take in a request for a string, randomly select one from an array and return the selected string. Unfortunately I'm running into a few prob..
I am interested in exporting a subset of values from a MySQL database into a JSON-formatted file on disk.
I found a link that talks about a possible way to do this: http://www.thomasfrank.se/mysql_to..
I've spent the bulk of my Friday trying to get the latest version of Ruby installed on my new MacBook Air (w/ Mountain Lion installed).
I have all the latest versions of XCode and command line tools...
As a programmer at a big corporation, I frequently send Outlook emails that contain code samples.
I'll actually type code directly into an email. This inevitably causes problems, as Outlook really l..
How do you return a JSON object form a Java servlet.
Previously when doing AJAX with a servlet I have returned a string. Is there a JSON object type that needs to be used, or do you just return a Str..
I am writing a simple sort program in python and encounter this error. I want to swap list elements but it returns an error. I am attaching the error and program in question below.
list[i+1] = list[i..
I can't figure out Oracle's encryptic syntax for the life of me. This is Oracle 10g
My session's NLS_LANGUAGE is currently defaulting to AMERICAN.
I need to be able to display UTF8 characters.
Belo..
I have Hibernate method which returns me a BigDecimal.
I have another API method to which I need to pass that number but it accepts Integer as parameter. I cannot change return types or variable types..
Is there any utility that helps to read a text file in the resource into a String. I suppose this is a popular requirement, but I couldn't find any utility after Googling...
I'm trying to access the camera on my phone. I'm writing a simple stub app prior to putting the code in a widget. I'm not getting very far. The code always throws a runtime exception "failed to connec..
While running a C program, It says "(core dumped)" but I can't see any files under the current path.
I have set and verified the ulimit:
ulimit -c unlimited
ulimit -a
I also tried to find a file..
I have a table that is created using ng-repeat. I want to add validation to each element in the table. The problem is that each input cell has the same name as the cell above and below it. I attempted..
Is it considered an acceptable practice to use Modules instead of Classes with Shared member functions in VB.NET?
I tend to avoid Modules, because they feel like leftover remains from Visual Basic 6...
I need to send authorization request using basic auth. I have successfully implemented this using jquery. However when I get 401 error basic auth browser popup is opened and jquery ajax error callback..
I am interested in what is the "correct" way to write functions with optional arguments in R.
Over time, I stumbled upon a few pieces of code that take a different route here, and I couldn't find a pr..
I want to write a Makefile which would run tests. Test are in a directory './tests' and executable files to be tested are in the directory './bin'.
When I run the tests, they don't see the exec files..
If I have an array like this:
1 4 9 16 9 7 4 9 11
What is the best way to reverse the array so that it looks like this:
11 9 4 7 9 16 9 4 1
I have the code below, but I feel it is a little ted..
I'm running my code and getting this error. But what does it mean?
The network path was not found Description: An unhandled exception
occurred during the execution of the current web request. P..
I'm trying to change the style of a button with an embedded image as seen in the following Fiddle:
http://jsfiddle.net/krishnathota/xzBaZ/1/
In the example there are no images, I'm afraid.
I'm tryi..
I'm looking to make a service which I can use to make calls to a web-based REST API.
Basically I want to start a service on app init then I want to be able to ask that service to request a url and re..
I need to interpolate a value inside of an ngClass expression but I can't get it to work.
I tried these solution which are the only ones that makes sense to me, these two fails with the interpolation..
Given a string that isn't too long, what is the best way to read it line by line?
I know you can do:
BufferedReader reader = new BufferedReader(new StringReader(<string>));
reader.readLine();
..
I want a text color to be red in color on certain condition.
Here is how i want to get it done.
string minusvalue = TextBox1.Text.ToString();
if (Convert.ToDouble(minusvalue) < 0)
{
// set colo..
I'm trying to use a while loop to add objects to a list.
Here's basically what I want to do:
class x:
pass
choice = raw_input(pick what you want to do)
while(choice!=0):
if(choice==1):
..
In sqlserver, how do I compare dates?
For example:
Select * from Users where RegistrationDate >= '1/20/2009'
(RegistrationDate is datetime type)
Thanks..
I have seen much code where people write public static final String mystring = ...
and then just use a value.
Why do they have to do that? Why do they have to initialize the value as final prior to u..
I'm learning SpringMVC framework and checked out a copy of their code:
https://src.springframework.org/svn/spring-samples/mvc-basic/trunk/
I can do maven build, install and everything. But on Eclipse,..
What do the icons in the Eclipse debugger mean?
What do the icon decorators in Eclipse mean?
What do the icons in Eclipse's Package Explorer mean?
What do the little letters on top of Eclipse icons m..
What's the AngularJS way to access cookies? I've seen references to both a service and a module for cookies, but no examples.
Is there, or is there not an AngularJS canonical approach?..
What's the difference in context of web applications? I see the abbreviation "auth" a lot. Does it stand for auth-entication or auth-orization? Or is it both?..
Sorry guys for the really simple question but I have tried to float one div left and one right with predefined widths along these lines
<div style="width: 100%;">
<div style="float:left;..
I have some buttons like this in my app:
<Button
android:id="@+id/bSearch"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddi..
I'm building a personal stock platform (not distributed). A component I would like to have is the EPS graph on this page:
https://eresearch.fidelity.com/eresearch/evaluate/fundamentals/earnings.jhtml..
I'd simply like to convert a base-2 binary number string into an int, something like this:
>>> '11111111'.fromBinaryToInt()
255
Is there a way to do this in Python? ..
I am receiving below error while running my Jersey API in Tomcat 8.5.11 which is causing my API to stop:
HTTP Status 500 - Servlet.init() for servlet Jersey REST Service threw
exception
typ..
How can I represent an infinite number in python? No matter which number you enter in the program, no number should be greater than this representation of infinity...
I'm looking at the article C# - Data Transfer Object on serializable DTOs.
The article includes this piece of code:
public static string SerializeDTO(DTO dto) {
try {
XmlSerializer xmlSe..
I want to get unique unchangeable Machine id Like Processor serial number of the computer for distribute a software with out copying.
I tried with processor serial number and hard disk serial number ..
When I meet the situation I can do it in javascript, I always think if there's an foreach function it would be convenience. By foreach I mean the function which is described below:
def foreach(fn,ite..
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 am having a problem with removing linebreaks after the <h1> tag, as everytime it prints, it adds a line break straight after it, so something like <h1>Hello World!</h1> <h2>H..
I'm a little confused on how this is supposed to work. But I'm getting an Route [/preferences/1] not defined error.
In my routes.php I have:
Route::patch('/preferences/{id}', 'UserController@update'..
I used explicit waits and I have the warning:
org.openqa.selenium.WebDriverException:
Element is not clickable at point (36, 72). Other element would receive
the click: ...
Command duratio..
I'm cleaning up some code files (C#) and want to remove the regions. And I would like to delete all the lines that have the string '#region'. That's just an example, and I can think of several more us..
I have connected for the first time to an existing network over VPN. I can ping the IP address which is used by the SQL Server from the VPN client, but SSMS does not connect to the SQL Server. I am us..
I've read a lot of different questions and answers on Stack Overflow as well as git documentation on how the core.autocrlf setting works.
This is my understanding from what I've read:
Unix and Mac O..
While I was setting up React within Django project I came across this error
ModuleBuildError in
Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: C:\U..
I'm using jquery and moment.js for a custom calendar.
I have a date object in a variable myDate like :
Object { date="2014-12-23 14:00:00", timezone_type=3, timezone="Europe/Paris"}
I want, usin..
I was thrilled to see the new System.Collections.Concurrent namespace in .Net 4.0, quite nice! I've seen ConcurrentDictionary, ConcurrentQueue, ConcurrentStack, ConcurrentBag and BlockingCollection.
..
In XSLT there is the
<xsl:value-of select="expression"/>
to get the value of an element, but is there something to select the tag-name of the element?
In a situation like this:
<person&g..
I'm getting this error from time to time and don't know what causing this:
When trying to run/debug an Android app on a real device (Galaxy Samsung S in my case) I'm getting the following error in the..
My server returns this kind of header: Content-Range:0-10/0:
I tried to read this header in angular with no luck:
var promise = $http.get(url, {
params: query
}).then(function(response) {
c..
I'm trying to get my horizontal rule to ignore the parent padding.
Here's a simple example of what I have:
#parent {
padding:10px;
width:100px;
}
hr {
width:100px;
}
You will find that the h..
How do I write a file on iOS? I'm trying to do it with the following code but I'm doing something wrong:
char *saves = "abcd";
NSData *data = [[NSData alloc] initWithBytes:saves length:4];
NSArray *..
My package test cases are scattered across multiple files, if I run go test <package_name> it runs all test cases in the package.
It is unnecessary to run all of them though. Is there a way to ..
Apparently, the following is the valid syntax:
my_string = b'The string'
I would like to know:
What does this b character in front of the string mean?
What are the effects of using it?
What are a..
I am filtering rows in a dataframe by values in two columns.
For some reason the OR operator behaves like I would expect AND operator to behave and vice versa.
My test code:
import pandas as pd
df..
How can I get the first character in a string using Ruby?
Ultimately what I'm doing is taking someone's last name and just creating an initial out of it.
So if the string was "Smith" I just want "S"..
I have seen some Apps and Websites who use Data from the Android Play store. E.g. Apps or Sites with a top Apps ranking etc. But how can you get the Data? From where I can parse it? ..
I am attempting to create a Stored Procedure for a newly created database. However the SSMS intellisense does not recognize more than half of the tables which have been created.
For example whilst i..
When I use the for loop in Playground, everything worked fine, until I changed the first parameter of for loop to be the highest value. (iterated in descending order)
Is this a bug? Did any one else ..
Yesterday evening I left the office with a running Java program written by me. It should insert a lot of records into our company database (Oracle) using a JDBC connection. This morning when I came ba..
I want an Vista/7-aero-glass-style effect on a popup on my site, and it needs to be dynamic. I'm fine with this not being a cross-browser effect as long as the site still works on all modern browsers...
I just want get a list from Dictionary values but it's not so simple as it appears !
here the code :
Dictionary<string, List<MyType>> myDico = GetDictionary();
List<MyType> items =..
Well first of all I found couple of answers while googling but most of the forums are blocked in my Office Network hence asking this question here! One more intention is to get an answer in plain Engl..
I am currently working with using Bezier curves and surfaces to draw the famous Utah teapot. Using Bezier patches of 16 control points, I have been able to draw the teapot and display it using a 'worl..
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 need to count the number of occurrences of a char in a string using Bash.
In the following example, when the char is (for example) t, it echos the correct number of occurrences of t in var, but whe..
I recently upgraded our SQL Server from 2005 to 2014 (linked server) and I am noticing that one of the stored procedures which calls the exec command to execute a stored procedure on the upgraded link..
We are running XAMPP with PHP 7.0 because our new products requires PHP 7.
But there are old projects which use functions like mysql_connect, etc. Those are removed in PHP 7.0.
So, is there a way to..
I have two divs under one parent div, the parent div has 100% width:
<div id="parent">
<div class="left"></div>
<div class="right"></div>
</div>
The conditio..
I'm a very new to makefiles and i want to create directories using makefile. My project directory is like this
+--Project
+--output
+--source
+Testfile.cpp
+Makefile
I want ..
I am trying to convert my base64 image string to an image file. This is my Base64 string:
http://pastebin.com/ENkTrGNG
Using following code to convert it into an image file:
function base64_to_jpeg..
I have created and published my first Android app. It's very simple. It works fine on simulator and some phones, but I am getting this error:
java.lang.RuntimeException: Unable to instantiate applica..
I know one should not use global variables but I have a need for them. I have read that any variable declared outside a function is a global variable. I have done so, but in another *.cpp File that va..
I find it odd that in Visual C# 2008 Express edition, when you use the database explorer, your options are:
Microsoft Access
SQL Server Compact 3.5, and
SQL Server Database File.
BUT if you use..
Whenever I am trying to install any package using pip, I am getting this import error:
guru@guru-notebook:~$ pip3 install numpy
Traceback (most recent call last):
File "/usr/bin/pip3", line 9, in &..
In Java you can define generic class that accept only types that extends class of your choice, eg:
public class ObservableList<T extends List> {
...
}
This is done using "extends" keyword.
..
I am trying to connect to a Microsoft SQL 2005 server which is not on port 1433. How do I indicate a different port number when connecting to the server using SQL Management Studio?..
What query will count the number of rows, but distinct by three parameters?
Example:
Id Name Address
==============================
1 MyName MyAddress
2 MySecondName Add..
I saw spring.jpa.open-in-view=true property in Spring Boot documentation for JPA configuration.
Is the true default value for this property if it's not provided at all?;
What does this really do? I ..
What is causing this error? I google'd it and first few solutions I found were that something was wrong with the library and the main function but both seem to be fine in my problem, I even retyped bo..