I am getting
TypeError: unhashable type: 'slice'
when executing the below code for encoding categorical data in Python. Can anyone please help?
# Importing the libraries
import numpy as np
imp..
I am working with a query which contains "IF" statements within a "WHERE" clause. But PL\SQL Developer is giving some errors while executing it. Can anyone please help me with the correct query? Here ..
I was trying to find some more information on the following jQuery function:
jQuery.active
It is described to test the number of active connections to a server and will evaluate true when the numbe..
I have created a JAR file in this way jar cf jar-file input-files. Now, I'm trying to run it. Running it does not work (jre command is not found):
jre -cp app.jar MainClass
This does not work eithe..
In my db table, I have two datetime columns: Last and Current. These column allow me to keep track of when someone last used a valid login to the service I am building up.
Using CodeIgniter's active ..
Below is my code for creating a symlink of a directory:
sudo ln -s /usr/local/nginx/conf/ /etc/nginx
I already created the directory /etc/nginx. I just want the contents of the source directory (/..
I tried to upload my App to iTunes Connect resp. AppStore and got the following error:
Failed to locate or generate matching signing assets
Xcode attempted to locate or generate matching sign..
I'm using Windows 10 Home.
While troubleshooting some issue with WinRM, I figured out "Local Users and Groups" item is missing in my System Tools.
Computer Management >> System Tools >> "Local Users..
I've installed and have been using the Anaconda Python distribution, and I have started using the Anaconda (Conda) environment. I can use the standard conda install... command to put packages from the..
I want to push my commits to a Bitbucket repository but this error occurred:
Fatal: unable to access
'https://[email protected]/myUsername/myRepository.git/':
Unknown SSL protocol error in con..
Why is the GETDATE() an invalid identifier says Oracle Sql Developer tool when I debug this code:
CREATE OR REPLACE TRIGGER SPName
AFTER UPDATE
ON TableName
FOR EACH ROW
BEGIN
UPDATE TableName S..
I want to change the date format which is fetched from database.
now I got 2016-10-01{{$user->from_date}} .I want to change the format 'd-m-y' in laravel 5.3
{{ $user->from_date->format('d/..
Most SQL dialects accept both the following queries:
SELECT a.foo, b.foo
FROM a, b
WHERE a.x = b.x
SELECT a.foo, b.foo
FROM a
LEFT JOIN b ON a.x = b.x
Now obviously when you need an outer join, th..
I was reading related questions and I found this one, but my question is how can I switch from development to production mode. There are some differences between the modes which are pointed out here.
..
I am working on web application where I have taken href. But the default font of it is too small when comparing to the page. So I want to increase the size of the font.
My output page look like below..
I am confused on how to separate implementation and declarations code of a simple class into a new header and cpp file. For example, how would I separate the code for the following class?
class A2DD
..
I recently discovered Areas in ASP.NET MVC 4, which I have successfully implemented, but I'm running into troubles with the @Html.ActionLink helper in my Razor views. The URL this helper generates alw..
I have two python modules:
a.py
import b
def hello():
print "hello"
print "a.py"
print hello()
print b.hi()
b.py
import a
def hi():
print "hi"
When I run a.py, I get:
AttributeError: 'm..
I am using Jdbctemplate to retrieve a single String value from the db. Here is my method.
public String test() {
String cert=null;
String sql = "select ID_NMB_SRZ from codb_owner..
So I've given Android Studio a try, because I really like Resharper and noticed that the IDE had some of their functionality built into it. Having now created a default new project, I added a new layo..
I have seen this many a times that the prospect of a negative padding might help the development of CSS of certain page elements become better and easier. Yet, there is no provision for a negative pad..
I have to write huge data in text[csv] file. I used BufferedWriter to write the data and it took around 40 secs to write 174 mb of data. Is this the fastest speed java can offer?
bufferedWriter = new..
A long while back I transitioned to doing all my web application development in Eclipse from BBEdit. But I miss one little feature from BBEdit. I used to be able to show invisible characters like tabs..
I'm hacking on a Node program that uses smtp-protocol to capture SMTP emails and act on the mail data. The library provides the mail data as a stream, and I don't know how to get that into a string.
..
How do I pass a function as a parameter without the function executing in the "parent" function or using eval()? (Since I've read that it's insecure.)
I have this:
addContact(entityId, refreshContac..
My database contains three tables called Object_Table, Data_Table and Link_Table. The link table just contains two columns, the identity of an object record and an identity of a data record.
I want t..
I have a question regarding return statements used within if() while() or for() statements.
As you can see in the following method, it is expecting that I return a String value.
The problem is that if..
I've been busy for a long time finding out how to draw a line between two (GPS) points on the map in HelloMapView but with no luck.
Could anyone please tell me how to do so.
Suppose I use the HelloM..
I have a multiple select:
<select name='strings' id="strings" multiple style="width:100px;">
<option value="Test">Test</option>
<option value="Prof">Prof</option>..
I am populating a Drop Down Box using the following code.
<select id="select_catalog">
<?php
$array_all_catalogs = $db->get_all_catalogs();
foreach($array_all_catalogs as $array_catalog)..
I have below string -
var a = "1,2,3,4";
when I do -
var b = a.split(',');
I get b as ["1", "2", "3", "4"]
can I do something to get b as [1, 2, 3, 4] ?..
I'm working on a routine that compares strings, but for better efficiency I need to remove all characters that are not letters or numbers.
I'm using multiple REPLACE functions now, but maybe there is..
I'm trying to retrieve a server control in JavaScript. For testing purposes I am calling the JavaScript function from the page load event.
protected void Page_Load(object sender, EventArgs e){
Cl..
Update: A sample project reproducing this bug can be found here at Microsoft Connect. I have also tested and verified that the solution given in the accepted answer below works on that sample project...
Why are x and y strings instead of ints in the below code?
(Note: in Python 2.x use raw_input(). In Python 3.x use input(). raw_input() was renamed to input() in Python 3.x)
play = True
while play:..
Building a multi-language application in Java. Getting an error when inserting String value from R.string resource XML file:
public static final String TTT = (String) getText(R.string.TTT);
This i..
I have a javascript function that uses window.open to call another page and returning the result.
Here is the section of my code:
var windowFeatures = "status=0, toolbar=0, location=0, menubar=0, di..
currently I have the following code
<input type="number" />
it comes out to something like this
The little selector things on the right allow the number to go into negative. How do I preve..
I would like to catch every undefined function error thrown. Is there a global error handling facility in JavaScript? The use case is catching function calls from flash that are not defined...
I am working in opencv(2.4.11) python(2.7) and was playing around with gray images. I found an unusual behavior when loading image in gray scale mode and converting image from BGR to GRAY. Following i..
I've been trying to encrypt files and write those files back on to the same place. But I got the error message saying "java.io.FileNotFoundException: /storage/emulated/0/New file.txt: open failed: EAC..
After some android apps installed, I found that it will change to odex file (not apk) in smartphone.
How does it happens? Who can teach me, I am very interested about it...
I am receiving the following error when importing pandas in a Python program
monas-mbp:book mona$ sudo pip install python-dateutil
Requirement already satisfied (use --upgrade to upgrade): python-dat..
I have the following script which returns the next day:
function today(i)
{
var today = new Date();
var dd = today.getDate()+1;
var mm = today.getMonth()+1;
var yy..
I have a view that is laid out completely using auto layout programmatically. I have a UITextView in the middle of the view with items above and below it. Everything works fine, but I want to be able ..
When writing shell programs, we often use /bin/sh and /bin/bash. I usually use bash, but I don't know what's the difference between them.
What's main difference between bash and sh?
What do we need..
I have a project in C# and I get this error every time I try to compile the project:
(Unable to copy file "obj\Debug\Project1.exe" to "bin\Debug\Project1.exe". The process cannot access the file '..
I need to create a zip file using this command:
zip /dir/to/file/newZip /data/to/zip/data.txt
This works, but the created zip file creates a directory structure mimicking the directory to the raw f..
I have a FragmentActivity and I want to use a map fragment within it. I'm having a problem getting the support fragment manager to access it.
if (googleMap == null) {
googleMap = ((Supp..
Need to call a filter function on some options based on a radio selected (Link here), How can I call this after the page is loaded? the radio is set from a DB call and I would like to filter the optio..
We have a unit test with variable that contains a very long string.
Question is how to write this in code, without having problems with line breaks or that the code is difficult to read.
In VB there..
I'm running a Sinatra app behind passenger/nginx. I'm trying to get it to respond to both http and https calls. The problem is, when both are defined in the server block https calls are responded to n..
I'm developing a web API with Laravel 5.0 but I'm not sure about a specific query I'm trying to build.
My classes are as follows:
class Event extends Model {
protected $table = 'events';
pu..
How do I write a bash script that goes through each directory inside a parent_directory and executes a command in each directory.
The directory structure is as follows:
parent_directory (name could b..
I'm using SQL Server and ASP.NET. I have the following function:
Using js = daoFactory.CreateJoinScope()
Using tran = New Transactions.TransactionScope()
'...
tran.Complete()
..
I'm having troubles with installing packages in Python 3.
I have always installed packages with setup.py install. But now, when I try to install the ansicolors package I get:
importerror "No Modu..
I know that you can make a virtual network interface in Windows (see here), and in Linux it is also pretty easy with ip-aliases, but does something similar exist for Mac OS X? I've been looking for lo..
I have a navigation bar with a title.
When I double click the text to rename it, it actually says it's a navigation item, so it might be that.
I'm trying to change the text using code, like:
declare..
I have this code snippet:
DateFormat formatter1;
formatter1 = new SimpleDateFormat("mm/DD/yyyy");
System.out.println((Date)formatter1.parse("08/16/2011"));
When I run this, I get this as the output..
After the changes made in jQuery 1.6.1, I have been trying to define the difference between properties and attributes in HTML.
Looking at the list on the jQuery 1.6.1 release notes (near the bottom),..
I have a URL which i pass parameters into
example/success.php?id=link1
I use php to grab it
$slide = ($_GET["id"]);
then an if statement to display content based on parameter
<?php if($s..
This is concerning Windows XP processes.
I have a process running, let's call it Process1. Process1 creates a new process, Process2, and saves its id.
Now, at some point Process1 wants Process2 to d..
Say I have a variable named choice it is equal to 2. How would I access the name of the variable? Something equivalent to
In [53]: namestr(choice)
Out[53]: 'choice'
for use in making a dictionary. ..
Got a complex SELECT query, from which I would like to insert all rows into a table variable, but T-SQL doesn't allow it.
Along the same lines, you cannot use a table variable with SELECT INTO or ..
How does someone fix a HDFS that's corrupt? I looked on the Apache/Hadoop website and it said its fsck command, which doesn't fix it. Hopefully someone who has run into this problem before can tell m..
In Haskell, if I wanted to get a 10 element list which only contained the number 5, I could do something like this:
take 10 $ repeat 5
Output:
[5,5,5,5,5,5,5,5,5,5]
Is there anything like this i..
I have a situation very much like the one at ImportError: DLL load failed: %1 is not a valid Win32 application, but the answer there isn't working for me.
My Python code says:
import cv2
But that ..
I follow a development process where I create a new local branch for every new feature or story card. When finished I merge the branch into master and then push.
What tends to happen over time due t..
I git push my work to a remote Git repository.
Every push will prompt me to input username and password. I would like to avoid it for every push, but how to configure to avoid it?..
How can I convert a List<MyObject> to an IEnumerable<MyObject> and then back again?
I want to do this in order to run a series of LINQ statements on the List, e. g. Sort()..
I am getting the error in the below sql:
ORA-01858: a non-numeric character was found where a numeric was expected
SELECT c.contract_num,
CASE
WHEN ( MAX (TO_CHAR (TO_D..
How do I do time/hour arithmetic in a Google spreadsheet?
I have a value that is time (e.g., 36:00:00) and I want to divide it by another time (e.g., 3:00:00) and get 12. If I divide just one by the..
How to explain callbacks in plain English? How are they different from calling one function from another function taking some context from the calling function? How can their power be explained to a n..
I have a question about some of the internal workings for the Oracle DATE and INTERVAL datatypes. According to the Oracle 11.2 SQL Reference, when you subtract 2 DATE datatypes, the result will be a N..
Exact duplicate of many posts:
What is unit testing?
What Makes a Good Unit Test?
New to Unit Testing
Unit Testing - definitions
Learning Unit Testing
How to properly mock and unit test
Unit Te..
I have a config file that I need to load as part of the execution of a dll I am writing.
The problem I am having is that the place I put the dll and config file is not the "current location" when the..
I can't figure out to get this working.
Scenario:
I have an application built with gradle
The application uses JavaFX
What I want
Use a variable (defined per developer machine) which points to ..
Consider the following situation:
In [2]: a = pd.Series([1,2,3,4,'.'])
In [3]: a
Out[3]:
0 1
1 2
2 3
3 4
4 .
dtype: object
In [8]: a.astype('float64', raise_on_error = False)
Out[8]..
A strange error when trying to start Activity. i think the error in my Animation Drawable LogCat: 12-31 06:37:45.138: E/AndroidRuntime(922): FATAL EXCEPTION: main 12-31 06:37:45.138: E/Andr..
The following query:
SELECT * FROM `objects`
WHERE (date_field BETWEEN '2010-09-29 10:15:55' AND '2010-01-30 14:15:55')
returns nothing.
I should have more than enough data to for the query to wo..
I have a variable in my code say it is "status".
I want to display some text in the application depending on this variable value. This has to be done with a specific time delay.
It's like,
Check ..
I have completed an application I have made in Visual Studio 14.0, but when I tried to publish the program, I get an error as Visual Studio cannot find 'SignTool.exe'. I have searched my Hard drive a..
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..
I need help on regex or preg_match because I am not that experienced yet with regards to those so here is my problem.
I need to get the value "get me" but I think my function has an error.
The number..
I tried to create this code to input an m by n matrix. I intended to input [[1,2,3],[4,5,6]] but the code yields [[4,5,6],[4,5,6]. Same things happen when I input other m by n matrix, the code yields ..
I have a number of generated html tables that I need to output as an Excel file. The site is codded in classic ASP. Is this possible? Could it be done by somehow using the Open Office libraries?
ED..
I need to upload an image to NodeJS server to some directory. I am using connect-busboy node module for that.
I had the dataURL of the image that I converted to blob using the following code:
dataUR..
Need some SQL syntax help :-)
Both databases are on the same server
db1 = DHE
db2 = DHE_Import
UPDATE DHE.dbo.tblAccounts
INNER JOIN DHE_Import.dbo.tblSalesRepsAccountsLink
ON DHE.dbo.tblAcco..
Making a powerpoint that's supposed to show a before and after of a website. Since it's currently a long website I'd rather make a single long slide to put it on (20" instead of 7.5"). But all the o..
I have just created an app and have started hooking up @IBOutlet's to the storyboard. I am connecting some of them to labels in a UITableViewCell Prototype Cell with a Basic Style. When I connect it t..
I'm trying to execute a asp.net webservice using jquery. When I pass only one input parameter it works fine:
$.ajax({
type: "POST",
url: url,
data: "{'Id1':'2'}",
contentType..
I am retrieving two date time values from the database. Once the value is retrieved, I need the difference between the two values.
For that, I create a timespan variable to store the difference of the..
I am trying to insert a user icon inside username input field.
I've tried one of the solution from the similar question
knowing that background-image property won't work since Font Awesome is a fon..
Hi I don't want an image for my submit button so I have gone with the default submit button but I want to edit its width and height. How do I do that?
<input type="submit" id="search" value="Searc..
How do I open a web page automatically in full screen mode?
I am looking for a solution to open an web page automatically in full screen mode, without expecting user to users press F11 or any other b..
I'm trying to migrate an existing VM from VMWARE to VirtualBox. I've made a copy of the Virtual Machine folder for the VM (so I can experiment and not destroy the original) and have successfully creat..
I have been reading a LOT of google posts and StackOverflow questions about how to restore a database in SQL Server from a .bak file.
But none of them states how to just READ the tables in the databa..
Can anyone recommend something for making a ssh connection in python?
I need it to be compatible with any OS.
I've already tried pyssh only to get an error with SIGCHLD, which I've read is because W..
I know it could be done using malloc, but I do not know how to use it yet.
For example, I wanted the user to input several numbers using an infinite loop with a sentinel to put a stop into it (i.e. -1..
What is the difference betweeen the following:
SelectedItem
SelectedValue
SelectedValuePath
All these dependency properties are defined in Selector class. I often confuse SelectedItem with Selecte..
I was curious to know how I can round a number to the nearest whole number. For instance, if I had:
int a = 59 / 4;
which would be 14.75 if calculated in floating point; how can I store the result ..
I'm trying to find Java's equivalent to Groovy's:
String content = "http://www.google.com".toURL().getText();
I want to read content from a URL into string. I don't want to pollute my code with bu..
I'm getting following error when trying to compile my project in Android Studio:
Gradle: error: diamond operator is not supported in -source 1.6
I have 1.7 set as target in all project preferences ..
I'm trying to get the selected value from a drop down list via jQuery. I have a bit of javascript that validates a form when I click SEND, to make sure there are no blanks, code is as follows:
functi..
I'm processing a string which is tab delimited. I'm accomplishing this using the split function, and it works in most situations. The problem occurs when a field is missing, so instead of getting nul..
Many times I'm using the string match function to know if a string matches a regular expression.
if(str.match(/{regex}/))
Is there any difference between this:
if (/{regex}/.test(str))
They se..
I'm currently developing a physics app that is supposed to show a list of formulas and even solve some of them (the only problem is the ListView)
This is my main layout
<LinearLayout xmlns:an..
Can't seem to figure this out.
I'm attempting JSON tree manipulation in GSON, but I have a case where I do not know or have a POJO to convert a string into, prior to converting to JsonObject. Is there..
I want to create a stored procedure with one argument which will return different sets of records depending on the argument. What is the way to do this? Can I call it from plain SQL?..
I am trying to import a certificate and a key file into the keystore but I'm unable to do that.
How can I create a keystore by importing both an existing certificate (abc.crt) and abc.key files?..
I have created my problem on JSFiddle at https://jsfiddle.net/kgw0x2ng/5/. The code is as follows
HTML CODE
<div class="loading">Loading…</div>
<button type="submit" onCli..
What are the naming conventions for files and folders in a large Node.js project?
Should I capitalize, camelCase, or under-score?
Ie. is this considered valid?
project-name
app
controll..
I want to do:
$("img").bind('load', function() {
// do stuff
});
But the load event doesn't fire when the image is loaded from cache. The jQuery docs suggest a plugin to fix this, but it doesn't ..
after some days of trying and waitin' for answers on the springsource forums I'll try it here.
Running my application results in these exception:
org.springframework.beans.factory.NoSuchBeanDefinitio..
Every time I run a script using bash scriptname.sh from the command line in Debian, I get Command Not found and then the result of the script.
The script works but there is always a Command Not Found..
Currently the left bar button default value is the title of the view that loaded the current one, in other words the view to be shown when the button is pressed (back button).
I want to change the te..
I have tried several ways to use UIAlertController,instead of UIAlertView. I tried several ways but I cannot make the alert action work.
Here is my code that works fine in IOS 8 and IOS 9 but is showi..
What is the best way to copy a directory (with sub-dirs and files) from one remote Linux server to another remote Linux server? I have connected to both using SSH client (like Putty). I have root acce..
My client just sent me the base project for development purposes. I think he just zipped the project folder and sent to me.
Now when I go to NetBeans, "New project with existing sources":
First I see..
Possible Duplicate:
Go Back to Previous Page
get back to previous page
How to get the previous page in javascript coding. Go to the previous page when click that back button...
I'd like to use a single image as both a regular favicon and iPhone/iPad friendly favicon.
Is this possible? Would an iPad-friendly 72x72 PNG scale if linked to as a regular browser favicon? Or do I..
I want to read numbers(integer type) separated by spaces using scanf() function.
I have read the following:
C, reading multiple numbers from single input line (scanf?)
how to read scanf with spaces
..
All of a sudden, I am getting this error when upgrading Nuget packages. None of the fixes that I have come across work. I am using Visual Studio 2013.
'Newtonsoft.Json 6.0.3' already installed.
..
I've already read this thread but when I implement it into my code it only works for a few iterations.
I'm using python to iterate through a directory (lets call it move directory) to copy mainly pd..
I'm trying to install LESS on my machine and have installed node already. However, when I enter "node install -g less" I get the following error and am not sure what to do?
FPaulMAC:bin paul$ npm ins..
I have a list (see below) contained in a window. The window's DataContext has two properties, Items and AllowItemCommand.
How do I get the binding for the Hyperlink's Command property needs to resolv..
I have an existing database. I was hoping there was a way to generate class files from this database. However, I seem to see a lot of generating the database from the class files.
Is there a way to g..
I have found many instances of a similar question on SO but no answer unfortunately meets my requirements.
I have different layouts for portrait and landscape and I am using back stack, which both pr..
After rendering the entire page based on several user contexts and having made several $http requests, I want the user to be able to switch contexts and re-render everything again (resending all $http..
POCO = Plain Old CLR (or better: Class) Object
DTO = Data Transfer Object
In this post there is a difference, but frankly most of the blogs I read describe POCO in the way DTO is defined: DTOs are s..
I have been working for a while to create an iPhone app. Today when my battery was low, I was working and constantly saving my source files then the power went out...
Now when I plugged my computer b..
I have been trying to display pdf file which I am getting as a blob from a $http.post response. The pdf must be displayed within the app using <embed src> for example.
I came across a couple of..
I am using the bootstrap Dropdown component in my application like this:
<div class="btn-group">
<button class="btn">Please Select From List</button>
<button class="btn d..
I am trying to resize an image (smaller to fit screen) in my react native app but am unable to do it as it is too big.
Here is the code:
'use strict';
var React = require('react-native');
var {
S..
I have a code example like this :
location.href = location.href + "/Edit?pID=" + hTable.getObj().ID; ; //aspx
parID = Request.QueryString["pID"]; //c#
it works, my question is - how ? what i..
While debugging my C# application I have noticed a large amount occurrences of the following sentence:
The thread -- has exited with code 0 (0x0).
The application continues to work and no except..
I have this table:
Movies (ID, Genre)
A movie can have multiple genres, so an ID is not specific to a genre, it is a many to many relationship. I want a query to find the total number of movies whi..
I saw in a tutorial about regression modeling the following command:
myFormula <- Species ~ Sepal.Length + Sepal.Width + Petal.Length + Petal.Width
What exactly does this command do, and what is t..
The XMLHttpRequest Level 2 standard (still a working draft) defines the FormData interface. This interface enables appending File objects to XHR-requests (Ajax-requests).
Btw, this is a new feature -..
I'm developing a website using PHP and I want to make a human verification in one of the sessions. For the development, I'm initially running the system locally and when it is ready, I'm gonna make pu..
This is what i am trying to do.
1.Create excel file(.xlsx) c://test/files/work1_4.13.14.xlsx with name + value(date)
example: work1_4.13.14.xlsx
2.Set headers to the file example: [Name] [Age] [Ci..
For my app I am using a RecyclerView inside a ScrollView where the RecyclerView has a height based on its content using this library. Scrolling is working but it's not working smoothly when I scroll o..
I want to have a small QFormLayout that grows to fill its parent widget.
I created a new .ui file using the QWidget template in Qt Designer. I put a QFormLayout inside that 'window', then put some co..
I have tried to write the console output to a txt file using this code suggestion (http://www.daniweb.com/forums/thread23883.html#) however I was not successful. What's wrong?
try {
//create a ..
I have an element with style
position: relative;
transition: all 2s ease 0s;
Then I want to change its position smoothly after clicking on it, but when I add the style change the transition doesn't t..
I want an HTML form to submit to itself. How do I use the action attribute?
<form action="">
<form action="#">
<form action="some/address">
<form>
Which was is preferable?..
Is it possible or is there a workaround to use Razor syntax within JavaScript that is in a view (cshtml)?
I am trying to add markers to a Google map... For example, I tried this, but I'm getting a to..
In SQL Server 2005, is there a concept of a one-time-use, or local function declared inside of a SQL script or Stored Procedure? I'd like to abstract away some complexity in a script I'm writing, but ..
I am trying to parse JSON strings in Java and find the key-value pairs so that I can determine the approximate structure of the JSON object since object structure of JSON string is unknown.
For examp..
Alright, I've dabbled in JavaScript before, but the most useful thing I've written is a CSS style-switcher. So I'm somewhat new to this. Let's say I have HTML code like this:
<div id="foo"..
I am rendering a cone, and I would like to rotate it, 90 degrees anti-clockwise, so that the pointy end faces west! I am using OpenGL 3+.
Here is my code in my Cone.cpp so far:
//PROJECTION
glm:..
I'd like to remove all numbers from a string [0-9]. I wrote this code that is working:
$words = preg_replace('/0/', '', $words ); // remove numbers
$words = preg_replace('/1/', '', $words ); // remov..
I am using GridView control in asp.net 2005 c# using .
How can I delete a particular row from GridView.
I have written the following code. But it's not working...
DataRow dr = dtPrf_Mstr.NewRow();
..
My computer is in a Domain (Active Directory) and I need to get the domain name dynamically. I found the following code on the internet:
SelectQuery query = new SelectQuery("Win32_ComputerSystem");
u..
Is it possible to have the shadow surround the entire DIV?
-moz-box-shadow: 3px 3px 3px #ccc;
-webkit-box-shadow: 3px 3px 3px #ccc;
box-shadow: 3px 3px 3px #ccc;
I know the order of attributes goes..
The Eloquent ORM is quite nice, though I'm wondering if there is an easy way to setup MySQL transactions using innoDB in the same fashion as PDO, or if I would have to extend the ORM to make this poss..
I have a project hosted on GitHub. I created a branch on one computer, then pushed my changes to GitHub with:
git push origin branch-name
Now I am on a different computer, and I want to download t..
I'm writing my first Android application and trying to get my head around communication between services and activities. I have a Service that will run in the background and do some gps and time based..
When installing Visual Studio 2015 Community Edition on Windows 10, using the web installer, everything runs fine, however, the following packages fail to install:
Team Explorer for Visual Studio 20..
An AngularJS application works fine on desktop, but is not rendering properly on mobile (actual code is showing). This is on an Android phone.
I would like to see what errors are showing in the conso..
Fancybox breaks with the new jQuery v1.9.0.
It affects both, Fancybox v1.3.4 and below - and - v2.1.3 and below.
The errors shown are :
v1.3.4 :
Timestamp: 15/01/2013 10:03:28 AM
Error: TypeError:..
I have a query ajax response which I then use to set the array variables.
Is there anyway to use a 'For Loop' to change to #name so that I don't have to write out a line of code to set each array elem..
Am using the curl command in PowerShell to post the comment in bit-bucket pull request page through a Jenkins job. I used the below PowerShell command to execute the curl command, but am getting the e..
How can I extract a substring using PowerShell?
I have this string ...
"-----start-------Hello World------end-------"
I have to extract ...
Hello World
What is the best way to do that?..
I have a date in the following format: 2010-03-01T00:00:00-08:00
I have thrown the following SimpleDateFormats at it to parse it:
private static final SimpleDateFormat[] FORMATS = {
new Simp..
I seem to be having issues pushing data into a state array.
I am trying to achieve it this way:
this.setState({ myArray: this.state.myArray.push('new value') })
But I believe this is incorrect way ..
What are some good patterns for error handling in VBA?
In particular, what should I do in this situation:
... some code ...
... some code where an error might occur ...
... some code ...
... some ot..
I have a class, NetworkClient as a base class :
using System.IO;
using System.Net.Sockets;
using System.Threading.Tasks;
namespace Network
{
using System;
using System.Collections.Generic;
using Sys..
I want to change the Git default remote branch destination so I could just
git push
Instead of:
git push upstream
Currently this is set to the origin remote and I want to set it to a different r..
I have a jQuery ajax function and would like to submit an entire form as post data. We are constantly updating the form so it becomes tedious to constantly update the form inputs that should be sent i..