I'm building an ASP.NET MVC site where I'm using Lucene.Net for search queries. I asked a question here about how to properly structure Lucene.Net usage in an ASP.NET MVC application and was told that..
What I must do to make Server.MapPath work?
I have using System.Web;
what else? When I type Server there is no quick result option (intelli-sense) for Server.
Any help?..
I came up with a basic one to help automate the process of removing a number of folders as they become unneeded.
#!/bin/bash
rm -rf ~/myfolder1/$1/anotherfolder
rm -rf ~/myfolder2/$1/yetanotherfolder..
I have a view like this:
CREATE VIEW MyView AS
SELECT Column FROM Table WHERE Value = 2;
I'd like to make it more generic, it means to change 2 into a variable. I tried this:
CREATE VIEW MyVie..
I would like to simulate a natural mouse movement in Java (going from here to there pixel by pixel). To do that I need to know the starting coordinates.
I've found the method event.getX() and event.g..
Basically, I know I can go through my control panel and modify the path variable. But, I'm wondering if there is a way to through batch programming have a temporary path included? That way it is only ..
In SQL Server 2008 I have a table CUSTOMERS that has two columns as:
ID,
BALANCE
How can I write the query that selects the ID of the customer who has maximum balance, "in the most effective way"?
..
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 am able to draw checkbox in Github README.md lists using
- [ ] (for unchecked checkbox)
- [x] (for checked checkbox)
But this is not working in table. Does anybody know how to implement checkbox ..
I'm designing an HTML email template, which forces me to use tables. In the code below, I'm having trouble (1) removing the spacing below the placeholder image and (2) removing the space between the i..
I've written a macro that takes a 2 dimensional array, and "prints" it to equivalent cells in an excel workbook.
Is there a more elegant way to do this?
Sub PrintArray(Data, SheetName, StartRow, Sta..
Seems that something similar already has been discussed on stackoverflow, but i could not find exactly the same.
I am trying to send Cookie with CORS(Cross-origin resource sharing), but it is not wor..
Impressed by is-latex-worth-learning-today, and many how-to's on Windows,
How do you have someone started with LaTeX on Linux?
How do you generate a pdf out of it and give up the OOO Word processer?..
How to insert a string enclosed with double quotes in the beginning of the StringBuilder and String?
Eg:
StringBuilder _sb = new StringBuilder("Sam");
I need to insert the string "Hello" to the be..
I know that in C and C++, when casting bools to ints, (int)true == 1 and (int)false == 0. I'm wondering about casting in the reverse direction...
In the code below, all of the following assertions he..
How do I convert an int (number of seconds) to the formats mm:ss or hh:mm:ss?
I need to do this with Python code (and if possible in a Django template)...
I am using an Amazon S3 bucket for uploading and downloading of data using my .NET application. Now my question is: I want to access my S3 bucket using SSL. Is it possible to implement SSL for an Amaz..
I would like to insert a descriptive text inside an input element that disappers when the user click on it.
I know it is a very common trick, but I do not know how to do that..
What is the simplest/..
What is the grant option/trick I need to give to the current user ("userA") to allow him to change a object's owner which belongs by another user ("userC")?
More precisely, the contact table is owned..
I've tried reading through questions about sibling imports and even the
package documentation, but I've yet to find an answer.
With the following structure:
+-- LICENSE.md
+-- README.md
+-- api
¦ ..
I am using a HorizontalScrollView in a layout and I need to identify the user have reached the start and end point of the scroll.
For ListView I have tried a the onScrollListener and it is possible t..
I am trying to print out all the elements of a List, however it is printing the pointer of the Object rather than the value.
This is my printing code...
for(int i=0;i<list.size();i++){
System..
I have a start calendar input box and an end calendar input box. We want defaults start calendar input box 30 days prior to current date and the end calendar input box to be the current date. Here is ..
I have the query below where the date is hard-coded. My objective is to remove the harcoded date; the query should pull the data for the previous month when it runs.
select count(distinct switch_id)
..
With all the new CSS3 border stuff going on (-webkit, ...) is it now possible to add a border to your font? (Like the solid white border around the blue Twitter logo). If not, are there any not-too-ug..
How can I terminate process using vbscript. PLEASE NOTE, I need to terminate process that runs under windows 64-bit environment as native 64 (not using select * from win_32_Process)
Thanks,..
Can anybody tell me how to do the following in in a Windows batch script? (*.bat):
Create a folder only if it doesn't already exist
In more detail, I want to create a folder named VTS on the C:\ ..
How can I create a JSON with this format in Android:
Since the API that I will be passing will parse JsonArray then the object.
Or would it be okay if just to pass a json object? Since I will just hav..
When I've tried How to you set the maximum number of characters that can be entered into a UITextField using swift?, I saw that if I use all 10 characters, I can't erase the character too.
The only t..
This is my template:
<div class="span12">
<ng:view></ng:view>
</div>
and this is my view template:
<h1>{{stuff.title}}</h1>
{{stuff.content}}
I am getting ..
I am trying to setup a confirmation dialog on an ng-click using a custom angularjs directive:
app.directive('ngConfirmClick', [
function(){
return {
priority: 1,
t..
I created a branch called '6796', then I pushed it to remote, checked it out on another machine, made other edits, pushed it, then merged it with the master, and deleted it - locally and remotely (git..
I'm trying to display post meta values and post meta keys, If only one value is to be display I can used the simple function get_post_meta() but what I need now is to post all post meta data with the ..
I have two data frames df1 and df2, where df2 is a subset of df1. How do I get a new data frame (df3) which is the difference between the two data frames?
In other word, a data frame that has all the..
I have a basic number for loop which increments the variable num by 1 over each iteration...
for (( num=1; num<=5; num++ ))
do
echo $num
done
Which outputs:
1
2
3
4
5
I'm trying to make it p..
This should be a simple problem, but I can't seem to find a solution.
I have the following markup:
<div style="width:20px; height:20px; margin-top:10px; border:solid 1px black; background-color:#..
I have a container div that holds two internal divs; both should take 100% width and 100% height within the container.
I set both internal divs to 100% height. That works fine in Firefox, however in ..
how to alert if input type file is empty !?
this is my jquery code but i didnt know how to get the value
$('.upload').live("click",function()
{
var imgVal = $('#uploadImage').val();
if(imgVa..
I am developing a webapp using Spring MVC 3 and have the DispatcherServlet catching all requests to '/' like so (web.xml):
<servlet>
<servlet-name>app</servlet-name>
<s..
I have a question regarding the native Array.forEach implementation of JavaScript: Does it behave asynchronously?
For example, if I call:
[many many elements].forEach(function () {lots of work to do}..
Trying to debug an issue with a server and my only log file is a 20GB log file (with no timestamps even! Why do people use System.out.println() as logging? In production?!)
Using grep, I've found an ..
My problem is that I was looking for way to use both storyboard and xib. But I can't find proper way to load and show storyboard programmatically. Project was started developing with xib, and now it's..
I read a string using this format with a data reader. How can I read in a date using similar format?
while (MyReader.Read())
{
TextBox1.Text = (string)MyReader["Note"];
}
..
I want to grab the last two numbers (one int, one float; followed by optional whitespace) and print only them.
Example:
foo bar <foo> bla 1 2 3.4
Should print:
2 3.4
So far, I have the fo..
I'm getting "[project] nuget configuration is invalid" error. I received an error like this before and used the 'Update Nuget package manager' solution mentioned here:
Unable to Install Any Package i..
I am working on an app that scans just the UID of MIFARE Classic cards to facilitate attendance registration. I have got it working. However, every time I scan a card on my Galaxy S4, I get a toast st..
I have 4 tables that stores different information about a user in each. Each table has a field with user_id to identify which row belongs to which user. If I want to delete the user is this the best..
I'm using Automapper and I have the following scenario:
Class OrderModel has a property called 'ProductName' that isn't in the database.
So when I try to do the mapping with:
Mapper.CreateMap<Orde..
Is it possible somehow to return 0 instead of NaN when parsing values in JavaScript?
In case of the empty string parseInt returns NaN.
Is it possible to do something like that in JavaScript to check..
I have one String variable, str with possible values, val1, val2 and val3.
I want to compare (with equal case) str to all of these values using an if statement, for example:
if("val1".equalsIgnoreCa..
This is not necessarily an issue, I am just curious as to how it works. I have a method:
public static bool UserIsAuthenticated()
{
bool isAuthed = false;
try
{
if (HttpContext.Cu..
I'm using Download Manger for download some multimedia files and categorize them. I'm also using Crashlytics and this is an error I frequently get it on different devices and versions of Android. I'm ..
OK, I'm losing it. PowerShell is annoying me. I'd like a pause dialog to appear, and it won't.
PS W:\>>> $host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
Exception calling "ReadKey" with "1" ..
I think I increased my heap size to 1 GB in NetBeans since I changed the config to look like this:
netbeans_default_options="-J-Xmx1g ......
After I restarted NetBeans, can I be sure that my app is..
In my previous question, Andrew Jaffe writes:
In addition to all of the other hints and tips, I think you're missing something crucial: your functions actually need to return something.
When yo..
I have an array created with this code:
var widthRange = new Array();
widthRange[46] = { min:0, max:52 };
widthRange[66] = { min:52, max:70 };
widthRange[90] = { min:70, max:94 };
I want to get ea..
I installed nodejs on ubuntu from instructions given here
When I write node --version in the terminal I see this :
-bash: /usr/sbin/node: No such file or directory
I can see node in the /usr/sbin/ ..
I am trying to find an item index by searching a list. Does anybody know how to do that?
I see there is list.StartIndex and list.EndIndex but I want something like python's list.index("text")...
I wanted to show a loading icon to users until the page elements are fully loaded. How can I do that with javascript and I want to do it with javascript, not jquery?
Here is a link how google does it..
What I want to do is to say if the contents of cell D3 (on current worksheet) exist in column A in the first worksheet (in my case entitled list). (and they always do exist somewhere). Return the cont..
I want to compare a date from a database that is between 2 given dates.
The column from the database is DATETIME, and I want to compare it only to the date format, not the datetime format.
SELECT * F..
I have been googling and playing with every combination I know but I cannot get my checkboxes to be initialised as checked.
Example:
<ul class="object administrator-checkbox-list">
<li ..
I'd Like to make any image from my ImageView to be circular with a border.
I searched but couldn't find any useful information (anything that I tried didn't work).
How can I achieve this through xm..
Which of the 2 APIs is simpler to read/write/edit excel sheets ?
Do these APIs not support CSV extensions ?
Using JXL for file.xls and file.xlsx, I get an exception like:
jxl.read.biff.BiffExceptio..
I just upgraded to Git 1.8.0.1 for Windows, from my previous version 1.7.9.mysysgit.0. I downloaded the new version from the Git site and installed through the normal Git installer EXE.
That said, wh..
This is likely a a novice question, but google surprisingly did not provide an answer.
I have this rather artificial method
T HowToCast<T>(T t)
{
if (typeof(T) == typeof(string))
{
..
I am trying to call my service class's stopService() method from my activity.
But I dont know how to access stopservice method from my activity class.
I have the below code but its not working..........
What is the syntax for adding an element to a scala.collection.mutable.Map ?
Here are some failed attempts:
val map = scala.collection.mutable.Map
map("mykey") = "myval"
map += "mykey" -> "myva..
String.Format does not work in TypeScript.
Error:
The property 'format' does not exist on value of type
'{ prototype: String; fromCharCode(...codes: number[]): string;
(value?: any): string; new..
I need to use a lambda function to do a row by row computation. For example create some dataframe
import pandas as pd
import numpy as np
def myfunc(x, y):
return x + y
colNames = ['A', 'B']
dat..
I want use A-Z buttons on a html page like shown below (only sample and few words)
<INPUT TYPE="BUTTON" VALUE=" A " ONCLICK="A">
<INPUT TYPE="BUTTON" VALUE=" B " ONCLICK="B">
<INPUT TY..
How do I access the corresponding groupby dataframe in a groupby object by the key?
With the following groupby:
rand = np.random.RandomState(1)
df = pd.DataFrame({'A': ['foo', 'bar'] * 3,
..
If not, is there a de facto standard? Basically I'm writing a command line help text like so:
usage: app_name [options] required_input required_input2
options:
-a, --argument Does something..
A while ago I came across some code that marked a member variable of a class with the mutable keyword. As far as I can see it simply allows you to modify a variable in a const method:
class Foo
{ ..
I have 2 tables- student and studLoad both having 2 fields studID and studName. I want to load data from student table into stuLoad table.
If the data already exists in the studLoad table, then it sho..
I need to strip a specific word from a string.
But I find python strip method seems can't recognize an ordered word. The just strip off any characters passed to the parameter.
For example:
>>..
I want to check if the values in one column are the same as values in another column. Whenever the values are not the same, I would like to change the color of these cells.
For example:
Column I, ..
I want to create a data store to allow me to store some data.
The first idea was to create a dictionary where you have 1 key with many values, so a bit like a one to many relationship.
I think the d..
What is the advantage of using uint8_t over unsigned char in C?
I know that on almost every system uint8_t is just a typedef for unsigned char,
so why use it?..
I'm simply trying to convert a string that is generated from a barcode scanner to an int so that I can manipulate it by taking getting the remainder to generate a set number of integers. So far I hav..
I've created a taxonomy.php page in my WordPress theme folder. I would like to get the current term id for a function.
How can I get this?
get_query_var('taxonomy') only returns the term slug, I wan..
I want to create a JavaScript wait() function.
What should I edit?
function wait(waitsecs) {
setTimeout(donothing(), 'waitsecs');
}
function donothing() {
//
}
..
Caused by: org.springframework.orm.hibernate3.HibernateSystemException: ids for this class must be manually assigned before calling save(): com.rfid.model.Role; nested exception is org.hibernate.id.I..
I would like to place two plots side by side using the ggplot2 package, i.e. do the equivalent of par(mfrow=c(1,2)).
For example, I would like to have the following two plots show side-by-side with t..
I have a template binding that displays a model attribute called 'date' which is a date, using Angular's date filter.
<span class="gallery-date">{{gallery.date | date:'mediumDate'}}</span>..
I have a PHP variable of type Array and I would like find out if it contains a specific value and let the user know that it is there. This is my array:
Array ( [0] => kitchen [1] => bedroom [2]..
What is the proper method to set the focus to a specific field within a dynamically loaded DIV?
$("#display").load("?control=msgs"); // loads the HTML into the DIV
$('#display').fadeIn("fast"); // di..
I have an html page and I would like inside the html page to retrieve the name of the html document via Javascript. Is that possible?
e.g. name of html document = "indexOLD.html"..
I have a class full of utility functions. Instantiating an instance of it makes no semantic sense, but I still want to call its methods. What is the best way to deal with this? Static class? Abstract?..
In my routable component I have
@RouteConfig {
{path: '/login', name: 'Login', component: LoginComponent}
}
But how do I get the query params if I go to app_url/login?token=1234?..
here's the deal I got a datagridviewer which is called gridview1 and a fileupload1 when i upload a file it updates the gridview1 and table in database with the file name and path and stores the said f..
I am trying to define some endpoints and do a test using nodejs. In server.js I have:
var express = require('express');
var func1 = require('./func1.js');
var port = 8080;
var server = express();
se..
Is there a way in Python to pass optional parameters to a function while calling it and in the function definition have some code based on "only if the optional parameter is passed"..
I'm trying to display a text input inline with a dropdown button. I can't figure out how to do this though. Here's the HTML I've tried (I've put all of it on a single line with no results):
<div..
Well it looks like Dreamweaver CS5 will try to smoother the HTML5 thing for a few more years (weeks actually). Seems like the next rung down is right to Notepad!
Anyone know a good HTML5 editor with ..
How do i get Mac Id of android device programmatically. I have done with IMIE Code and I know how to check Mac id on device manually but have no idea how to find out programmatically...
Long story short, when I write the following:
sudo easy_install MySQL-python
I get the error
EnvironmentError: mysql_config not found
All right, so there are plenty of threads and the like on..
I've got a list of Python objects that I'd like to sort by an attribute of the objects themselves. The list looks like:
>>> ut
[<Tag: 128>, <Tag: 2008>, <Tag: <>, <T..
I have a pandas DataFrame that I want to upload to a new CSV file. The problem is that I don't want to save the file locally before transferring it to s3. Is there any method like to_csv for writing t..
how can I write UTF-8 encoded strings to a textfile from vba, like
Dim fnum As Integer
fnum = FreeFile
Open "myfile.txt" For Output As fnum
Print #fnum, "special characters: äöüß" 'latin-1 or som..
I am using ActiveState Python 3 on Windows and wanted to connect to my MySQL database.
I heard that mysqldb was the module to use.
I can't find mysqldb for Python 3.
Is there a repository available w..
Am I missing something here?
var someNumber = 123.456;
someNumber = someNumber.toFixed(2);
alert(typeof(someNumber));
//alerts string
Why does .toFixed() return a string?
I want to round the numbe..
Hi I'm Trying to merge two arrays and also want to remove duplicate values from final Array.
Here is my Array 1:
Array
(
[0] => stdClass Object
(
[ID] => 749
[post_author] ..
In a SQL statement, how do I compare a date saved as TIMESTAMP with a date in YYYY-MM-DD format?
Ex.: SELECT * FROM table WHERE timestamp = '2012-05-25'
I want this query returns all rows having times..
In my web application, I do something like this to read the session variables:
if (HttpContext.Current.Session != null && HttpContext.Current.Session["MyVariable"] != null)
{
string myVa..
I'm having trouble installing the Python Pandas library on my Mac OSX computer.
I type the following in Terminal:
$ sudo easy_install pandas
But then I get the following:
Searching for pandas
Rea..
I have this URL:
site.fwx?position=1&archiveid=5000&columns=5&rows=20&sorting=ModifiedTimeAsc
what I need is to be able to change the 'rows' url param value to something i specify, ..
I am using Laravel 5.1
Few days ago I used protected $dates = ['license_expire'] in my model to convert the string date to Carbon instances. In HTML the default value in create form for the date was ..
I'm using a WebView for displaying embedded Youtube video and that works on Galaxcy S2 (OS 2.3.5) and doesn't on Nexus S (OS 2.3.4), all I get is white screen without any video display.
Here is the c..
I am trying to figure how to add text to a p tag or h1 tag that already has a text node.
For example:
_x000D_
_x000D_
var t = document.getElementById("p").textContent;_x000D_
var y = document.creat..
I have ps1 script to grab some information from the vmware cluster environment.
In some place of ps1 script requires the ENTER button keystroke.
So, How to do that ?
-Thanks..
I have recently updated my system to record date/times as UTC as previously they were storing as local time.
I now need to convert all the local stored date/times to UTC. I was wondering if there is ..
I wonder what I'm doing wrong:
$(".s").keypress(function(e) {
switch (e.keyCode) {
case 8: // Backspace
//console.log('backspace');
case 9: // Tab
case 13: // Enter
c..
How do I parse the first, middle, and last name out of a fullname field with SQL?
I need to try to match up on names that are not a direct match on full name. I'd like to be able to take the full n..
I have been struggling to upload files from WebView since last few
days and there is no progress. I googled and implemented all suggested
solutions but none works, like: solutions suggested here,
and ..
How to style mat-select's panel component. From the docs I get that I need to provide panelClass so I make it like this:
<mat-form-field>
<mat-select placeholder="Search for"
[(ngMode..
Is there a way for UILabel to draw a border around itself? This is useful for me to debug the text placement and to see the placement and how big the label actually is...
How do I create a link of this type:
<a href="#" onclick="document.getElementById('search').value=this.value">
using method link_to in Rails?
I couldn't figure it out from Rails docs...
My WAMP server localhost was broken when my Windows 7 updates automatically.
My port 80 is already used by IIS server.
I searched on website, many people suggested that I need to change the port 80..
I cannot figure out how to initialize a nested struct. Find an example here:
http://play.golang.org/p/NL6VXdHrjh
package main
type Configuration struct {
Val string
Proxy struct {
A..
Is there way to get current position of helper being dragged on over new position ?
$("#sortable").sortable({
start: function (event, ui) {
var currPos1 = ui.item.index();
..
I feel like I'm taking crazy pills here. Usually there's always a million library and samples floating around the web for any given task. I'm trying to implement authentication with a Google "Service ..
I am attempting to split a list into a series of smaller lists.
My Problem: My function to split lists doesn't split them into lists of the correct size. It should split them into lists of size 30 bu..
I want to open a page up in node and process the contents in my application. Something like this seems to work well:
var opts = {host: host, path:pathname, port: 80};
http.get(opts, function(res) {
..
I am trying to use JavaScript to get the value from an HTML text box but value is not coming after white space
For example:
<input type="text" name="txtJob" value="software engineer">
I onl..
I'm using python (Django Framework) to read a CSV file. I pull just 2 lines out of this CSV as you can see. What I have been trying to do is store in a variable the total number of rows the CSV also.
..
Is there a handy way to ignore all untracked files and folders in a git repository?
(I know about the .gitignore.)
So git status would provide a clean result again...
I'm wondering if there's an easier way to create circular divs than what I'm doing now.
Currently, I am just making an image for each different size, but it's annoying to do this.
Is there anyway us..
I have a view, I'm drawing with the Canvas object in the onDraw(Canvas canvas) method. My code is:
Paint paint = new Paint();
paint.setColor(Color.WHITE);
paint.setStyle(Style.FILL);
canvas.drawPaint..
I've got some multivariate data of beauty vs ages. The ages range from 20-40 at intervals of 2 (20, 22, 24....40), and for each record of data, they are given an age and a beauty rating from 1-5. When..
Consider:
>>> r"what"ever"
SyntaxError: invalid syntax
>>> r"what\"ever"
'what\\"ever'
So how do we get the quote, but not the slash?
And please don't suggest r'what"ever', becau..
I have a text file with Vertical Bar{|} separated values and I am using a Flat File source to read the values which fails with the above error.
I have a Flat File Connection Manager, where I set the ..
I've got a script where I am dynamically creating select boxes. When those boxes are created, we want to set the onchange event for the new box to point to a function called toggleSelect().
I can't s..
I am working on file operations using python.
I have a filepath as :
filepath = "E:/ABC/SEM 2/testfiles/all.txt"
when I am opening the file using python, it says me :
IOError: No such file:..
Suppose I have a dataframe with columns a, b and c, I want to sort the dataframe by column b in ascending order, and by column c in descending order, how do I do this?..
I have a strange error when starting mysqld service:
Another MySQL daemon already running with the same unix socket.
I've tried to list running services and stopping them but the same error happens..
I would like to compile and run C program in sublime text 3 on ubuntu 14.04. Currently the program is being compiled with gcc using sublime text 3 executing a command (see below code), but I was wonde..
Is there a way to maximize the chrome browser window using python selenium WebDriver?
Note: I am using Chrome Driver 23.0
Any solution on this would be greatly appreciated!..
Possible Duplicate:
A Transpose/Unzip Function in Python
I have a list of tuples, where I want to unzip this list into two independent lists. I'm looking for some standardized operation in ..
I am getting the following error trying to read from a socket. I'm doing a readInt() on that InputStream, and I am getting this error. Perusing the documentation this suggests that the client part of ..
What is the difference between cohesion and coupling?
How can coupling and cohesion lead to either good or poor software design?
What are some examples that outline the difference between the two, a..
Straight to the point, problem is saving the object Operator into MySQL DB.
Prior to save, I try to select from this table and it works, so is connection to db.
Here is my Operator object:
@Entity
p..
I was trying to add the PDT,
Indigo - http://download.eclipse.org/releases/indigo
Unable to read repository at http://download.eclipse.org/releases/indigo.
Unable to read repository at http://download..
Is there a simple way to get Excel to automatically execute a macro whenever a cell is changed?
The cell in question would be in Worksheet("BigBoard").Range("D2")
What I thought would be a simple Go..
I am having a real hard time finding a way to start, stop, and restart a thread in Java.
Specifically, I have a class Task (currently implements Runnable) in a file Task.java. My main application nee..
Given the following two tables:
Person table
id (pk)
first
middle
last
age
Address table
id(pk)
person_id (fk person.id)
street
city
state
zip
How do I create an SQL statement that retu..
I tried to follow this example: http://libkod.info/officexml-CHP-9-SECT-5.shtml - Archive.org - Donate
but it gave this error
on this line:
Dim objHTTP As New MSXML2.XMLHTTP
I tried to use this exam..
How do you create a command with optional arguments in LaTeX?
Something like:
\newcommand{\sec}[2][]{
\section*{#1
\ifsecondargument
and #2
\fi}
}
}
Then, I can ..
In a Unix or GNU scripting environment (e.g. a Linux distro, Cygwin, OSX), what is the best way to determine which Git branch is currently checked out in a working directory?
One use of this techniqu..
List<String> ids = new ArrayList<String>();
ids.add("1");
ids.add("2");
ids.add("3");
ids.add("4");
Now i want an output from this list as 1,2,3,4 without explicitly iterating over it...
I just created a simple application and hosted in IIS6.0. In code I'm just instantiating excel objects.
using excel = Microsoft.Office.Interop.Excel.Application;
namespace TestHosting
{
public p..
What does getActivity() mean? I saw in somewhere, they wrote MainActivity.this.startActionMode(mActionModeCallback) instead of getActivity(). could someone explain what this two lines mean?
someVie..
Please note: the question is based on the old, now called "scripted" pipeline format. When using "declarative pipelines", parallel blocks can be nested inside of stage blocks (see Parallel stages w..
I'm new to VBA and want to know if I can convert the following declaration and assignment into one line:
Dim clientToTest As String
clientToTest = clientsToTest(i)
or
Dim clientString As Variant
c..
In PowerShell I have tried:
alias | select-string Alias
This fails even though Alias is clearly in the output. I know this is because select-string is operating on some object and not the actual ou..
When I try to center a <ul> the text in the <li> centers but the bullet points stay on the far left of the page. Is there any way to get the bullet points to stay with the text when it is ..
When you have to loop through a collection and make a string of each data separated by a delimiter, you always end up with an extra delimiter at the end, e.g.
for (String serverId : serverIds) {
sb..
I want to set background for Navigation Bar to be black and all colors inside it to be white.
So, I used this code :
[[UINavigationBar appearance] setTitleTextAttributes:
[NSDictionary dictiona..
Does php have a function to automatically convert dates to their day value, where Monday=1, Tuesday=2, etc. Something like this
$daynum = func('wednesday'); //echos 3
..
First of all, where is the documentation for Ajax.* methods in asp.net mvc?
Can Ajax.ActionLink be used to call an action, get a partial view, open a modal window and put the content in it?..
Possible Duplicate:
How do you install an APK file in the Android emulator?
I download an APK file and I want to run it on an Android emulator but I don't know how. Please help me. Thanks..
Possible Duplicate:
How to format a JSON date?
I have the following result from a $getJSON call from JavaScript. How do I convert the start property to a proper date in JavaScript?
[
..
We use Backbone + ReactJS bundle to build a client-side app.
Heavily relying on notorious valueLink we propagate values directly to the model via own wrapper that supports ReactJS interface for two wa..
In Hadoop v1, I have assigned each 7 mapper and reducer slot with size of 1GB, my mappers & reducers runs fine. My machine has 8G memory, 8 processor.
Now with YARN, when run the same application..
I'm using MongoDB in a reporting system and have to delete a whole bunch of test documents. While I don't have too much trouble using the JSON-based command-line tools, it gets extremely tedious to h..
I have a string column description in a hive table which may contain tab characters '\t', these characters are however messing some views when connecting hive to an external application.
is there a si..
How do I remove leading and trailing whitespace from a string in Python?
For example:
" Hello " --> "Hello"
" Hello" --> "Hello"
"Hello " --> "Hello"
"Bob has a cat" --> "Bob has a cat..
I read that to suppress the newline after a print statement you can put a comma after the text. The example here looks like Python 2. How can it be done in Python 3?
For example:
for item in [1,2,3,..
I'm trying to write a script that opens many Excel files. I keep getting the prompt:
This workbook contains links to other data sources.
I want to keep this message from appearing, so that my scri..
I have a query that counts member's wedding dates in the database.
SELECT
SUM(NumberOfBrides) AS [Wedding Count]
, DATEPART( wk, WeddingDate) AS [Week Number]
, DATEPART( year, WeddingDate) AS ..
I'm working on a Java Selenium-WebDriver. I added
driver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS);
and
WebElement textbox = driver.findElement(By.id("textbox"));
because my App..
In this fiddle http://jsfiddle.net/mjmitche/6nar4/3/, if you drag, for example, the little blue box into the yellow box, then the big black box will turn pink. All of the 4 boxes along the left can be..
How would I go about grabbing the last 7 characters of the string below?
For example:
$dynamicstring = "2490slkj409slk5409els";
$newstring = some_function($dynamicstring);
echo "The new string is: "..
I have this .csv file:
ID,GRADES,GPA,Teacher,State
3,"C",2,"Teacher3","MA"
1,"A",4,"Teacher1","California"
And what I want to do is read in the file using the R statistical software and read in t..
I have to develop a application using MySQL and I have to save values like "1412792828893" which represent a timestamp but with a precision of a millisecond. That is, the amount of milliseconds since ..
Everyone seems to say named pipes are faster than sockets IPC. How much faster are they? I would prefer to use sockets because they can do two-way communication and are very flexible but will choose s..
I would like to use $resource to call my RESTful web service, (which I am still working on) but I would like to find out if I got my AngularJS script correct first.
The todo DTO has: {id, order, cont..
I'm using the current jQuery:
$(function() {
$('span .breadcrumb').each(function(){
$('#nav').addClass($(this).text());
$('#container').addClass($(this).text());
$('.stret..
I have an application that I have behind a reverse proxy, I would like for it to only listen to localhost/127.0.0.1.
I expected this to work:
app.listen(3001, 'localhost');
or
app.listen(3001, '12..
I try to save a txt file in my folder, in internal storage, but I face the same problem every time:
"Source Not Found"
I write my code in different ways expressed here as follows but in all ways..
I have a drop down on a web page which is breaking when the value string contains a quote.
The value is "asd, but in the DOM it always appears as an empty string.
I have tried every way I know to es..
I need to add the var in array
Public Sub Testprog()
Dim test As Variant
Dim iCounter As Integer
If test = Empty Then
iCounter = 0
test(iCounter) = "test"
Else
iCounter = UBound(test)
E..