I'm currently using the function below and it doesn't work properly. According to Google Maps, the distance between these coordinates (from 59.3293371,13.4877472 to 59.3225525,13.4619422) are 2.2 kilo..
Im trying to sort through an arraylist of objects by a particular value within the object. What would be the best approach to do such a thing. Should I use Collections.sort() with some kind of compara..
What are the differences between YAML and JSON, specifically considering the following things?
Performance (encode/decode time)
Memory consumption
Expression clarity
Library availability, ease of use..
I'm using a library that has a dependency on JSF.
When I try to run my project, it show following exception massage..
java.util.MissingResourceException: Can't find bundle for base name /Bundle, lo..
Is there a way of printing arrays in C++?
I'm trying to make a function that reverses a user-input array and then prints it out. I tried Googling this problem and it seemed like C++ can't print array..
How do I get the background color code of an element?
_x000D_
_x000D_
console.log($(".div").css("background-color"));_x000D_
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery..
Is it possible in javascript to assign an alias/reference to a local var someway?
I mean something C-like:
function foo() {
var x = 1;
var y = &x;
y++;
alert(x); // prints 2
}
= EDIT ..
Does React re-render all components and sub components every time setState() is called?
If so, why? I thought the idea was that React only rendered as little as needed - when state changed.
In the fol..
I've been Googling and trying all the solutions I could find or think of myself. The site I'm trying to load is running TLS1.2 as is a few other sites I tried to test with to make sure it wasn't a TLS..
I have been trying to find a way to define a service in one namespace that links to a Pod running in another namespace. I know that containers in a Pod running in namespaceA can access serviceX defin..
I'm pretty new to Python and am completely confused by .join() which I have read is the preferred method for concatenating strings.
I tried:
strid = repr(595)
print array.array('c', random.sample(st..
I have an R string, with the format
s = `"[some letters and numbers]_[a number]_[more numbers, letters, punctuation, etc, anything]"`
I simply want a way of checking if s contains "_2" in the first..
I want to compare two strings for equality when either or both can be null.
So, I can't simply call .equals() as it can contain null values.
The code I have tried so far :
boolean compare(String str1,..
How can I select a certain element in a list of elements? I have the following:
<div class="myclass">my text1</div>
<!-- some other code follows -->
<div>
<p>stuff&l..
In Objective-C the code to check for a substring in an NSString is:
NSString *string = @"hello Swift";
NSRange textRange =[string rangeOfString:@"Swift"];
if(textRange.location != NSNotFound)
{
..
I'm now using NetBeans as my IDE-of-choice, and it has a plugin for UML modeling. In the class diagram, there are model elements known as Boundary Class, Control Class, and Entity Class. However, I ca..
I want to call a function in one PHP file from a second PHP file and also pass two parameters to that function. How can I do this?
I am very new to PHP. So please tell me, should I include the first ..
There are apparently many ways to iterate over a collection. Curious if there are any differences, or why you'd use one way over the other.
First type:
List<string> someList = <some way to ..
I picked up the following demo off the web from https://computing.llnl.gov/tutorials/pthreads/
#include <pthread.h>
#include <stdio.h>
#define NUM_THREADS 5
void *PrintHello(void *th..
I have a list of float values and I want to print them with cout with 2 decimal places.
For example:
10.900 should be printed as 10.90
1.000 should be printed as 1.00
122.345 should be printed as 1..
Just wondering if any of you people use Count(1) over Count(*) and if there is a noticeable difference in performance or if this is just a legacy habit that has been brought forward from days gone pas..
What is the longest string that can be created in .NET? The docs for the String class are silent on this question as far as I can see, so an authoritative answer might require some knowledge of intern..
If I select a cell containing a formula, I know I can drag the little box in the right-hand corner downwards to apply the formula to more cells of the column. Unfortunately, I need to do this for 300,..
I have a controller with an action method as follows:
public class InventoryController : Controller
{
public ActionResult ViewStockNext(int firstItem)
{
// Do some stuff
}
}
And..
This has been asked on this site before but I couldn't find a sufficient answer. If I'm doing a query like:
Select Seller from Table where Location = 'San Jose'
How can I make it return only Seller..
I'm currently searching for an easy way to serialize objects (in C# 3).
I googled some examples and came up with something like:
MemoryStream memoryStream = new MemoryStream ( );
XmlSerializer xs = ..
I have a vector of myObjects in global scope.
I have a method which uses a std::vector<myObject>::const_iterator to traverse the vector, and doing some comparisons to find a specific element.
On..
I've used border-radius: 50% or border-radius: 999em, but the problem is the same: with squared images there's no problem, but with rectangular images I obtain an oval circle. I'm also disposed to cro..
I have an array outside:
$myArr = array();
I would like to give my function access to the array outside it so it can add values to it
function someFuntion(){
$myVal = //some processing here t..
While running an app on the virtual device (AVD) created on Android studio (in Windows 10), I am getting an error and panic.
Emulator: PANIC: Cannot find AVD system path. Please define ANDROID_SDK_RO..
I have concerns on the way that we returns errors to client.
Do we return error immediately by throwing HttpResponseException when we get an error:
public void Post(Customer customer)
{
if (stri..
How do i get the html on '#container' including '#container' and not just what's inside it.
<div id="container">
<div id="one">test 1 </div>
<div id="two">test 2 </div&g..
There are times when I have a choice between using a CSS element:hover or JavaScript onmouseover to control the appearance of html elements on a page. Consider the following scenario where a div wrap..
How would I get just the filename without the extension and no path?
The following gives me no extension, but I still have the path attached:
source_file_filename_no_ext=${source_file%.*}
..
With reference to the new TextInputLayout released by Google, how do I change the floating label text color?
Setting colorControlNormal, colorControlActivated, colorControlHighLight in styles does no..
For some reasons I moved this folder : (Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL) to another drive, then returned it to the same location, but sql server has stopped working, showi..
Let's say that a class has a public int counter field that is accessed by multiple threads. This int is only incremented or decremented.
To increment this field, which approach should be used, and wh..
I'm trying to include JavaScript variables into PHP code as PHP variables, but I'm having problems doing so. When a button is clicked, the following function is called:
<script type="text/javascri..
Is there a way to catch a click on a cell in VBA with Excel? I am not referring to the Worksheet_SelectionChange event, as that will not trigger multiple times if the cell is clicked multiple times. B..
I need to get data from the serial port of a Linux system and convert it to TCP/IP to send to a server. Is this difficult to do? I have some basic programming experience, but not much experience with ..
In the code, the variable timer would specify the duration after which to end the while loop, 60 sec for example.
while(timer) {
//run
//terminate after 60 sec
}
..
How can i open an image in a Canvas ? which is encoded
I am using the
var strDataURI = oCanvas.toDataURL();
The output is the encoded base 64 image. How can i draw this image on a canvas?
I wa..
I have two tables Emp and Dept and I am trying to display how many people work in each department along with their department name, but I can't get it to work. I have tried this select count(ename) as..
I have been using with success, grand central dispatch in my apps, but I was wondering what is the real advantage of using something like this:
dispatch_async(dispatch_get_main_queue(), ^{ ... do stu..
I need to transfer some data from another database. The old database is called paw1.moviesDB and the new database is paw1. The schema of each table are the following.
Awards (name of the table)(new D..
I have come across articles that state that SELECT COUNT(*) FROM TABLE_NAME will be slow when the table has lots of rows and lots of columns.
I have a table that might contain even billions of rows [..
In C# ASP.net, could someone show me how I can write entries from an Array/List to a CSV file on the server and then open the file? I think the second part would be something like - Response.Redirect(..
Possible Duplicate:
How do I convert a double into a string in C++?
I want to combine a string and a double and g++ is throwing this error:
main.cpp: In function ‘int main()’:
main.cpp..
I am reading definitions over and over again and I still not getting what are SP and LR in ARM? I understand PC (it shows next instruction's address), SP and LR probably are similar, but I just don't ..
I am a system administrator and I have been asked to run a linux script to clean the system.
The command is this:
perl script.pl > output.log &
so this command is ending with a & sign, ..
Here is how I'm currently converting XMLDocument to String
StringWriter stringWriter = new StringWriter();
XmlTextWriter xmlTextWriter = new XmlTextWriter(stringWriter);
xmlDoc.WriteTo(xmlTextWriter..
Which format specifier should I be using to print the address of a variable? I am confused between the below lot.
%u - unsigned integer
%x - hexadecimal value
%p - void pointer
Which w..
I'm using Eclipse, and at random times, it will just freeze up and stop responding. Does this happen to anyone else? It usually happens when I click on a line of code, whether it be Java or XML. Any i..
I'm using logback in my current project.
It offers six levels of logging: TRACE DEBUG INFO WARN ERROR OFF
I'm looking for a rule of thumb to determine the log level for common activities...
I've recently had to switch encoding of webapp I'm working on from ISO-xx to utf8. Everything went smooth, except properties files. I added -Dfile.encoding=UTF-8 in eclipse.ini and normal files work f..
I would like to create indented collapsible row hierarchies in Excel for my spreadsheet.
I have used group function but that becomes hard to manage for me.
Here is an example of what I am trying to ..
I want the user to be able to search for a number in a column in the DataGridView (dgv). The dgv can hold many records. Each record has a Project Number. So I want the user to be able to search for a ..
Possible Duplicate:
Check if multiple strings exist in another string
I am trying to find out if there is a nice and clean way to test for 3 different strings.
Basically I am looping troug..
Everything else in my site seems to be compatible with all browsers except for my links. They appear on the page, but they do not work. My code for the links are as follows-
<td bgcolor="#ffff..
what is the best way to check if a Data Table has a null value in it ?
Most of the time in our scenario, one column will have all null values.
(This datatable is returned by a 3rd party application ..
I am wondering if there is a way to get current milliseconds since 1-1-1970 (epoch) using the new LocalDate, LocalTime or LocalDateTime classes of Java 8.
The known way is below:
long currentMilli..
How are properties for a Collection set?
I've created a class with a Collection properties. I want to add to the List anytime I set a new value. Using _name.Add(value) within the set method doesn't w..
I love WinSCP for Windows. What are the best equivalent softwares for linux?
I tried to use sshfs to mount the remote file system on my local machine, but it is not as user friendly as simply launch..
I'm interested in tries and DAWGs (direct acyclic word graph) and I've been reading a lot about them but I don't understand what should the output trie or DAWG file look like.
Should a trie be an ob..
I'm trying to understand Python's approach to variable scope. In this example, why is f() able to alter the value of x, as perceived within main(), but not the value of n?
def f(n, x):
n = 2
..
I am trying to convert a character to its binary representation (so character --> ascii hex --> binary).
I know to do that I need to shift and AND. However, my code is not working for some reason.
H..
I want to make a custom keyboard. I don't know how to do it using XML and Java. The following picture is a model of the keyboard I want to make. It only needs numbers.
..
int main() {
int my array[3][3] =
10, 23, 42,
1, 654, 0,
40652, 22, 0
};
printf("%d\n", my_array[3][3]);
return 0;
}
I am not able to get the array to print.. Any ..
I am using eclipse 3.4.1 Java EE under Vista. It seems to like getting stuck when building my workspace. Canceling the build doesn't seem to do anything as well.
Why is this happening and how do I fi..
While attempting to execute SQL insert statements using Oracle SQL Developer I keep generating an "Enter substitution value" prompt:
insert into agregadores_agregadores
(
idagregador,
nombre,
url..
I have two string columns a and b in a table foo.
select a, b from foo returns values a and b. However, concatenation of a and b does not work. I tried :
select a || b from foo
and
select a||',..
Possible Duplicate:
C# - Is there a better alternative than this to 'switch on type'?
C# doesn't support switching on the type of an object.
What is the best pattern of simulating t..
Given
2,1016,7/31/2008 14:22,Geoff Dalgas,6/5/2011 22:21,http://stackoverflow.com,"Corvallis, OR",7679,351,81,b437f461b3fd27387c5d8ab47a293d35,34
How to use C# to split the above information..
I am looking for a pattern that matches everything until the first occurrence of a specific character, say a ";" - a semicolon.
I wrote this:
/^(.*);/
But it actually matches everything (including..
I'm trying to convert a unicode string to a hexadecimal representation in javascript.
This is what I have:
function convertFromHex(hex) {
var hex = hex.toString();//force conversion
var str..
I need to group a list of objects (Student) using an attribute (Location) of the particular object. The code is like below:
public class Grouping {
public static void main(String[] args) {
..
i have a start date string "20.03.2014" and i want to add 5 days to this with moment.js but i don't get the new date "25.03.2014" in the alert window.
here my javascript Code:
startdate = "20.03.201..
How can I set label.text current date in Swift 3?
I want to print just today to the screen. I did not find how to do that.
In c# is very simple:
var date = DateTime.Now
I need to write 15.09.201..
Update 20140702:
The solution
Detailed answer as a blog post
(but I'm marking one of the other answers as accepted instead of my own,
as it got me halfway there, and to reward the effort)
It ap..
I use c++11, but also some libraries that are not configured for it, and need some type conversion. In particular I need a way to convert std::__cxx11::string to regular std::string, but googling I ca..
I want get the value from Exec(@sql) and assign to @Rowcount(int)
Here is my query:
'SET @RowCount = (select count(*)
FROM dbo.Comm_Services
WHERE CompanyId ..
I want to pass the B int array pointer into func function and be able to change it from there and then view the changes in main function
#include <stdio.h>
int func(int *B[10]){
}
int main(v..
Is it possible to render HTML from another file in a React component?
I have tried the following, but it does not work:
var React = require('react');
/* Template html */
var template = require('./t..
I have RO access on a SQL View. This query below times out. How to avoid this?
select
count(distinct Status)
from
[MyTable] with (NOLOCK)
where
MemberType=6
The error message I get is:
..
I'm using m2eclipse as my maven 2 plugin for eclipse. I'm brand new to maven, so my mistake might be simple, although searching has not yielded any solutions for me. I can run maven from the command..
Some websites have code to "break out" of IFRAME enclosures, meaning that if a page A is loaded as an IFRAME inside an parent page P some Javascript in A redirects the outer window to A.
Typically th..
Suppose a1, b1, c1, and d1 point to heap memory, and my numerical code has the following core loop.
const int n = 100000;
for (int j = 0; j < n; j++) {
a1[j] += b1[j];
c1[j] += d1[j];
}
T..
What are the options to read/write files in .Net Core?
I am working on my first .Net Core app and looking for
File.Read*/File.Write* functions (System.IO from .Net) alternatives...
Is there an explicit equivalent command in Python's matplotlib for Matlab's hold on? I'm trying to plot all my graphs on the same axes. Some graphs are generated inside a for loop, and these are plott..
As some reason, I only have one repository to use.
But I have multiple projects including java projects, php scripts and Android apps projects.
Now my problem is, I have to put them to different su..
Basic question: How do I disassociate a git repo from the origin from which it was cloned?
git branch -a shows:
* master
remotes/origin/HEAD -> origin/master
and I want to remove all knowledg..
Does any operating system provide a mechanism (system call — not command line program) to change the pathname referenced by a symbolic link (symlink) — other than by unlinking the old one and crea..
I just installed Python3 from python.org and am having trouble installing packages with pip. By design, there is a man-in-the-middle packet inspection appliance on the network here that inspects all ..
The 'height' and 'width' are not supported in HTML5. How can I set a td's width and height while conforming to the HTML5 standard?
<!DOCTYPE html>
<html>
<head>
<meta http-..
I am writing a shell script that takes file paths as input.
For this reason, I need to generate recursive file listings with full paths. For example, the file bar has the path:
/home/ken/foo/bar
b..
I have an box of content and need to give shadow for that. But I want to give shadow for the bottom of the box only. I used this css box-shadow: 0 3px 5px #000000;
If i give this code it shows left,..
i am using a recyclerView to show my listitems in the navigation drawer.I have implemented the onclickListener but i have been stuck on how to open a different activity when items are clicked. All my ..
I am trying to change the background color of modal header of twitter bootstrap using following css code.
.modal-header
{
padding:9px 15px;
border-bottom:1px solid #eee;
background-c..
Just starting to figure Python out. I've read this question and its responses:
Is it true that I can't use curly braces in Python?
and I still can't fathom how curly braces work, especially sin..
In a Bash script, I would like to split a line into pieces and store them in an array.
For example, given the line:
Paris, France, Europe
I would like to have the resulting array to look like so:
arr..
I know a little C and now I'm taking a look at C++.
I'm used to char arrays for dealing with C strings, but while I look at C++ code I see there are examples using both string type and char arrays:
#..
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>..
I have a large input box for text but I can't change the font size?
<input type="text">
I would like to change the font size inside the text field but I can't seem to do it using CSS. Any help..
I'm trying to go through an authentication request that mimics the "basic auth request" we're used to seeing when setting up IIS for this behavior.
The URL is: https://telematicoprova.agenziadogane.i..
In my node.js application I did an npm install btoa-atob so that I could use the btoa() and atob() functions which are native in client-side javascript but for some reason weren't included in node. Th..
How can I configure windows command dialog to run different python versions in it? For example when I type python2 it runs python 2.7 and when I type python3 it runs python 3.3? I know how to configur..
I want to group two textviews in a group and use like a label and value. Is there any component to group two textviews in android? How can it be accomplished in android layout?
..
I was wondering if anyone knew of a way to check if a List is empty using assertThat() and Matchers?
Best way I could see just use JUnit:
assertFalse(list.isEmpty());
But I was hoping that there w..
I am writing a python MapReduce word count program. Problem is that there are many non-alphabet chars strewn about in the data, I have found this post Stripping everything but alphanumeric chars from ..
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'm trying to disable these radio buttons when a the loadActive link is clicked but for some reason it only disables the first in the order and then skips the rest.
<form id="chatTickets" method="..
In my .Net 2.0 Asp.net WebForms app, I have my Global.asax containing the following code:
<%@ Application CodeBehind="Global.asax.cs" Inherits="MyNamespace.Global" Language="C#" %>
However wh..
Currently I am getting these alerts:
Upgrade Required Your version of Elasticsearch is too old. Kibana requires Elasticsearch 0.90.9 or above.
Can someone tell me if there is a way I can find ..
i want to send email programmatically.
i tried out the following code.
final Intent emailIntent = new Intent(
android.content.Intent.ACTION_SEND);
emailIntent.setType("plain/te..
I find myself writing a lot of code like this to select one item that matches
var item = (from x in Items where x.Id == 123 select x).First();
Is there a cleaner way of doing it or is this as conc..
I accidentally installed the PowerPC version of MySQL on my Intel Mac in Snow Leopard, and it installed without a problem but of course doesn't run properly. I just didn't pay enough attention. Now wh..
The issue:
Some of the items in the select require more than the specified width of 145px in order to display fully.
Firefox behavior: clicking on the select reveals the dropdown elements list adjus..
When trying to run Android Studio on my computer, I get the following error:
The Environment variable JAVA_HOME (with a value of C:\Program Files(x86)\Java\jdk1.7.0_51\bin) does not point to a va..
I have a set of data that I load into python using a pandas dataframe. What I would like to do is create a loop that will print a plot for all the elements in their own frame, not all on one. My data ..
How does
@Scripts.Render("~/bundles/jquery")
differ from just referencing the script from html like this
<script src="~/bundles/jquery.js" type="text/javascript"></script>
Are the..
document.getElementById("elementId").style.display="none"
is used in JavaScript to hide an element. But in jQuery,
$("#elementId").hide();
is used for the same purpose. Which way is more efficien..
I have a Oracle schema with 70+ tables. I want to create simple page which can display the HDD space occupied by the tables. How I can get this value with SQL query?
P.S
And how I can get the Oracle..
I want to fill a DataGridView control using DataAdapter. But I don't know how to do it since I'm using a stored procedure with parameter.
Can someone cite an example please?..
I'm wondering what's the way to do work this snippet:
//html
<div ng-app="app">
<div ng-controller="AppCtrl">
<a my-dir ng-repeat="user in users">{{user.name}}</a>..
I need to load and use CSV file data in C++. At this point it can really just be a comma-delimited parser (ie don't worry about escaping new lines and commas). The main need is a line-by-line parser..
I have one Table which has two fields such as "StartTime" and "EndTime". The DataType of the Two columns are Time.
So the Values of the Table looks like as follows:
TableA:
StartTime ..
I have 2 asp.net texboxes with calendar extender. I want to find out the number of days between both dates when one of the date control is changed. how can I achieve this using jquery or javascript?..
If I want to set the focus on a textbox when the form is first opened, then at design time, I can set it's tabOrder property to 0 and make sure no other form control has a tabOrder of 0.
If I want to..
I want to convert a Timespan to Datetime. How can I do this?
I found one method on Google:
DateTime dt;
TimeSpan ts="XXX";
//We can covnert 'ts' to 'dt' like this:
dt= Convert.ToDateTime(ts.ToStri..
I have design problem with Google Chrome and its form autofill function.
If Chrome remembers some login/password it changes a background color to a yellow one.
Here are some screenshots:
How to r..
I remember hearing Joel Spolsky mention in podcast 014 that he'd barely ever used a foreign key (if I remember correctly). However, to me they seem pretty vital to avoid duplication and subsequent dat..
I have a table in the MySQL database that is set up with DATETIME. I need to SELECT in this table only by DATE and excluding the time.
How do I SELECT in this table by only date and bypassing the time..
I am starting to learn SQL and I have a book that provides a database to work on. These files below are in the directory but the problem is that when I run the query, it gives me this error:
Msg 5..
I am in the process of fixing some bad UTF-8 encoding. I am currently using PHP 5 and MySQL.
In my database I have a few instances of bad encodings that print like: î
The database collation ..
After starting to read a book on OO programming, I am attempting to make my android app more OO. However I am stumped on a simple scenario. I have a Book object, which can have many say Chapter objec..
How can i make i circle picture with swift ?
My ViewController :
import UIKit
import Foundation
class FriendsViewController : UIViewController{
@IBOutlet weak var profilPicture: UIImageView!
..
I need to update the values of a column, with a substring replace being done on the existing values.
Example:
Data contains abc@domain1, pqr@domain2 etc.
I need to update the values such that @dom..
According to AngularJS doc, calls to $http return the following:
Returns a promise object with the standard then method and two http specific methods: success and error. The then method takes two ..
I am using Eclipse IDE and am writing a servlet. The servlet should accept values from an html file and return JSON response accordingly.
My doPost() is:
protected void doPost(HttpServletRequest re..
I have a list of integer ASCII values that I need to transform into a string (binary) to use as the key for a crypto operation. (I am re-implementing java crypto code in python)
This works (assuming ..
I've been looking for a simple regex for URLs, does anybody have one handy that works well? I didn't find one with the zend framework validation classes and have seen several implementations...
Please treat this question as strictly educational. I'm still interested in hearing new answers and ideas to implement this
tl;dr
How would I implement bi-directional data-binding with JavaScript?
..
I have a pandas dataframe with the following column names:
Result1, Test1, Result2, Test2, Result3, Test3, etc...
I want to drop all the columns whose name contains the word "Test". The numbers of s..
I'm having trouble getting IntellJ to recognize JavaFX packages. With a new JavaFX project, with OpenJDK 11, when trying to build the project, IntelliJ can't recognize the JavaFX packages.
I've impor..
I want to comment out a block of code in sublime text.
I see it in RailsCasts, but don't think he uses sublime text ... to do the following ...
if (uncommented)
some uncommented example
# if (co..
How can I number several equations in a align environment using only one number?
For example
\begin{align}
w^T x_i + b \geqslant 1-\xi_i \text{ if } y_i=1, \nonumber \\
w^T x_i + b \leqslant -1+\xi..
I'm in the process of updating an old inline-block-based grid model I have to a newer Flexbox one I created. Everything has worked fine, apart from one little snag, which has become a bit of a dealbre..
Is there any way that I can check if an element is visible in pure JS (no jQuery) ?
So, for example, in this page: Performance Bikes, if you hover over Deals (on the top menu), a window of deals appe..
Recently, Apache Maven seems to be having caching issues. Performing clean installs on our projects using Windows Vista or Windows 7 sometimes produce artifacts with the same data as a previous build ..
What it the difference between running two commands:
foo = FooModel()
and
bar = BarModel.objects.create()
Does the second one immediately create a BarModel in the database, while for FooModel, t..
I'm trying to use regexes to match space-separated numbers.
I can't find a precise definition of \b ("word boundary").
I had assumed that -12 would be an "integer word" (matched by..
I read different things on the Internet and got confused, because every website says different things.
I read about * referencing operator and & dereferencing operator; or that referencing means ..
If I have a class that looks like:
public class Item
{
public int ClientID { get; set; }
public int ID { get; set; }
}
And a collection of those items...
List<Item> items = getItems(..
Possible Duplicate:
How do I calculate someone’s age in C#?
I want to write an ASP.NET helper method which returns the age of a person given his or her birthday.
I've tried code like..
I am trying to authenticate with GitHub using a personal access token. In the help files at github, it states to use the cURL method to authenticate (https://help.github.com/articles/creating-an-acces..
There, is for example, ViewBag property of ControllerBase class and we can dynamically get/set values and add any number of additional fields or properties to this object, which is cool .I want to use..
I almost copied the code from their website. The tab is initiated perfectly, and when I click on tabs, new panels are activated. However, the "active" class is not applied to the activated tab.
This i..
I am trying to apply an animation to a view in my Android app after my activity is created. To do this, I need to determine the current size of the view, and then set up an animation to scale from th..
Groovy adds the isAllWhitespace() method to Strings, which is great, but there doesn't seem to be a good way of determining if a String has something other than just white space in it.
The best I've ..
I am writing an iframe based facebook app. Now I want to use the same html page to render the normal website as well as the canvas page within facebook. I want to know if I can determine whether the p..
Does anyone know how to get the cells value of the selected row of JQGrid ? i m using mvc with JQGrid, i want to access the value of the hidden column of the selected row ?..
I understand the difference between request.getSession(true) and request.getSession(false). But request.getSession() & request.getSession(true) look very similar!
Both "return the current session..
It's the first time I am using c# so I am not very familiar with it. I would like to create a simple program to find the biggest number if I have the user entering 3 numbers. I just need to know what ..
I have just installed Netbeans 8.0.2 on CentOS 6.5.
When I try to run it, I get the message
Cannot find java. Please use the --jdkhome switch
I have /usr/share/java-1.7.0 so I typed
/usr/local/n..
Here are two statements that I'd like to work, but which return error messages:
IF EXISTS (SELECT * FROM gdata_calendars WHERE `group` = ? AND id = ?) SELECT 1 ELSE SELECT 0
and
IF ((SELECT COUNT..
First of all, I understand in 90% of applications the performance difference is completely irrelevant, but I just need to know which is the faster construct. That and...
The information currently ava..
What would be a more simplified description of file descriptors compared to Wikipedia's? Why are they required? Say, take shell processes as an example and how does it apply for it?
Does a process ta..
I'm wanting to display a pivot table and for it to show me the actual values, one on each row, rather than a sum of the values. E.g.
Name Jan Feb Mar Apr
Bob 12 10 4
..
I have a table like this:
table
- field1: tinyint
- field2: varchar (nullable)
- datefield: timestamp (nullable)
Now I want to get all entries where field1 is 1, field2 is null and where datefield ..
I'm getting following Console Error.
Error : Cannot find module
Here is the full error i'm getting in console. What should I do?
internal/modules/cjs/loader.js:582
throw err;
^
Error: Canno..
sometimes, when I use Form.close() when debugging my program, although the form is closed, the application is still running. I noticed this behaviour when using the msgbox function.
I have no thread ..
I'm using ChartJS in a project I'm working on and I need a different color for each bar in a Bar Chart.
Here's an example of the bar chart data set:
var barChartData = {
labels: ["001", "002", "0..