I have an existing Web API 2 service and need to modify one of the methods to take a custom object as another parameter, currently the method has one parameter which is a simple string coming from the..
From what I can tell, docker images are installed to /var/lib/docker as they are pulled. Is there a way to change this location, such as to a mounted volume like /mnt?..
I'm getting a warning that a value provided to moment is not in a recognized ISO format. I changed my variable today with the moment function and still it doesn't work.
Here's the warning error:
Depr..
I'm having trouble adding a button to a layout that I've created in XML. Here's what I want to achieve:
//some class
else {
startActivity(new Intent(StatisticsScreen.this, ScreenTemperature.c..
I have form with one input for email and two submit buttons to subscribe and unsubscribe from newsletter:
<form action="" method="post">
{{ form_newsletter }}
<input type="submit" name="news..
Background: This is a request for something that may not exist yet, but I've been meaning to build one for a long time. First I will ask if anyone has seen anything like it yet.
Suppose you have an ar..
I have a ArrayList made up of different elements imported from a db, made up of strings, numbers, doubles and ints. Is there a way to use a reflection type technique to find out what each type of data..
This docs mention moment.ISO_8601 as a formatting option (from 2.7.0 - http://momentjs.com/docs/#/parsing/special-formats/), but neither of these work (even 2.7.0):
var date = moment();
date.format(m..
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.
..
Is there any event in Jquery that's triggered only if the user hits the enter button in a textbox? Or any plugin that can be added to include this? If not, how would I write a quick plugin that would ..
I have searched and searched to no avail so apologies if the answer does exist.
I am not very good with batch files so please keep this in mind.
All I am after is a single batch file that will list/..
I have implemented in my app the mitigation to CSRF attacks following the informations that I have read on some blog post around the internet. In particular these post have been the driver of my imple..
I have 3 divs with ids header, content and footer. Header and footer has fixed height and they are styled to float on top and bottom. I want the middle content height calculated automatically with jqu..
It has always bothered me that the only way to copy a file in Java involves opening streams, declaring a buffer, reading in one file, looping through it, and writing it out to the other steam. The we..
Imagine the code:
public class obj
{
// elided
}
public static Dictionary<string, obj> dict = new Dictionary<string, obj>();
Method 1
public static obj FromDict1(string name)
{
..
I'm attempting to compile Java 1.4 code that was created by IBM's WSDL2Java on Java5 without recreating the stubs and saw this error in Eclipse.
I'm under the assumption that the stubs generated shoul..
I have this module routes:
var mainModule = angular.module('lpConnect', []).
config(['$routeProvider', function ($routeProvider) {
$routeProvider.
when('/home', {template:'views/home...
i have the following login.html page for login located in design folder.
<html>
<head>
<title>Login Page</title>
<script src="../Script/login.js">
</script&..
Is there any difference between & and + operators while concatenating string?
if yes, then what is difference? And if No, then why below code generating exception?
Example:
Dim s, s1, t As S..
Possible Duplicate:
Object comparison in JavaScript
Is there any method that takes in 2 JSON objects and compares the 2 to see if any data has changed?
Edit
After reviewing the comments, ..
In the VueJs 2.0 docs I can't find any hooks that would listen on props changes.
Does VueJs have such hooks like onPropsUpdated() or similar?
Update
As @wostex suggested, I tried to watch my prope..
I tried to write a code which is used to re-size the UI components when soft-keyboard appears.
When I use adjustResize, it res-size the UI components and at the same time adjustPan gave me same outpu..
My SQL Server CPU has been at around 90% for the most part of today.
I am not in a position to be able to restart it due to it being in constant use.
Is it possible to find out what within SQL is ca..
I have one table CSBCA1_5_FPCIC_2012_EES207201222743, having two columns employee_id and employee_name
I have used following query
SELECT ROW_NUMBER() OVER (ORDER BY EMPLOYEE_ID) AS ID, EMPLOYEE_ID..
I have certain data in sqllite and it update every time whenever, I click on save button and I want to show the data into a table layout for adding more rows for updated data.
I have certain code but..
I have a data frame
a <- runif (10)
b <- letters [1:10]
c <- c(rep ("A-B", 4), rep("A_C", 6))
data1 <- data.frame (a, b, c)
data1
And I wan to replace _ in A_C of column c for - to hav..
Does any one know how to remove a project from Android Studio in an attempt to re- export it from Eclipse?
So far I have tried removing all the gradle files associated with the project, which causes..
I want to send all input in a form with ajax .I have a form like this.
<form action="target.php" method="post" >
<input type="text" name="lname" />
<input type="text" name="fn..
I have the following HTML and jquery:
<html dir="ltr" lang="en">
<head>
</head>
<body>
<h2>Test disabling submit button for 1 minute...</h2>
<br/>
<p s..
How to move a particular HashMap entry to Last position?
For Example, I have HashMap values like this:
HashMap<String,Integer> map = new HashMap<String,Integer>();
map= {Not-Specified 1..
Ruby has this handy and convenient way to share instance variables by using keys like
attr_accessor :var
attr_reader :var
attr_writer :var
Why would I choose attr_reader or attr_writer if I could s..
Is there a way to change the properties of a CSS class, not the element properties, using jQuery?
This is a practical example:
I have a div with class red
.red {background: red;}
I want to change..
(Preface: this question is about ASP.NET MVC 3.0 which was released in 2011, it is not about ASP.NET Core 3.0 which was released in 2019)
I want to upload file in asp.net mvc. How can I upload the fi..
I read some weather data from a csv file as a dataframe named "weather". The problem is that one of the columns' data type is an object. this is weird beacuse it indicates temperature... anyway, how t..
We receive regular automated build messages from Jenkins build servers at work.
It'd be nice to ferret these away into a label, skipping the inbox.
Using a filter is of course the right choice.
The..
I'm dealing with a class which extends JFrame.
It's not my code and it makes a call to super before it begins constructing the GUI. I'm wondering why this is done since I've always just accessed the ..
I'm working within the traditional Maven Java project structure inside IntelliJ, e.g.
main/java/com/x/y
test/java/com/x/y
When I create a class called Foo in main/java/com/x/y using IntelliJ I woul..
I have the following asp.net textbox control.
<asp:TextBox ID="txtAdd" runat="server" />
After the user writes something in this textbox and presses the ENTER key, I want to run some code fro..
The documentation at http://ipython.org/ipython-doc/stable/interactive/notebook.html says
You can provide a conceptual structure for your computational document as a whole using different levels o..
For the following SQL Server datatypes, what would be the corresponding datatype in C#?
Exact Numerics
bigint
numeric
bit
smallint
decimal
smallmoney
int
tinyint
money
Approximate Numerics
floa..
Here is the code I have written to add a marker to the google map by providing latitude and longitude. The problem is that I get a very highly zoomed google map. I have tried setting the zoom level to..
I'm trying to run an openssl command to narrow down what the SSL issue might be when trying to send an outbound message from our system.
I found this command in another topic: Using openssl to get th..
I am trying to rename a column in MySQL community server 5.5.27 using this SQL expression:
ALTER TABLE table_name RENAME COLUMN old_col_name TO new_col_name;
I also tried
ALTER TABLE table_name ..
When I try to create a component in the angular cli, it's showing me this error. How do I get rid of it ?
Error: More than one module matches. Use skip-import option to skip importing the componen..
I am trying to use the "default" options in applying folder permissions; by that, I mean that using the "Full Controll, Write, Read, etc" in the 'Properties' for a folder.
The following script works ..
How do I update a value in a json file and save it through node.js?
I have the file content:
var file_content = fs.readFileSync(filename);
var content = JSON.parse(file_content);
var val1 = content.v..
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..
When I have to use a classic adapter with a ListView, I update my data in the ListView like this:
myAdapter.swapArray(data);
public swapArray(List<Data> data) {
clear();
addAll(data);
no..
I installed Sublime Text and wanted to know how to open rb files in it from the terminal. I saw What is the command to make Sublime Text my core editor? and I see that I can make Sublime my core edito..
So in a BufferedImage, you receive a single integer that has the RGB values represented in it. So far I use the following to get the RGB values from it:
// rgbs is an array of integers, every single ..
I have written a formula to return a string based on logic run on a string field in my database. I have everything working, except I'm unable to return when the field is the empty string.
This is wh..
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 converted a pandas dataframe to an html output using the DataFrame.to_html function. When I save this to a separate html file, the file shows truncated output.
For example, in my TEXT column,
df...
I am copying an VBA code snippet from MSDN that shows me how to grab results from a SQL query into excel sheet (Excel 2007):
Sub GetDataFromADO()
'Declare variables'
Set objMyConn = New ..
I want current time in millis and then to store it in 12 hour format but with this piece of code I am getting 24 hour format time.
long timeInMillis = System.currentTimeMillis();
Calendar cal1 = Cale..
Is there a way to capture a list of specific type using mockitos ArgumentCaptore. This doesn't work:
ArgumentCaptor<ArrayList<SomeType>> argument = ArgumentCaptor.forClass(ArrayList.class..
I would like to get the query execution time in Oracle. I don't want the time Oracle needs to print the results - just the execution time.
In MySQL it is easy to get the execution time from the shell..
In Excel we have the VLOOKUP function that looks for a value in a column in a table and then returns a value from a given column in that table if it finds something. If it doesn't, it produces an erro..
I'm trying to mess around with the Maps API V2 to get more familiar with it, and I'm trying to start the map centered at the user's current location. Using the map.setMyLocationEnabled(true); statemen..
I'm new to Angular and I'm coming from the Ember community. Trying to use the new Angular-CLI based off of Ember-CLI.
I need to know the best way to handle SASS in a new Angular project. I tried usi..
How do I grep a file for 19:55 and get the Line 1,2,3,4,5?
2013/10/08 19:55:27.471
Line 1
Line 2
Line 3
Line 4
Line 5
2013/10/08 19:55:29.566
Line 1
Line 2
Line 3
Line 4
Line 5
..
Take this regular expression: /^[^abc]/. This will match any single character at the beginning of a string, except a, b, or c.
If you add a * after it – /^[^abc]*/ – the regular expression will c..
I'm currently coding a French website. There's a schedule page, where a link on the side can be used to load another day's schedule.
Here's the JS I'm using to do this:
<script type="text/jav..
Are there non obvious differences between NVL and Coalesce in Oracle?
The obvious differences are that coalesce will return the first non null item in its parameter list whereas nvl only takes two pa..
The code:
a <- structure(list(`X$Days` = c("10", "38", "66", "101", "129", "185", "283",
"374")), .Names = "X$Days")
Then a is like
$`X$Days`
[1] "10" "38" "..
I have been studying SSRS 2005 / 2008 in the past weeks and have created some server side reports. For some application, a colleague suggested that I look into RDLC for that particular situation. I am..
I just wanted to diable the elastic scrolling/bounce effect in Safari (OSX Lion).
I found the solution to set overflow: hidden for body in css, but as expected it only disables the scrollbar, so if t..
I experienced some odd behavior while using C++ type traits and have narrowed my problem down to this quirky little problem for which I will give a ton of explanation since I do not want to leave anyt..
So, per Mehrdad's answer to a related question, I get it that a "proper" database table column doesn't store a list. Rather, you should create another table that effectively holds the elements of sai..
Console says
[root@ip-172-31-18-2 mysql]# service mysqld start
Starting mysqld (via systemctl): Job for mysqld.service failed because the control process exited with error code. See "systemctl statu..
I was wondering if there is a way to do this purely in sql:
q1 = SELECT campaign_id, from_number, received_msg, date_received
FROM `received_txts` WHERE `campaign_id` = '8';
INSERT INTO action_..
I am trying out the new Microsoft Visual Studio Code editor in Linux Fedora environment. I would like to know how to replace new line (\n) in place of some other text.
For example, I have html text ..
Is there a better way other than looping to find data in JSON? It's for edit and delete.
for(var k in objJsonResp) {
if (objJsonResp[k].txtId == id) {
if (action == 'delete') {
objJsonRes..
enum Suit: String {
case spades = "?"
case hearts = "?"
case diamonds = "?"
case clubs = "?"
}
For example, how can I do something like:
for suit in Suit {
// do something with ..
The following works in all browsers except IE (I'm testing in IE 9).
jQuery.support.cors = true;
...
$.ajax(
url + "messages/postMessageReadByPersonEmail",
{
..
I added a navigation control to switch between views in my app. But some of the views shouldn't have 'Back' (the previous title) button. Any ideas about how to hide the back button?..
When starting up my web site for the first time, I'm getting this error
Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from assembly 'mscorlib, Version=4.0.0.0, Culture=neut..
This is running on Windows Server 2008 and used to work several months ago. I am just now using this server again for some dev work with VS.
This is live web server used to serve up a few test sites..
I am using Visual Studio Code 1.3.1 with the newly introduced tabs.
When I click on files, the first file will open in a tab. If I do not make any changes to this file, the second clicked file will o..
I would like to put a white bar which would take all of the width at the bottom of the screen. To do so I thought about using absolute positioning with the inherited flexbox parameters.
With the fol..
What's the UNC path to a folder on my local computer, and how can I access it?
I have tried:
Security for the folder -- set to Everyone Full Control (for now!)
Sharing permissions -- set to Everyone..
I want to create a vector out of a row of a data frame. But I don't want to have to row and column names. I tried several things... but had no luck.
This is my data frame:
> df <- data.frame(a..
Classical (non-js) approach to overloading:
function myFunc(){
//code
}
function myFunc(overloaded){
//other code
}
Javascript wont let more than one function be defined with the same name. As s..
I am working with Window Service project. that have to write data to a sheet in Excel file in a sequence times.
But sometimes, just sometimes, the service throw out the exception "Exception from HRES..
After the installation of my ant in my windows 7 . In cmd i typed ant -v it's given the ant version but it says the following also.
Buildfile: build.xml does not exist!
Build failed
What's the pro..
I get this message when compiling C++ on gcc 4.3
error: ‘NULL’ was not declared in this scope
It appears and disappears and I don't know why. Why?
Thanks...
I would like to sort my list with the date property.
This is my custom class:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Test.Web
{
public clas..
I use echo and print_r much, and almost never use print.
I feel echo is a macro, and print_r is an alias of var_dump.
But that's not the standard way to explain the differences...
I have a AJAX call that returns some JSON like this:
$(document).ready(function () {
$.ajax({
type: 'GET',
url: 'http://example/functions.php',
data: { get_param: 'valu..
I want to fetch 1st row 1st cell value from database it works well with below code . But when there is no result found it throws Exception.
How to handle with DBNull .
Should i change my query ? whic..
I have 2 tables. tbl_names and tbl_section which has both the id field in them. How do I go about selecting the id field, because I always get this error:
1052: Column 'id' in field list is ambiguous..
I tried these - but still do not see the icon like before:
getSupportActionBar().setLogo(R.drawable.ic_launcher);
getSupportActionBar().setDisplayUseLogoEnabled(true);
getSupportActionBar().setIcon(R..
I want to group my dataframe by two columns and then sort the aggregated results within the groups.
In [167]:
df
Out[167]:
count job source
0 2 sales A
1 4 sales B
2 6 sales C
3 ..
Trying to do something I would think would be very simple. I would like to import an existing JavaScript library and then call it's functions. So for example I would like to import blah.js and then c..
I'm developing a sign up page, by putting some text as the title at the navigation bar. I want to give those texts different colors. For this purpose I'm using a separate CSS file, but I want to do th..
Possible Duplicate:
Is JavaScript's Math broken?
I'm calculating the sum of several float values using javascript and... I've noticed a strange thing never seen before. Executing this c..
I'm new to Python and I have a simple question, say I have a list of items:
['apple','red','apple','red','red','pear']
Whats the simpliest way to add the list items to a dictionary and count how ma..
Since I've created @Directive as SelectableDirective, I'm little bit confused, about how to pass more than one value to the custom directive. I have searched a lot but didn't get proper solution in An..
I have seen a number of hacks to try to get the bcp utility to export column names along with the data. If all I am doing is dumping a table to a text file what is the most straightforward method to h..
I've been facing problems accessing my git repository lately. It worked perfectly fine earlier but now I cannot run any command on CLI. I can however, access the corresponding Web Page, Could someone..
I'm having some problems formatting the decimals of a double. If I have a double value, e.g. 4.0, how do I format the decimals so that it's 4.00 instead?..
I am working on a website for my app development class and I have the weirdest issue.
I am using a bit of JQuery to send form data to a php page called 'process.php, and then upload it to my DB. The..
loginService.islogged()
Above function return a string like "failed".
However, when I try to run then function on it, it will return error of
TypeError: Cannot read property 'then' of undefined
..
I am trying to use SVMLight from Java, using the JNI wrapper on this page:
static {
System.loadLibrary("lib/JNI_SVM-light-6.01/lib/svmlight");
}
I get the following error:
... lib\JNI_S..
We have a project in Team Foundation Server (TFS) that has a non-English character (š) in it. When trying to script a few build-related things we've stumbled upon a problem - we can't pass the š let..
I want to convert a String to an array of objects of Character class but I am unable to perform the conversion. I know that I can convert a String to an array of primitive datatype type "char" with th..
Does anyone know how can I catch a mail error (error is displayed while sending email and the error is caused by the mailserver down) in php?
Error that was caused by emailserver down is below:
&..
Converting a C++ string to a char array is pretty straightorward using the c_str function of string and then doing strcpy. However, how to do the opposite?
I have a char array like: char arr[ ] = "Th..
I keep trying variations of this query and can't seem to make this happen. I've also referenced this post: Path Expected for Join! Nhibernate Error and can't seem to apply the same logic to my query...
Is there a way to make a UIScrollView auto-adjust to the height (or width) of the content it's scrolling?
Something like:
[scrollView setContentSize:(CGSizeMake(320, content.height))];
..
I'm trying to remove jquery from my Angular.js app in order to make it lighter, and put Angular's jqLite instead. But the app makes heavy use of find('#id') and find ('.classname'), which are not supp..
What is the "less code needed" way to get parameters from a URL query string which is formatted like the following?
www.mysite.com/category/subcategory?myqueryhash
Output should be: myqueryhash
..
I started studying smart pointers of C++11 and I don't see any useful use of std::weak_ptr. Can someone tell me when std::weak_ptr is useful/necessary?..
I'd like to restart a remote computer that belongs to a domain. I have an administrator account but I don't know how to use it from powershell.
I know that there is a Restart-Computer cmdlet and that..
I need to transform some data into a 'normal shape' and I read that Box-Cox can identify the exponent to use to transform the data.
For what I understood
car::boxCoxVariable(y)
is used for respon..
I get the error Uncaught TypeError: Cannot read property 'getContext' of null and the important parts in files are... I am wondering since game.js is in a directory below, it cannot find canvas? What ..
Suppose I have an array, a = [2 5 4 7]. What is the function returning the maximum value and its index?
For example, in my case that function should return 7 as the maximum value and 4 as the index...
Trying to access private corporate tfs.
They gave me access by giving appropriate rights to windows user (domain\login).
I'm fine with accessing web interface of tfs, browse repository and stuff.
Bu..
MySQL had a nifty command SELECT ... INTO OUTFILE that could write the result set into a file (CSV format or some other optional format).
I am currently using SQL Server Management Studio to query..
I am giving link of a pdf file on my web page for download, like below
<a href="myfile.pdf">Download Brochure</a>
The problem is when user clicks on this link then
If the user have in..
I want to draw the underline below my TextView. I have searched a few content but couldn't find out anything fruitful.
Can anyone please help me out here?..
I would like to check server-side if a request to my php page is an ajax request or not.
I saw two ways to do this:
First way: sending a GET parameter in the request which tells the page that this i..
There is a statement in android canvas.drawBitmap(visiblePage, 0, 0, paint);
When I add canvas.rotate(90), there is no effect. But if I write
canvas.rotate(90)
canvas.drawBitmap(visiblePage, 0, 0, ..
For example, I have two lists
A = [6, 7, 8, 9, 10, 11, 12]
subset_of_A = [6, 9, 12]; # the subset of A
the result should be [7, 8, 10, 11]; the remaining elements
Is there a built-..
I've build a web page that let's you select a page name from a drop down list and then transfers the browser to that page. The code that does the transfer is
if (url){
window.open(url, '_blank')..
How can I loop through all the entries in an array using JavaScript?
I thought it was something like this:
forEach(instance in theArray)
Where theArray is my array, but this seems to be incorrect...
I'm getting a group of cells and doing some calculations over them in function below.
It works if I pass a range (with : sign) as first parameter, but it fails if I choose some cells as its range (A1..
Im still somewhat of a newbie on jQuery and the ajax scene, but I have an $.ajax request performing a GET to retrieve some XML files (~6KB or less), however for the duration the user spends on that pa..
I have one HTML <form>.
The form has only one action="" attribute.
However I wish to have two different target="" attributes, depending on which button you click to submit the form. This is pr..
Is it possible to make a simple query to count how many records I have in a determined period of time like a year, month, or day, having a TIMESTAMP field, like:
SELECT COUNT(id)
FROM stats
WHERE re..
I've seen so many different standards for the JSON date format:
"\"\\/Date(1335205592410)\\/\"" .NET JavaScriptSerializer
"\"\\/Date(1335205592410-0500)\\/\"" .NET DataContractJsonSerializ..
Recently, I came across one of my application which consumes too much memory and increasing by 10 MB/sec.
So, I like to know the best way to destroy JavaScript object and variables so memory consumpt..
I'm using a DataGridView with object data binding to display information about logging entities in a system, retrieved via SOAP from a remote service.
One of the columns is called "Last action" and me..
I frequently find myself with a folder open in Windows, wishing to have a command prompt open with the same working directory.
I am aware of Power Toys "Command Prompt", but that only works as a cont..
Just downloaded and installed elasticsearch 1.3.2 in past hour
Opened IP tables to port 9200 and 9300:9400
Set my computer name and ip in /etc/hosts
Head Module and Paramedic Installed and running ..
I'm using a UITableView to layout content 'pages'. I'm using the headers of the table view to layout certain images etc. and I'd prefer it if they didn't float but stayed static as they do when the st..
I have the following Json gotten from Twitter
+ token {[
{
"trends": [
{
"name": "Croke Park II",
"url": "http://twitter.com/search?q=%22Croke+Park+II%22",
..
Before I wrote in urls.py, my code... everything worked perfectly. Now I have problems - can't go to my site. "cannot import name patterns"
My urls.py is:
from django.conf.urls import patterns, incl..
I installed Python Anaconda on Mac (OS Mavericks). I wanted to revert to the default version of Python on my Mac. What's the best way to do this? Should I delete the ~/anaconda directory? Any other ch..
I am using Python 3.3
I need to create two lists, one for the unique words and the other for the frequencies of the word.
I have to sort the unique word list based on the frequencies list so that th..
We always write:
public static final int A = 0;
Question:
Is static final the only way to declare a constant in a class?
If I write public final int A = 0; instead, is A still a constant o..
I have a dataframe such as:
a1 = c(1, 2, 3, 4, 5)
a2 = c(6, 7, 8, 9, 10)
a3 = c(11, 12, 13, 14, 15)
aframe = data.frame(a1, a2, a3)
I tried the following to convert one of the columns to a vector, ..
I installed sublime text 2 to OSX 10.8.2.
In my Mac, python 2.7.3 is installed.
In sublime text2, I just type
print 'Hello'
but error occurred like below.
/usr/bin/python: can't find '__main__'..
I'm trying to retrieve records from table by knowing the date in column contains date and time.
Suppose I have table called t1 which contains only two column name and date respectively.
The data sto..
When I downloaded the Git project OsmAnd and went to compile it,
Eclipse returned these errors:
[Dex Loader] Unable to execute dex: GC overhead limit exceeded
[OsmAnd] Conversion to Dalvik format..
I am trying to create a simple HTML log-in that is placed in a box. I want to have something like this:
I have tried a few things but they all seem to have been in vain. Here is my code thus far. H..
In the tutorial there is an example for finding prime numbers:
>>> for n in range(2, 10):
... for x in range(2, n):
... if n % x == 0:
... print(n, 'equals', x, '*', ..
I was trying to make my JTextField fill the width and set a height for it but still failed. I tried adding the code setPreferredSize(new Dimension(320,200)); but still failed. Is there any way I can m..
I am using pandas as a db substitute as I have multiple databases (oracle, mssql, etc) and I am unable to make a sequence of commands to a SQL equivalent.
I have a table loaded in a DataFrame with so..
I am trying to replace a character at a specific position of a string.
For example:
String str = "hi";
replace string position #2 (i) to another letter "k"
How would I do this?
Thanks! ..
I have a series of scripts running in parallel as a nohup on an AIX server hosting oracle 10g. These scripts are written by somebody else and are meant to be executed concurrently. All the scripts are..
I am working on a swift app for iPhone. There is a modal view in my application that I want only to be in portrait view.
My question is, how do I programmatically force the phone to not allow rotatio..
I am totally a newbie with Maven.
I want to create a Maven project with Eclipse Juno EE with archetype "webapp". I installed "Maven Integration for Eclipse WTP (incubation)" and I also have installed ..
I'm trying to check in jQuery if a div contains some text, and then add a class if it does.
So I wrote something like this:
if( $("#field > div.field-item").text().indexOf('someText') = 0) {
..
We offer a platform for video- and audio-clips, photos and vector-grafics. We started with MySQL as the database backend and recently included MongoDB for storing all meta-information of the files, be..
I am trying to get the selected items string out of a Spinner. So far I have gotten this:
bundle.putString(ListDbAdapter.DB_PRI, v.getText().toString());
This does not work and gives a class castin..
How can I check to see if a String contains a whitespace character, an empty space or " ". If possible, please provide a Java example.
For example: String = "test word"; ..
I create a selectList in my controller, to display in the view.
I'm trying to create it on the fly, sorta thing .. like this...
myViewData.PageOptionsDropDown =
new SelectList(new [] {"10", "15"..
I have a java complied package to speak with the https server on net. Running the compilation gives the following exception:
javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection..
I have a table of tags and want to get the highest count tags from the list.
Sample data looks like this
id (1) tag ('night')
id (2) tag ('awesome')
id (3) tag ('night')
using
SELECT COUNT(*), `T..
How do I assign vertical center alignment to the text inside a TextBlock? I found TextAlignment property but it is for horizontal text alignment. How do I do it for vertical text alignment?..
I'm following this tutorial to make this ML prediction:
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import style
style.use("ggplot")
from sklearn import svm
x = [1, 5, 1.5, 8..
I want to add OnLongClickListener on my list view. Whenever the user long press the item in list some action should be performed, But my code does not catch this listener. Please let me know where I a..
Quick question: I need to allow an input to only accept letters, from a to z and from A to Z, but can't find any expression for that. I want to use the javascript test() method...
I know that in C++11 we can now use using to write type alias, like typedefs:
typedef int MyInt;
Is, from what I understand, equivalent to:
using MyInt = int;
And that new syntax emerged from the ef..
I'm trying to run this simple HelloWorld code written in Java from my browser (Chrome):
public class HelloWorld extends JApplet {
public void init() {
try {
SwingUtilities.invokeAndWait(n..
I want to call some jQuery function targeting div with table. That table is populated with ng-repeat.
When I call it on
$(document).ready()
I have no result.
Also
$scope.$on('$viewContentL..
Using Windows Server 2008, how do I go about capturing the output of a script that is being ran with the windows task scheduler?
I'm testing a rather long custom printing batch-script, and for debugg..
I tried to create a database diagramm with SQL Server 2008, but an error occurs:
Database diagram support objects
cannot be installed because this
database does not have a valid owner.
To co..
I have a PowerShell script that does some checks on all Domain Admins in a number of domains.
For each user account a number of checks are preformed. When one of them fails the script should go to the..
import urllib2
website = "WEBSITE"
openwebsite = urllib2.urlopen(website)
html = getwebsite.read()
print html
So far so good.
But I want only href links from the plain text HTML. How can I solve..
I have this string:
var someString = "23/03/2012";
and want to replace all the "/" with "-".
I tried to do this:
someString.replace(///g, "-");
But it seems you cant have a forward slash / in ..
Possible Duplicate:
Move existing, uncommited work to a new branch in Git
I have some code in branch ABC.
After making some changes to it, i'd like to move all those uncommitted changes i..
C++ inherited arrays from C where they are used virtually everywhere. C++ provides abstractions that are easier to use and less error-prone (std::vector<T> since C++98 and std::array<T, n>..
Instead of making a list of alphabet characters like this:
alpha = ['a', 'b', 'c', 'd'.........'z']
is there any way that we can group it to a range or something? For example, for numbers it can be..
This is my view, and I wish to change layout_width to "10dip". How do I do so programmatically?
Note, this is not a LinearLayout, it's a View.
<View
android:id="@+id/nutrition_bar_filled"
..
i am new to XSLT ,can any one please suggest to me how to compare two elements coming from xml as string their values are:
<OU_NAME>Vision Operations</OU_NAME> --XML code
<OU_ADDR1>..
What is the use of web.xml and why do we use?
<filter>
<filter-name>wicket.mysticpaste</filter-name>
<filter-class>org.apache.wicket.protocol.http.WicketFilter..
Im making an API call using Axios in a React Web app. However Im getting the error in Chrome as,
XMLHttpRequest cannot load https://example.restdb.io/rest/mock-data. No 'Access-Control-Allow-Origi..
I'm using IDEA 12 Leda on Mountain Lion. I wanted to increase the maximum memory that IDE can use. I set the VMOptions in Info.plist file to be
-Xmx2048m -ea -XX:+HeapDumpOnOutOfMemoryError -Xverify:n..
I'm using the PostgreSQL database for my Ruby on Rails application (on Mac OS X 10.9).
Are there any detailed instructions on how to upgrade PostgreSQL database?
I'm afraid I will destroy the data i..
I have a whole bunch of tests on variables in a bash (3.00) shell script where if the variable is not set, then it assigns a default, e.g.:
if [ -z "${VARIABLE}" ]; then
FOO='default'
else
..
I wanted to extract one of my jars to specified directory using jar command line utility.
If I understand this right -C option should to the trick but when I try
jar xvf myJar.jar -C ./directoryToE..