The WiX Toolset (formerly known as Windows Installer XML) is a toolset that builds Windows installation packages and WiX bootstrappers from XML source code. The toolset supports a command line environment that developers may integrate into their build processes to build MSI and MSM setup packages and EXE bootstrappers. For cloud-based web development platform use [wix.com] tag.
I would like to modify an MSI installer (created through WiX) to delete an entire directory on uninstall.
I understand the RemoveFile and RemoveFolder options in WiX, but these are not robust enough ..
When installing Windows services there are two options for automatically starting a Windows service on Windows startup. One is Automatic, and the other is Automatic (Delayed start). What is the differ..
I want to extract the MSI of an EXE setup to publish over a network.
For example, using Universal Extractor, but it doesn't work for Java Runtime Environment...
We've been using WiX for a while now, and despite the usual gripes about ease of use, it's going reasonably well. What I'm looking for is useful advice regarding:
Setting up a WiX project (layout, r..
I have an application installed on my machine. I also have its source code but somehow the ProductCode and UpgradeCode of this application were changed.
Now I want to get the UpgradeCode and ProductC..
I'm trying to parse some XML inside a WiX installer. The XML would be an object of all my errors returned from a web server. I'm getting the error in the question title with this code:
XmlDocument ..
I have a MSI package that I need to install if the package is not already installed. Also I need to install it silently. The package prompts user for:
Installation location (C:\Program Files\Foobar)..
At work we use WiX for building installation packages. We want that installation of product X would result in uninstall of the previous version of that product on that machine.
I've read on several p..
I'm trying to automate the uninstallation of packages created using WiX for the purposes of changing the installed software stack & configuration without reprovisioning a whole OS. Eventually I'll..
I need to find the product GUID for an installed MSI file in order to perform maintenance such as patching, uninstall (how-to uninstall) and also for auditing purposes...
I'm having trouble dealing with facebook's ReactJS. Whenever I do ajax and want to display an html data, ReactJS displays it as text. (See figure below)
The data is displayed through the success ca..
Is there a programmatic way to detect whether or not you are on a big-endian or little-endian architecture? I need to be able to write code that will execute on an Intel or PPC system and use exactly..
So I've been trying to get dynamic libraries to work in my XCode project under Mac OS X. So far no joy.
I am able to load the dylib file, but when I call dlsym to get the function pointer, it returns..
For example:
var output=sh "echo foo";
echo "output=$output";
I will get:
output=0
So, apparently I get the exit code rather than the stdout. Is it possible to capture the stdout into a pipeline..
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...
What is the difference between projection and selection? Is it:
Projection --> for selecting the columns of table; and
Selection ---> to select the rows of table?
So are projection and selection v..
I want to find out the following:
given a date (datetime object), what is the corresponding day of the week?
For instance, Sunday is the first day, Monday: second day.. and so on
And then if the inp..
Like many others, my website is using jQuery. When I open the developer tools, I see a warning that says that XMLHTTPRequest is
deprecated because of its detrimental effects to the end user's exp..
I'm looking for an explanation of how a hash table works - in plain English for a simpleton like me!
For example, I know it takes the key, calculates the hash (I am looking for an explanation how) a..
This is a snippet from my pom.xml.
I tried the following, but the profile was not activated.
mvn clean install -Pdev1
mvn clean install -P dev1
When I tried mvn help:active-profiles no profiles wer..
I am trying to write a query that will check if a specific table in MySQL has a specific column, and if not — create it. Otherwise do nothing. This is really an easy procedure in any enterprise-cla..
I have a very complex CTE and I would like to insert the result into a physical table.
Is the following valid?
INSERT INTO dbo.prf_BatchItemAdditionalAPartyNos
(
BatchID,
AccountNo,
AP..
I am looking for WhatsApp API, preferably a Python or Java library.
I've tried Yowsup, but could not get my number registered; I am based in India and I am not sure if that has got anything to do wit..
I am programming a server and it seems like my number of connections is being limited since my bandwidth isn't being saturated even when I've set the number of connections to "unlimited".
How can I i..
I installed java 64bit 1.7 and exe4j 64bit version. I tried to generate an exe from exe4j, but while running the program I'm having this error.
This is how I set up path variable. And this is right j..
I keep hearing about LLVM all the time. It's in Perl, then it's in Haskell, then someone uses it in some other language? What is it?
What exactly distinguishes it from GCC (perspectives = safety etc...
I found a lot of Regex email validation in SO but I did not find any that will accept an empty string. Is this possible through Regex only? Accepting either empty string or email only? I want to hav..
I wrote a program which involves use of switch statements... However on compilation it shows:
Error: Jump to case label.
Why does it do that?
#include <iostream>
#include <cstdlib>
..
I have a Web Api application. It works perfectly well when I tested it using the VS 2010 debugging dev server. But I now deployed it to IIS 7.5 and I am getting a HTTP 404 error when trying to access ..
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..
What would be a proper way to check/uncheck checkbox that's placed inside the element that triggers my function?
Here's my code:
<table id="news_list">
<tr>
<td><input type=..
Trying to check input against a regular expression.
The field should only allow alphanumeric characters, dashes and underscores and should NOT allow spaces.
However, the code below allows spaces.
W..
Why is the output of the following two list comprehensions different, even though f and the lambda function are the same?
f = lambda x: x*x
[f(x) for x in range(10)]
and
[lambda x: x*x for x in ra..
For my WCF, I need to generate configuration file for my client application to specify things such as binding of service, the address of the service and the contract...
I have a stored function where I use temporary tables. For performance reasons, I need an index in that table. Unfortunately, I cannot use ALTER TABLE because this causes an implicit commit.
Therefor..
Created a stored procedure in SQL 9 (2005) and have since upgraded to SQL 10 (2008). Since then, the following stored procedure has stopped working and thrown up the above error:
ALTER PROCEDURE [dbo..
There are two ways of configuring and using log4net. First one is when I can configure my own appender and associated logger:
<!-- language: xml -->
<appender name="myLogAppender" type="log..
I am trying to import all the images inside a directory (the directory location is known).
path = /home/user/mydirectory
I already know a way of finding out the length of the directory.
What I'm not ..
I'm getting the following error when running a query on a PostgreSQL db in standby mode. The query that causes the error works fine for 1 month but when you query for more than 1 month an error result..
I'm using PHP 5.3.0 and have encountered something that might be a bug (in which case I'll report it) or might be me - so I'm asking to make sure.
When running this code:
<?php
ini_set('upload_ma..
I'm trying to connect to a database made by MS Access using Java, but I cannot seem to manage. I am using ODBC and I'm getting this exception:
java.sql.SQLException: [Microsoft][ODBC Driver Manager] ..
I am not sure how you are supposed to read in from system input from a Java file.
I want to be able to call java myProg < file
Where file is what I want to be read in as a string and given to myP..
I want to have a way to report the stack trace to the user if an exception is thrown. What is the best way to do this? Does it take huge amounts of extra code?
To answer questions:
I'd like it to be..
How can a JavaScript function in JSP be called during page load without using
<body onload="disableView()">
I have to call this function in a few JSP's on page load but JSP's are divided into..
This will appear to be the age old question (which it is :)) that which server is better between Tomcat and JBoss, but I have not found a good enough answer yet to solve my problem.
I know that Tomca..
I installed pod some time ago. However, it's stopped working so I'm working through this again.
However, I almost immediately run into a problem here:
pod install
-bash: pod: command not found
Any..
I'm trying to run the sample "Hello World" from the LWJGL website
From this link: LWJGL "Getting Started"
I'm trying to do this via the command line, just so I understand the "behind the scenes" a b..
I've encounter an strange issue after installing RestKit with cocoapods.
after resolving RestKit dependency for my project with cocoapods and trying to build it, I face this error:
The sandbox is..
I'm attempting to install the PHP Zip extension.
My server does not have external internet access, so I downloaded it myself from PECL: http://pecl.php.net/package/zip. I chose 1.10.2, the latest ..
I have created a simple unit test but IntelliJ is incorrectly highlighting it red. marking it as an error
No beans?
As you can see below it passes the test? So it must be Autowired?
..
I'm considering either a ListBox or a ListView for a WPF application. It seems either supports data binding and item templates. My application has a simple list of items that I intend to be able to ..
Is there a way to detect if a key is currently down in JavaScript?
I know about the "keydown" event, but that's not what I need. Some time AFTER the key is pressed, I want to be able to detect if it ..
I get this error when setting up a server in Django. It is sqlite3 which means it should create the .db file but it doesn't seem to be doing so. I've stipulated SQLite as the backend and an absolute f..
What exactly is the difference between the HintPath in a .csproj file and the ReferencePath in a .csproj.user file? We're trying to commit to a convention where dependency DLLs are in a "releases" svn..
I am trying to add an unique index that gets created from the foreign keys of four associated tables:
add_index :studies,
["user_id", "university_id", "subject_name_id", "subject_type_id"],
:uniq..
I don't know how the data should be formatted for AddAddress PHPMailer function; I need the email to be sent to multiple recipients so I tried
$to = "[email protected],[email protected],[email protected]";
$ob..
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..
I can see that Docker takes 12GB of my filesystem:
2.7G /var/lib/docker/vfs/dir
2.7G /var/lib/docker/vfs
2.8G /var/lib/docker/devicemapper/mnt
6.3G /var/lib/docker/devicemapper/devicemapp..
I am not able to find the equivalent header file for conio.h in Linux.
Is there any option for getch() & getche() function in Linux?
I want to make a switch case base menu where the user will gi..
Is there any way I can do
git add -A
git commit -m "commit message"
in one command?
I seem to be doing those two commands a lot, and if Git had an option like git commit -Am "commit message", it ..
I have been pulling my hair for this since quite long time. I have researched for an hour on how to clear a console in Java.
All I found was dirty hacking either by printing a bunch of lines or execu..
I want to write a function that takes an array of letters as an argument and a number of those letters to select.
Say you provide an array of 8 letters and want to select 3 letters from that. Then y..
I was refactoring old code and encountered several IF conditions that were way too complex and long and I'm certain they can be simplified. My guess is that those conditions grew so much because of la..
Yesterday I recognized a ton of warnings regarding the parse.com library:
URGENT: all bitcode will be dropped because '[path]/Parse.framework/Parse(PFAnalytics.o)' was built without bitcode. You ..
I am doing a real estate feed for a portal and it is telling me the max length of a string should be 20,000 bytes (20kb), but I have never run across this before.
How can I measure byte size of a var..
I'm building a node scraper that uses cheerio to parse the DOM. This is more or a vanilla javascript question though. At one part of my scrape, I'm loading some content into a variable, then checking ..
I can pass values form one page to another but I need to pass value like this,
Page 1:
Page4.php
Page3.php
I need to pass the value in a text field in the Page1.php to a text field in Page2.php..
Is there a built-in function in Python that would replace (or remove, whatever) the extension of a filename (if it has one)?
Example:
print replace_extension('/home/user/somefile.txt', '.jpg')
In my ..
Every time I run a program with rand() it gives me the same results.
Example:
#include <iostream>
#include <cstdlib>
using namespace std;
int random (int low, int high) {
if (low &..
I have a scheduled task on a Windows 2008 R2 server. The task includes a Start In directory entry. The task runs, and the batch file it runs does what it is supposed to do. When I run the batch fil..
var a = [1, 2, 3];
var b = [3, 2, 1];
var c = new Array(1, 2, 3);
alert(a == b + "|" + b == c);
demo
How can I check these array for equality and get a method which returns true if they are equal?..
In vim, I often find myself deleting (or copying) large blocks of text. One can count the lines of text and say (for example) 50dd to delete 50 lines.
But how would one delete this large block of te..
I want to track mutual locks in postgres constantly.
I came across Locks Monitoring article and tried to run the following query:
SELECT bl.pid AS blocked_pid,
a.usename AS blocked_user,
..
in the System.Linq namespace, we can now extend our IEnumerable's to have the Any() and Count() extension methods.
I was told recently that if i want to check that a collection contains 1 or more ite..
after 2 hours of searching I decided to ask my question.
I have a div:
<div id="box"></div>
I want to add a div inside the above div using jquery.
I tried (following code is inside a ..
In Django doc,
select_related() "follows" foreign-key relationships, selecting additional related-object data when it executes its query.
prefetch_related() does a separate lookup for each ..
I am working on a webapplication comprises UI-Angular , Server-Java , RestEasy 3.0.9.Final for rest api calls
When i tried to access the rest service from another domain am getting below error
CANNO..
I'm trying to understand some weird behaviour with this cmdlet.
If I use "Out-File -append Filename.txt" on a text file that I created and entered text into via the windows context menu, the string w..
How can I construct the following string in an Excel formula:
Maurice "The Rocket" Richard
If I'm using single quotes, it's trivial = "Maurice 'The Rocket' Richard" but what about double quotes?..
Even though JRE 8 is installed on my MAC OS Yosemite 10.10.3,while running the Android present in tools in sdk - the error - " No Java Runtime present,requesting to install " gets displayed in term..
We're using SCCM 2012 and I'm packaging all of our application and testing them as I go. Some only have .exe's and are more difficult than the .msi's. Some have no documentation and I'm trying diffe..
I'm creating an application that uses a main project that is connected to several different DLLs. From one DLL window I need to be able to open a window in another but the DLL's can't reference each o..
I'm facing a weird problem.
If a webpage includes jquery graphs or libraries the page loads with a full black screen. I can see the source code and the mouse pointer finds the buttons or links. I uni..
I've been searching and I know the theoretic difference.
public - Any class/function may access the method/property.
protected - Only this class and any subclasses may access the method/property.
pr..
In plain javascript is very simple: need just to attach the callback to {XMLHTTPRequest}.onprogress
var xhr = new XMLHttpRequest();
xhr.onprogress = function(e){
if (e.lengthComputable)
..
Currently I'm doing this:
foo.js
const FOO = 5;
module.exports = {
FOO: FOO
};
And using it in bar.js:
var foo = require('foo');
foo.FOO; // 5
Is there a better way to do this? It feels aw..
What is the difference between:
@Entity
public class Company {
@OneToMany(cascade = CascadeType.ALL , fetch = FetchType.LAZY)
@JoinColumn(name = "companyIdRef", referencedColumnName = "compa..
I've got a PHP script that needs to invoke a shell script but doesn't care at all about the output. The shell script makes a number of SOAP calls and is slow to complete, so I don't want to slow down ..
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've got a Pandas DataFrame and I want to combine the 'lat' and 'long' columns to form a tuple.
<class 'pandas.core.frame.DataFrame'>
Int64Index: 205482 entries, 0 to 209018
Data columns:
Month..
How go get an input text value in JavaScript?
<script language="javascript" type="text/javascript">
lol = document.getElementById('lolz').value;
function kk(){
alert(lol);
}
<..
I am not sure why we need finally in try...except...finally statements. In my opinion, this code block
try:
run_code1()
except TypeError:
run_code2()
other_code()
is the same with this one ..
This seems like it should be pretty trivial, but I am new at Python and want to do it the most Pythonic way.
I want to find the index corresponding to the n'th occurrence of a substring within a stri..
I just started programming Objective-C and, having a background in Java, wonder how people writing Objective-C programs deal with private methods.
I understand there may be several conventions and ha..
I download the Gurobi package for linear programming. I import the corresponding gurobi.jar package. Then run the example program. Then it appears the following errors:
Exception in thread "main" ..
I have an Excel spreadsheet containing a list of strings. Each string is made up of several words, but the number of words in each string is different.
Using built in Excel functions (no VBA), is the..
I setup global namespaces for my objects by explicitly setting a property on window.
window.MyNamespace = window.MyNamespace || {};
TypeScript underlines MyNamespace and complains that:
The pro..
I just added a new drawable folder under res folder. In the drawable folder, i copied the ic_launcher.png file from drawable-hdpi folder.
I wanna change the standard ImageButton image through the new ..
I wrote a module which I published to npm a moment ago (https://npmjs.org/package/wisp)
So it installs fine from the command line:
$ npm i -g wisp
However, when I run it from the command line, I ke..
Consider the following code that reads an array of files in a serial/sequential manner. readFiles returns a promise, which is resolved only once all files have been read in sequence.
var readFile = fu..
I am developing web app using spring frame work, but i am getting following error in some of the jsp pages.
javax.servlet.ServletException cannot be resolved to a type
I have included servlet-api a..
How can I create a java.nio.file.Path object from a String object in Java 7?
I.e.
String textPath = "c:/dir1/dir2/dir3";
Path path = ?;
where ? is the missing code that uses textPath...
What is the best way to strip all non alphanumeric characters from a string, using Python?
The solutions presented in the PHP variant of this question will probably work with some minor adjustments, ..
I can't figure out why the new required attribute of HTML5 seems to not be working, and I know my simple code seems to be okay. What should I do to make this work?
Here is my code in HTML:
<input..
How to resize image (Bitmap) to for example 800*480 programatically ? I have retrieved a picture in my app which is ~1MB and I need to scale it down to 800*480
I have loaded that picture and compresse..
The code in question is below:
public static string ChangePersianDate(DateTime dateTime)
{
System.Globalization.GregorianCalendar PC = new System.Globalization.GregorianCalendar();
PC.Calen..
How can I detect if a user is viewing my web site from a mobile web browser so that I can then auto detect and display the appropriate version of my web site?..
So apparently because of the recent scams, the developer tools is exploited by people to post spam and even used to "hack" accounts. Facebook has blocked the developer tools, and I can't even use the ..
I'm trying to using a PagedList in my ASP.Net application and I found this example on the Microsoft website http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/sorting-filtering-and-pag..
I am writing code that needs to extract an object literal posted to a servlet. I have studied the API for the HttpServletRequest object, but it is not clear to me how to get the JSON object out of the..
function getInputElements() {
var inputs = document.getElementsByTagName("input");
}
The above code gets all the input elements on a page which has more than one form. How do I get the input ele..
I have an SSIS package that is being executed by an SQL Job which runs twice a day. I recently updated the SSIS package by removing a where clause of a Select statement in it. Now the results have aro..
Hi how to set R G B values in System.Drawing.Color.G ?
which is like System.Drawing.Color.G=255; is not allowed because its read only
Property or indexer 'System.Drawing.Color.G' cannot be assigned..
I want to rewrite the "cp" command of Linux. So this program will work like #./a.out originalfile copiedfile. I can open the file, create new file but can't write the new file. Nothing is written. Wha..
PHP 5.5 has been released and it features a new code caching module called OPCache, but there doesn't appear to be any documentation for it.
So where is the documentation for it and how do I use OPc..
In the C language, how do I convert unsigned long value to a string (char *) and keep my source code portable or just recompile it to work on other platform (without rewriting code?
For example, if ..
I am creating a custom authentication service in my spring mvc application:
@Service
public class AuthenticationServiceImpl implements AuthenticationService {
@Autowired
UserService userServic..
I have a template page expecting two forms. If I just use one form, things are fine as in this typical example:
if request.method == 'POST':
form = AuthorForm(request.POST,)
if form.is_valid..
What does res.render do, and what does the html file look like?
My end goal is to load arbitrary comma-separated-values from a text file into an html file (for example). I was only able to deduc..
I have a simple NN model for detecting hand-written digits from a 28x28px image written in python using Keras (Theano backend):
model0 = Sequential()
#number of epochs to train for
nb_epoch = 12
#am..
Is it possible to generate different random number, every time loop runs. For example, i have:
for (int t=0;t<10;t++)
{
int random_x;
srand ( time(NULL) );
random_x = rand() % 100;
..
What is the best way to do a groupby on a Pandas dataframe, but exclude some columns from that groupby? e.g. I have the following dataframe:
Code Country Item_Code Item Ele_Code Unit ..
Let's say I have a directory, /X/Y, which is a git repository. Is it possible to somehow call a command like git pull from inside /X, but targeting the /X/Y directory?
EDIT: I guess I was wondering s..
I tried to use IPython.display with the following code:
from IPython.display import display, Image
display(Image(filename='MyImage.png'))
I also tried to use matplotlib with the following code:
im..
I have created an asp.net webpage and have uploaded it onto a webserver. However when I try to view the page remotely, I get errors about the customerror tag in the web.config file. The page works loc..
I was trying to connect to the database here in my laptop using Oracle Toad but I kept on having this error:
ORA-12170: TNS:Connect timeout occurred
What are the possible reasons why I kept on h..
Not sure what am I missing here but I am not able to get the values from my appsettings.json in my .net core application. I have my appsettings.json as:
{
"AppSettings": {
"Version": "One..
How to obtain the start time and end time of a day?
code like this is not accurate:
private Date getStartOfDay(Date date) {
Calendar calendar = Calendar.getInstance();
int year = calendar.g..
The first example didn't work. I need to have always a list to disable links? Or what is wrong with my first demo?
<a class="disabled" href="#">Disabled link</a>
<ul class="nav nav..
I need to implement the following query in MySQL.
(select * from emovis_reporting where (id=3 and cut_name= '?????' and cut_name='??') )
intersect
( select * from emovis_reporting where (id=3) and (..
How do I convert a date/time string (e.g. 2011-01-01 15:00:00) that is UTC to any given timezone php supports, such as America/New_York, or Europe/San_Marino...
So I am going back to a project I created in College, so I can transfer it to PHP. I orginally coded it in ASP Classic.
I am on Windows 8 and running Access 2013.
I am currently getting the followi..
I've been using git for some time now on Windows (with msysGit) and I like the idea of distributed source control. Just recently I've been looking at Mercurial (hg) and it looks interesting. However, ..
I am starting to develop Android applications. Which version of Eclipse should I use?
I see there are 11 versions. I am confused with these:
Eclipse IDE for Java Developers
Eclipse Classic 3.6.1
Ec..
I'm attempting to use JSON to initiate a POST request to an API.
I've found some example code, and before I get too far I wanted to get that working, but I'm stuck...
<html>
<head>
<s..
I want to upload a csv file and process the data inside that file. What is the best method to do so? I prefer not to use php script. I did the following steps. But this method only returns the file na..
My co-workers and I are having a problem using Firefox 3.0.6 to access a Java 1.6.0___11 web application we're developing. Everything works fine anywhere from 1-30 minutes into the session...but even..
I'm trying to set the default focus on an input box when the page loads (example: google).
My page is very simple, yet I can't figure out how to do this.
This is what I've got so far:
<html>
&..
I'm using PHPMailer in a Simple Script For Send Email's Through Gmail, and I'm getting an "Unknown Error" (At least for me!):
SMTP Error: Could not authenticate.
Error: SMTP Error: Could not
a..
I have a json string, which I should deSerialize to the following class
class Data <T> {
int found;
Class<T> hits
}
How do I do it?
This is the usual way
mapper.readValue(jsonS..
Is there a way I can configure maven to always download sources and javadocs? Specifying -DdownloadSources=true -DdownloadJavadocs=true everytime (which usually goes along with running mvn compile twi..
I was trying to go to another page using button, but it always fail.
Here is my First Class with its XML:
public class FindPeopleFragment extends Fragment {
public FindPeopleFragment(){}
@..
I've been updating some of my old code and answers with Swift 3 but when I got to Swift Strings and Indexing it has been a pain to understand things.
Specifically I was trying the following:
let st..
I need to access the Parent Domain URL from my Iframe which is in another domain.
For example, "example.com" is my website which has an Iframe from another parent domain, such as "google.com". Here I..
I have some HTML:
<div align="center" style="border:1px solid red">
This is some text in a div element!
</div>
The Div is changing the spacing on my document, so I want to use a span fo..
On a windows 7 machine I have pip version 1.5.6 installed:
pip 1.5.6 from C:\Users\dietz\PNC\tas\ENV\lib\site-packages (python 2.7)
In order to find the reason for an error I want to install a diff..
I'm wondering how to consume a WEBAPI from another ASP.Net Web API to store the response in a database.
I know how to consume a WEBAPI from clients like javascript,console application etc.
But the re..
I'm working with pandas and need to read some csv files, the structure is something like this:
folder/folder2/scripts_folder/script.py
folder/folder2/data_folder/data.csv
How can I open the data.csv..
Ok, I've tried about near everything and I cannot get this to work.
I have a Django model with an ImageField on it
I have code that downloads an image via HTTP (tested and works)
The image is saved ..
Why does trying to print directly to a file instead of sys.stdout produce the following syntax error:
Python 2.7.2+ (default, Oct 4 2011, 20:06:09)
[GCC 4.6.1] on linux2
Type "help", "copyright", "c..
I am working through some code done by a previous developer. I'm pretty new to PHP so I am wondering if there is any well known pattern or solution to this problem.
Basically the original author does ..
I have an application which updates my datagrid each time a log file that I'm watching gets updated (Appended with new text) in the following manner:
private void DGAddRow(string name, FunctionType f..
I'm playing around with Java 8 to find out how functions as first class citizens. I have the following snippet:
package test;
import java.util.*;
import java.util.function.*;
public class Test {
..
I happened to debate with a friend during college days whether advanced mathematics is necessary for any veteran programmer. He used to argue fiercely against that. He said that programmers need only ..
We have been using Mock for python for a while.
Now, we have a situation in which we want to mock a function
def foo(self, my_param):
#do something here, assign something to my_result
retur..
I know that it is an anti-pattern to set state on componentDidMount and a state should be set on componentWillMount but suppose I want to set the length of the number of li tags as a state. In that ca..
I am working on an SMS app and need to be able to convert the sender's phone number from +11234567890 to 123-456-7890 so it can be compared to records in a MySQL database.
The numbers are stored in ..
My CSS:
#content_right_head span
{
display:inline-block;
width:180px;
overflow:hidden !important;
}
Now it's showing content content
But I want to show like
content content ...
I need to s..
I was just trying to see how to check for the null terminating character in the char * array but I failed. I can find the length using the for loop procedure where you keep on checking each element, b..
There is no summary available of the big O notation for operations on the most common data structures including arrays, linked lists, hash tables etc...
How can I get the AVG of a column ignoring NULL and zero values?
I have three columns to get their average, I try to use the following script:
SELECT distinct
AVG(cast(ISNULL(a.SecurityW,0) as ..
I'm getting the exception java.lang.ClassNotFoundException when I am trying to run my code,
My Code
try
{
Class.forName("com.mysql.jdbc.Driver");
Connection con=DriverManager.ge..
I have a python list which runs into 1000's. Something like:
data=["I","am","a","python","programmer".....]
where, len(data)= say 1003
I would now like to create a subset of this list (data) by sp..
I have received a Security Alert from Google this week that tells me to upgrade my android version of cordova app. The email from google is as below -
This is a notification that your --apps ids--, i..
I have the following code in html:
<canvas id="myCanvas" width =800 height=800>
I want, instead of specifying the width as 800, to call the JavaScript function getWidth() to get the width e..
Could you help me solve this problem ?
When I try to click "query database" under database menu in Mysql workbench. it gives me an error:
Cannot Connect to Database Server
Your connection attempt f..
I am looking for a way to clear all elements found within an HTML form contained inside a Bootstrap modal without refreshing the page.
Currently:
The user enters data and closes the modal.
When the..
Is there a way to call a url and get a response using javascript?
I need the equivalent of ASP.NET:
WebRequest req = HttpWebRequest.Create("http://someurl.com");
WebResponse webResponse = req.GetResp..
I want to run a python script in a CENTOS server:
#!/usr/bin/env python
import socket
try:
import thread
except ImportError:
import _thread as thread #Py3K changed it.
class Polserv(objec..
I'm facing a problem that seems to have no straighforward solution.
I'm using java.util.Map, and I want to update the value in a Key-Value pair.
Right now, I'm doing it lik this:
private Map<Str..
Is it possible to check if a (MySQL) database exists after having made a connection.
I know how to check if a table exists in a DB, but I need to check if the DB exists. If not I have to call another..
I'm working on a project that will read compiler error messages of a particular variety and do useful things with them. The sample codebase I'm testing this on (a random open-source application), and ..
There’s not standard way to check if a MySQL user exists and based on that drop it. Are there any workarounds for this?
Edit: I need a straight way to run this without throwing up an error
e.g.
..
I find a lot of answers on how to reference a GitHub issue in a git commit (using the #xxx notation).
I'd like to reference a commit in my comment, generating a link to the commit details page?..
Hi Everyone I'm new to angular. Actually, I'm trying to subscribe data from a service and that data, I'm passing to form control of mine from (example, it's like an edit form).
import { Component, On..
Possible Duplicate:
Easiest way to compare arrays in C#
How can I compare two arrays in C#?
I use the following code, but its result is false. I was expecting it to be true.
Array.Equals(..
I successfully implemented the OpenCV square-detection example in my test application, but now need to filter the output, because it's quite messy - or is my code wrong?
I'm interested in the four co..
I'm looking for a list of all locales and their short codes for a PHP application I am writing. Is there much variation in this data between platforms?
Also, if I am developing an international appli..
Let's assume that I have an XML like this:
<author type="XXX" language="EN" gender="xx" feature="xx" web="foobar.com">
<documents count="N">
<document KEY="e95a9a6c790ecb95..
I want to encrypt file and store it in SD card. I want to decrypt that encrypted file and store it in SD card again. I have tried to encrypt file by opening it as file stream and encrypt it but it is ..
I've been using Remote Desktop Connection to get into a workstation. But in this environment, I cannot use the power options in Start Menu. I need an alternative way to shutdown or restart.
How do I ..
I am doing the following:
<a href="www.stackoverflow.com">
<button disabled="disabled" >ABC</button>
</a>
This works good but I get a HTML5 validation error that says..