AngularJS has the & parameters where you could pass a callback to a directive (e.g AngularJS way of callbacks. Is it possible to pass a callback as an @Input for an Angular Component (something li..
I apologize for the long post. I wanted to include everything that might be helpful. I have a single page website that consists of several divs stacked vertically. I'm using a floating nav bar and so..
In numpy, I have two "arrays", X is (m,n) and y is a vector (n,1)
using
X*y
I am getting the error
ValueError: operands could not be broadcast together with shapes (97,2) (2,1)
When (97,2)x(..
Assuming I have a left outer join as such:
from f in Foo
join b in Bar on f.Foo_Id equals b.Foo_Id into g
from result in g.DefaultIfEmpty()
select new { Foo = f, Bar = result }
How would I express ..
I'm trying to create a simple project on CLion. It uses CMake (I'm new here) to generate Makefiles to build project (or some sort of it)
All I need to is transfer some non-project file (some sort of ..
I am newbie to PostgreSQL and PostGIS. I want to store latitude and longitude values in PostgreSQL 9.1.1 database table. I will calculate distance between two points, find nearer points by using this..
Can anyone help me?
example
A {1,2,3}
B {1,4,5}
Code snippet:
a.intersect(b).print()
// Result 1 . twin between two object
a.merge(b).print()
// Result 1,2,3,4,5
It is valid if I write code be..
Possible Duplicate:
How to remove an XmlNode from XmlNodeList
Hi, How can i delete a set of nodes from an XML file.?
Here is a code snippet.
string path = @"C:\Documents and Settings\e45493..
How can I remove some specific elements from a numpy array? Say I have
import numpy as np
a = np.array([1,2,3,4,5,6,7,8,9])
I then want to remove 3,4,7 from a. All I know is the index of the value..
Actually what do they mean? All articles I find about them don't give me an idea, or my knowledge is too insufficient to understand it.
Will some one give me some resources with which I can learn thi..
I am using Selenium to launch a browser. How can I deal with the webpages (URLs) that will ask the browser to accept a certificate or not?
In Firefox, I may have a website like that asks me to accept..
I want to capture the text from the textbox when enter key is hit. I am using WPF/visual studio 2010/.NET 4. I dont know what event handler to be used in the tag ? I also want to do the same for m..
In an interview I was asked
Print a quotation mark using the printf() function
I was overwhelmed. Even in their office there was a computer and they told me to try it. I tried like this:
void m..
Hey there i started learning C# a few days ago and I'm trying to make a program that copies and pastes files (and replaces if needed) to a selected directory but I don't know how to get the directory ..
Has anyone an idea how many tcp-socket connections are possible on a modern standard root server? (There is in general less traffic on each connection, but all the connections have to be up all the ti..
I'm a PHP developer and now I use Notepad++ for code editing, but lately I've been searching for an IDE to ease my work.
I've looked into Eclipse, Aptana Studio and several others, but I'm not really..
I am practicing CSS and I am so confused about how can I force my div element to be center (vertically and horizontally) at my page (mean which way or ways for cross browser compatibility)?
Best rega..
When I get exceptions, it is often from deep within the call stack. When this happens, more often than not, the actual offending line of code is hidden from me:
tmp.rb:7:in `t': undefined method `ba..
We are developing a C# application for a web-service client. This will run on Windows XP PC's.
One of the fields returned by the web service is a DateTime field. The server returns a field in GMT for..
I just want to get/change value of CheckBox with JavaScript. Not that I cannot use jQuery for this. I've tried something like this but it won't work.
JavaScript function
function checkAddress()
..
I'm looking for some code that will look at Column A and as long as the cell in Column A is not blank, then the corresponding cell in Column B will equal a specific value.
So if Cell A1 <> "" then..
So, I have an SVG file in HTML, and one of the things I've heard about the format is that it doesn't get all pixelated when you zoom in on it.
I know with a jpeg or whatever I could have it stored as..
When I perform "SELECT * FROM table" I got results like below:
1 item1 data1
2 item1 data2
3 item2 data3
4 item3 data4
As you can see, there are dup records from column2 (item1 are dupped). So how ..
In Eclipse, I can press Alt+Shift+J and get a javadoc comment automatically generated with fields, returns, or whatever would be applicable for that specific javadoc comment. I'm assuming that Intelli..
Can I easily swap two elements with jQuery?
I'm looking to do this with one line if possible.
I have a select element and I have two buttons to move up or down the options, and I already have the se..
What's the difference between:
InputStream is = this.getClass().getClassLoader().getResourceAsStream(fileName)
and
InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStre..
I would like to be able to run functions once a Widget has finished building/loading but I am unsure how.
My current use case is to check if a user is authenticated and if not, redirect to a login vi..
In general terms I want to find in the string some substring but only if it is contained there.
I had expression :
^.*(\bpass\b)?.*$
And test string:
high pass h3
When I test the string via ex..
I just set up my first ionic 2 app (I've used ionic 1 fairly extensively). I'm trying to use the ionic-native camera preview plugin.
The setup was pretty straight forward:
npm install -g ionic cordo..
Here's what I have going:
import 'whatwg-fetch';
function fetchVehicle(id) {
return dispatch => {
return dispatch({
type: 'FETCH_VEHICLE',
payload: fetch(`http..
In JavaScript the orientation mode can be detected using:
if (window.innerHeight > window.innerWidth) {
portrait = true;
} else {
portrait = false;
}
However, is there a way to detect th..
I have a simple HTML upload form, and I want to specify a default extension ("*.drp" for example). I've read that the way to do this is through the ACCEPT attribute of the input tag, but I don't know ..
I have a table in my PostgreSQL database which has 3 columns - c_uid, c_defaults and c_settings. c_uid simply stores the name of a user and c_defaults is a long piece of text which contains a lot of d..
I have always been wondering how other people get to align to the centre the main div container as the only way I manage so far is adding to the css file the following:
*{
padding:auto;
margin:auto;
..
I'm currently developing a small OpenGL game for the Android platform and I wonder if there's an easy way to render text on top of the rendered frame (like a HUD with the player´s score etc). The tex..
I know this specific question has been asked before, but I am not getting any results using the bind() event on the jQuery UI Tabs plugin.
I just need the index of the newly selected tab to perform ..
SQL Server 2005/2008 Express edition has the limitation of 4 GB per database. As far as I known the database engine considers data only, thus excluding log files, unused space, and index size.
Gettin..
I have a simple html textarea on my side. Right now if you click tab in it, it goes to the next field. I would like to make the tab button indent a few spaces instead. How can I do this? Thanks...
Possible Duplicate:
Using global variables in a function other than the one that created them
I'm using functions so that my program won't be a mess but I don't know how to make a local var..
How do I convert a date/time string (e.g. 2011-01-01 15:00:00) that is UTC to any given timezone php supports, such as America/New_York, or Europe/San_Marino...
I am an AngularJS starter. I am trying to send data from :
Page A : Van Listing page
to
Page B: Van Update page.
When user click the update link for a van, I am invoking a controller and retrievi..
I have a file.sh with this, when run show : TERM environment variable not set.
smbmount //172.16.44.9/APPS/Interfas/HERRAM/sc5 /mnt/siscont5 -o
iocharset=utf8,username=backup,password=backup2011,r
..
I am using Mailgun API. There is a section that I need to provide a URL to them, then they are going to HTTP Post some data to me.
I provide this URL (http://test.com/MailGun/Webhook.aspx) to Mailgun..
I have a question regarding the .AsNoTracking() extension, as this is all quite new and quite confusing.
I'm using a per-request context for a website.
A lot of my entities don't change so don't nee..
I'm trying to find a way to use jQuery autocomplete with callback source getting data via an ajax json object list from the server.
Could anybody give some directions?
I googled it but couldn't find..
I am looking for a JavaScript array insert method, in the style of:
arr.insert(index, item)
Preferably in jQuery, but any JavaScript implementation will do at this point...
I am developing an app for sending some feedback.
Basically I'm trying to make a TextBox for comments, but I'm used to the WinForms MultiLine=true. I've set MinLines to 3, which is getting there, but..
I have the following mysql query. Could you please tell me how to write the same query in Codeigniter's way ?
SELECT * FROM myTable
WHERE trans_id IN ( SELECT trans_id FROM myTable WHERE co..
How to access JSON objects in the vue.js app I am new in this
import json from './json/data.json'
the JSON file is loaded and now I have to access the objects within it ..
I want to display .jpg image in an Qt UI. I checked it online and found http://qt-project.org/doc/qt-4.8/widgets-imageviewer.html. I thought Graphics View will do the same, and also it has codec to di..
When my code issues a call like this:
entityManager.find(Customer.class, customerID);
How can I see the SQL query for this call? Assuming I don't have access to database server to profile/monitor ..
Using C#. I have a string dateTimeEnd.
If the string is in right format, I wish to generate a DateTime and assign it to eventCustom.DateTimeEnd of type
public Nullable<System.DateTime> DateTi..
I would like to remove and/or deactivate the Emmet package in Sublime Text 2.
Should I just remove the Emmet directory or what is the typical workflow for removal of a package?..
I have a formatted XML file, and I want to convert it to one line string, how can I do that.
Sample xml:
<?xml version="1.0" encoding="UTF-8"?>
<books>
<book>
<title&..
I have a multithreaded app that has to read some data often, and occasionally that data is updated. Right now a mutex keeps access to that data safe, but it's expensive because I would like multiple t..
I need to set some Authorization headers after the user has logged in, for every subsequent request.
To set headers for a particular request,
import {Headers} from 'angular2/http';
var headers = ..
I am trying to import requests module, but I got this error
my python version is 3.4 running on ubuntu 14.04
>>> import requests
Traceback (most recent call last):
File "/usr/local/lib/pyt..
I have some sample string. How can I replace first occurrence of this string in a longer string with empty string?
regex = re.compile('text')
match = regex.match(url)
if match:
url = url.replace(..
On several occations, I have faced the situation that the default.aspx page on a Site doesn't work. More specifically, a reference to a WebPart and/or Control is throwing a error because the assembly ..
I'm trying to replicate a button style in a Photoshop mock-up that has two shadows on it. The first shadow is an inner lighter box shadow (2px), and the second is a drop shadow outside the button (5px..
I'm trying to write an update trigger that will only update a password when a new password is set in the update statement but I'm having a terrible time trying to nail down the syntax. This should be..
Is there a way to see what would be pushed if I did a git push command?
What I'm picturing is something like the "Files Changed" tab of Github's "pull request" feature. When I issue a pull request, I..
I was deploying an ASP.NET MVC application last night, and found out that it is less work to deploy with IIS7 set to integrated mode. My question is what is the difference? And what are the implicatio..
Consider:
docker run -it centos /bin/bash
I pressed Ctrl+D to exit it.
I want to continue to run this container, but I found I can't.
The only method is
docker commit `docker ps -q -l` my_image
..
Can one create a list (bullets, numbered or not) inside a markdown table.
A table looks like this:
| Tables | Are | Cool |
| ------------- |:-------------:| -----:|
| col 3 is ..
What is the difference between these two methods - System.exit() and JFrame.dispose()?
If we want to close a Java Swing application when a button is clicked, which method should I use?..
How do you use Auto Layout within UITableViewCells in a table view to let each cell's content and subviews determine the row height (itself/automatically), while maintaining smooth scrolling performan..
I am new to python and am writing some scripts to automate downloading files from FTP servers, etc. I want to show the progress of the download, but I want it to stay in the same position, such as:
o..
This is what I have jsFiddle link
_x000D_
_x000D_
nav.main ul ul {_x000D_
position: absolute;_x000D_
list-style: none;_x000D_
display: none;_x000D_
opacity: 0;_x000D_
visibility: ..
I want to get a confirm message on clicking delete (this maybe a button or an image). If the user selects 'Ok' then delete is done, else if 'Cancel' is clicked nothing happens.
I tried echoing this ..
I have downloaded jbpm-installer-3.2.7.jar but I don't know how to install or run the file.
If I double click on it, it opens in winrar. I tried installing through command prompt, but I got the follo..
Is there a command in Microsoft SQL Server T-SQL to tell the script to stop processing?
I have a script that I want to keep for archival purposes, but I don't want anyone to run it...
I think this might be a pretty simple question, but I haven't been able to figure it out yet. If I've got a 2-dimensional array like so:
int[,] array = new int[2,3] { {1, 2, 3}, {4, 5, 6} };
What's..
In an error condition, I tried to return nil, which throws the error:
cannot use nil as type time.Time in return argument
What is the zero value for time.Time?..
I have a docker-compose.yml file that contains 4 containers: redis, postgres, api, worker
During the development of worker, I often need to restart it in order to apply changes. Is there any good way..
I quite like the inline CSS pattern in React and decided to use it.
However, you can't use the :hover and similar selectors. So what's the best way to implement highlight-on-hover while using inline ..
I want to create a layout for an admin panel, but I dont know how to get the #nav and #content container always at 100% of the browser window. I don't understand the inherit of 100% height attributes,..
I want to both read from and write to a file. This doesn't work.
static void Main(string[] args)
{
StreamReader sr = new StreamReader(@"C:\words.txt");
StreamWriter sw = new StreamWriter(@"C..
I am making a React Native app. I would like to customize the app icon (meaning the icon that you click on to start the app). I have Googled this, but I keep finding different types of icons that refe..
I would like to know how to use a dynamic query inside a function. I've tried lots of ways, however, when I try to compile my function a message SQL 42601 is displayed.
The code that I use:
CREATE O..
Is there a way to round a python float to x decimals? For example:
>>> x = roundfloat(66.66666666666, 4)
66.6667
>>>x = roundfloat(1.29578293, 6)
1.295783
I've found ways to trim/..
This is part of my job.xml:
<job id="foo" job-repository="job-repository">
<step id="bar">
<tasklet transaction-manager="transaction-manager">
<chunk commit-interval=..
Page one contains an HTML form. Page two - the code that handles the submitted data.
The form in page one gets submitted. The browser gets redirected to page two. Page two handles the submitted data..
Is there a function in R that fits a curve to a histogram?
Let's say you had the following histogram
hist(c(rep(65, times=5), rep(25, times=5), rep(35, times=10), rep(45, times=4)))
It looks norma..
As far as I can see Solutions Architect is just a different "marketing" term for Applications Architect. Is that correct or are the roles actually different somehow? If so, how?
And yes, I have searc..
I have nginx up and running with a Ruby/Sinatra app and all is well. However, I'm now trying to have a second application running from the same server and I noticed something weird. First, here's my n..
In Oracle, what is the difference between :
CREATE TABLE CLIENT
(
NAME VARCHAR2(11 BYTE),
ID_CLIENT NUMBER
)
and
CREATE TABLE CLIENT
(
NAME VARCHAR2(11 CHAR), -- or even VARCHAR2(11)
ID_CLIENT..
I am getting the following error on a project of mine when I try to build... Error CS2001: Source file '.cs' could not be found. I took the two files that are causing this error out on purpose because..
I have generated an EF4 Model from a MySQL database and I have included both StoredProcedures and Tables.
I know how to make regular instert/update/fetch/delete operations against the EF but I can't ..
I would just like to add an object of an class (Pixel) to an array.
export class Pixel {
constructor(x: number, y: number) {}
}
The class has the following attribute:
pixels: Pixel[] = [];
Th..
I'm teaching myself some basic scraping and I've found that sometimes the URL's that I feed into my code return 404, which gums up all the rest of my code.
So I need a test at the top of the code to ..
I would extract all the numbers contained in a string. Which is the better suited for the purpose, regular expressions or the isdigit() method?
Example:
line = "hello 12 hi 89"
Result:
[12, 89]
..
I am totally new to python and I am trying to implement quicksort in it.
Could someone please help me complete my code?
I do not know how to concatenate the three arrays and printing them.
def sort..
I'm trying to understand dependency injections (DI), and once again I failed. It just seems silly. My code is never a mess; I hardly write virtual functions and interfaces (although I do once in a blu..
I have a form on example.com/contact-us.php that looks like this (simplified):
<form method="post" action="process.php" enctype="multipart/form-data">
<input type="file" name="uploaded_fil..
I stumbled into a delicate SQL problem when I needed to use a value from a field inside a LIKE %..% statement.
Example:
SELECT t1.Notes, t2.Name
FROM Table1 t1, Table2 t2
WHERE t1.Notes LIKE '%t2.Na..
Looking at documentation http://maven.apache.org/surefire/maven-surefire-plugin/examples/testng.html, we can see <scope> tag under <dependency>
What is that and how can we use it for run..
What is the actual purpose and use of the EDI & ESI registers in assembler?
I know they are used for string operations for one thing.
Can someone also give an example?..
Running ipconfig /all shows a Teredo Tunneling Pseudo-Interface. What is that? Does this have something to do with IPv4 vs IPv6? Should I get rid of it? If so how?..
I have problem with laravel view is not found by route function I did composer dumpautoload but no use
ArticleController.php
<?php
class ArticleController extends BaseController
{
public func..
I'm studying multiple table joins this week and have some odd results being returned. Here is the scenario...
Using the correct tables, create a query using the traditional join operation that will l..
So this is embarrassing. I've got an application that I threw together in Flask and for now it is just serving up a single static HTML page with some links to CSS and JS. And I can't find where in the..
Currently I have this dictionary, printed using pprint:
{'AlarmExTempHum': '\x00\x00\x00\x00\x00\x00\x00\x00',
'AlarmIn': 0,
'AlarmOut': '\x00\x00',
'AlarmRain': 0,
'AlarmSoilLeaf': '\x00\x..
So far I have this:
public double checkValueWithin(int min, int max) {
double num;
Scanner reader = new Scanner(System.in);
num = reader.nextDouble();
while (..
Is there any way I can do
git add -A
git commit -m "commit message"
in one command?
I seem to be doing those two commands a lot, and if Git had an option like git commit -Am "commit message", it ..
I know that it's possible to get any XML node using C# if you know the node name, but I want to get the root node so that I can find out the name. Is this possible?
Update: I'm using XMLTextReader to..
I am getting the following errors while trying my first spring project:
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be fo..
Using just grep and sed, how do I replace all occurrences of:
a.example.com
with
b.example.com
within a text file under the /home/user/ directory tree recursively finding and replacing all occu..
ERROR:
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.m..
I am trying to create a simple Io-web-chat.
I recently wanted to seperate my <script> inside my html file to an external js file.
this is my very simple folder structure:
Chat
|-- index.html
..
I have an array a like this:
a = [[40, 10], [50, 11]]
I need to calculate the mean for each dimension separately, the result should be this:
[45, 10.5]
45 being the mean of a[*][0] and 10.5 the ..
How to center text "test"?
This is my code:
<?php
/** Error reporting */
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
date..
I need to perform Wildcard (*, ?, etc.) search on a string.
This is what I have done:
string input = "Message";
string pattern = "d*";
Regex regex = new Regex(pattern, RegexOptions.IgnoreCase);
if (..
Here's a basic component. Both the <ul> and <li> have onClick functions. I want only the onClick on the <li> to fire, not the <ul>. How can I achieve this?
I've played around ..
I'm using bootstrap datepicker on a textbox. The default format of the date when you select a date is mm/dd/yyyy. Now I want to change it to dd/mm/yyyy. How can I accomplish this. Right now I'm just i..
I have configured my Apache by myself and have tried to load phpMyAdmin on a virtual host, but I received:
403 Forbidden You don't have permission to access / on this server
My httpd.conf
#
#..
I have a maven2 multi-module project and in each of my child modules I have JUnit tests that are named Test.java and Integration.java for unit tests and integration tests respectively. When I execute..
If I define an array in PHP such as (I don't define its size):
$cart = array();
Do I simply add elements to it using the following?
$cart[] = 13;
$cart[] = "foo";
$cart[] = obj;
Don't arrays in ..
Is there a reason for this? I am asking because if you needed to use lots of empty chars then you get into the same situation as you would when you use lots of empty strings.
Edit: The reason for thi..
My Eclipse project is suddenly no longer deploying properly. I can't trace it to any particular change I've made to the environment.
I have tested with multiple source-controlled projects and they a..
I have a datatable, dtFoo, and would like to get a count of the rows that meet a certain criteria.
EDIT: This data is not stored in a database, so using SQL is not an option.
In the past, I've used ..
Alright, I'm trying to buy into the idea that html tables should not be used, and that divs should be. However, I often have code that resembles the following
<table>
<tr>
<..
Please clarify my doubt in Hashset. Consider the following code,
class Person
{
String name;
Person(String n)
{
name=n;
}
public String getName()
{
return na..
I have a user-defined table type. I want to check it's existence before editing in a patch using OBJECT_ID(name, type) function.
What type from the enumeration should be passed for user-defined table..
In Ubuntu it's quite simple; I can run the application using:
$ NODE_ENV=production node myapp/app.js
However, this doesn't work on Windows. Is there a configuration file where I can set the attrib..
I cannot get this TRIM code to work
SELECT
dbo.COL_V_Cost_GEMS_Detail.TNG_SYS_NR AS [EHP Code],
dbo.COL_TBL_VCOURSE.TNG_NA AS [Course Title],
LTRIM(RTRIM(FCT_TYP_CD)& ') AND (' & ..
I have some JSON with the following structure:
{"source":[
{"name":"john","age":20},
{"name":"michael","age":25},
{"name":"sara", "age":23}
]
}
I have name..
I've been considering fast poker hand evaluation in Python. It occurred to me that one way to speed the process up would be to represent all the card faces and suits as prime numbers and multiply them..
I want to overlay one image with another using CSS. An example of this is the first image (the background if you like) will be a thumbnail link of a product, with the link opening a lightbox / popup s..
I'd like a simple example of exporting a function from a C++ Windows DLL.
I'd like to see the header, the .cpp file, and the .def file (if absolutely required).
I'd like the exported name to be unde..
I've got an array of arrays, something like:
[
[1,2,3],
[1,2,3],
[1,2,3],
]
I would like to transpose it to get the following array:
[
[1,1,1],
[2,2,2],
[3,3,3],
]
It's n..
I have a variable string that contains well-formed and valid XML. I need to use JavaScript code to parse this feed.
How can I accomplish this using (browser-compatible) JavaScript code?..
This may be something common and trivial, but I seem to be having trouble finding a concrete answer. In C# there is a concept of delegates, which relates strongly to the idea of function pointers from..
I've got the following two tables (in MySQL):
Phone_book
+----+------+--------------+
| id | name | phone_number |
+----+------+--------------+
| 1 | John | 111111111111 |
+----+------+--------------..
So I have a directory in /var/www (called cake) and I need to allow www-data to write to it, but I also want to write to it (without having to use sudo). I'm afraid to change the permissions to 777 in..
I'm trying to open a .tex file.
I'm not sure I've got to the bottom of the (possibly) surprisingly complex process. I was told I could do it with Notepad++, which I proceeded to download. Here is the..
How can I achieve this?
public class GenericClass<T>
{
public Type getMyType()
{
//How do I return the type of T?
}
}
Everything I have tried so far always returns type Ob..
I just developed my first program in C++ and I wanted to show it with one of my friends. Sadly, when he tries to open the exe it gets an error which says "MSVCP140.dll is missing". Why is this issue h..
I have a PHP script that needs to make responses with HTTP response codes (status-codes), like HTTP 200 OK, or some 4XX or 5XX code.
How can I do this in PHP?..
I have errors in my class MainActivity.
The error: The method getActivity() is undefined for the type MainActivity
public class MainActivity extends SherlockFragmentActivity{
PlaceSlidesFragment..
I am not asking the question that is already asked here:
What is the difference between @PathParam and @QueryParam
This is a "best practices" or convention question.
When would you use @PathParam vs..
I feel a bit embarrassed as I am trying to add two columns in R to get the product.
I have tried
sum(col1,col2)
but this returns
Error in Summary.factor(c(49L, 48L, 47L, 46L, 46L, 45L, 45L, 44L, ..
I've tried on a few different forums and can't seem to get a straight answer, how can I make this function return the struct? If I try 'return newStudent;' I get the error 'No suitable user-defined co..
I am confused with the grid system in the new Bootstrap, particularly these classes:
col-lg-*
col-md-*
col-xs-*
(where * represents some number).
Can anyone please explain the following:
How tha..
How do I determine the distance between the very top of a div to the top of the current screen? I just want the pixel distance to the top of the current screen, not the top of the document. I've tri..
ng-bind-html-unsafe was removed in Angular 1.2
I'm trying to implement something where I need to use ng-bind-html-unsafe. In the docs and on the github commit they say:
ng-bind-html provides ng-h..
This has been asked several times for several languages but I can't get it to work.
I have a string like this
String str = "This is a string.\nThis is a long string.";
And I'm trying to replace the..
Which class would work best for a non-ordered list of pairs? I'll be taking a bunch of (float,short) pairs and will need to be able to perform simple math (like multiplying the pair together to return..
I have a couple of Images configured as application resources.
When my application starts, the background of the main window is set via XAML:
<Window.Background>
<ImageBrush ImageSource..
I need to send a JSON (which I can stringify) to the server and to retrieve the resulting JSON on the user side, without using JQuery.
If I should use a GET, how do I pass the JSON as a parameter? Is..
I've been using ArrayList recently in my android project at the office and I'm a bit confused between List and ArrayList, what is the difference of the two and what should I use?
Also I saw some impl..
I have the following code:
String[] where;
where.append(ContactsContract.Contacts.HAS_PHONE_NUMBER + "=1");
where.append(ContactsContract.Contacts.IN_VISIBLE_GROUP + "=1");
Those two appends are no..
I´d like to SELECT a single value into a variable. I´d tried to following:
DECLARE myvar INT(4);
-- immediately returns some syntax error.
SELECT myvalue
FROM mytable
WHERE anothervalue = 1..
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 have a favicon with the dimensions of height=26px / width=20px named favicon.png
<link href=http://www.example.com/images/favicon.png rel="shortcut icon" />
However, in my browser, my favic..
I would like to add some style on a select box with the pseudo :after (to style my select box with 2 parts and without images). Here's the HTML:
<select name="">
<option value="">Test&l..
Is it possible to extend query results with literals like this?
select name from users
union
select name from ('JASON');
or
select age, name from users
union
select age, name from (25,'Betty');
..
How do I make flex boxes work in Safari?
I have a responsive nav that uses a CSS flex box to be responsive
and for some reason it won't work in Safari.
Here is my code:
_x000D_
_x000D_
#menu {_x000D..
I want to use the twitter bootstrap icons on my form input submit buttons.
The examples on http://twitter.github.com/bootstrap/base-css.html#icons mainly show styled hyperlinks.
The closest I've c..
How can I change the project namespace in Visual Studio?
The namespace is currently WindowsFormsApplication16, and I want the namespace to be MyName...
I am trying to plot a ROC curve to evaluate the accuracy of a prediction model I developed in Python using logistic regression packages. I have computed the true positive rate as well as the false pos..
I don't get the difference between git rebase origin and git rebase origin/master. In my case I cloned a git repository twice. In the first clone I have to use git rebase origin and in the other clone..
I've searched around and haven't really found a clear answer as to when you'd want to use .First and when you'd want to use .FirstOrDefault with LINQ.
When would you want to use .First? Only when yo..
While reading up the documentation for dict.copy(), it says that it makes a shallow copy of the dictionary. Same goes for the book I am following (Beazley's Python Reference), which says:
The m.c..
I am using WordPress. I have an image folder like mytheme/images/myimages.
I want to retrieve all the images name from the folder myimages
Please advice me, how can I get images name...
I have two DLL files which I'd like to include in my EXE file to make it easier to distribute it. I've read a bit here and there how to do this, even found a good thread here, and here, but it's far t..
I am trying to achieve something along the lines of a for-each, where I would like to take the Ids of a returned select statement and use each of them.
DECLARE @i int
DECLARE @PractitionerId int
DECLA..
I'm rewriting a project to use Node.js. I'd like to keep using MySQL as the DB (even though I don't mind rewriting the schema).
I'm looking for a simple-to-use, reasonable-performance ORM, which suppo..
I learned something simple about SQL the other day:
SELECT c FROM myTbl GROUP BY C
Has the same result as:
SELECT DISTINCT C FROM myTbl
What I am curious of, is there anything different in the w..