I would like to expand the question asked on this thread
Binding listbox to observablecollection
by giving it an ability to persistent the data. The structure is mostly the same except I installed E..
I want to compile an open source android project (Netguard) using gradel (gradlew clean build) But I encountered this Error:
A problem occurred configuring project ':app'.
> Exception thrown while..
I have the following errors (and more) in all my views (*.cshtml) when opening my project in Visual Studio 2015 Professional.
Error CS0246 The type or namespace name 'System' could not be found ..
Problem
I don't understand how to make LocalDB show up in the SQL Server Object Explorer. On some VMs, it shows up automatically, on some other VMs, it doesn't. Still, after googling for hours, I don'..
I am seeing this in several situations and it is intermittent in our web based application connecting to SQL 2008 R2 serve back end. Users are coming across a point 2 point connection and seeing this..
I'm running my code and getting this error. But what does it mean?
The network path was not found Description: An unhandled exception
occurred during the execution of the current web request. P..
After entering data into all the textbox, and after clicking the submit button, it won't immediately show in the datagridview, I need to reopen the form in order to see the new inserted row. What code..
I am new to JSON and need help. I have some JSON working in jquery and get the information back correctly from the web service I have running on the web. However, I can't get it to work using HttpWebR..
I saw many questions on SO with this error. But none were related to forms. I just hosted my application server after testing locally. I think it worked for a few mins but I'm not sure as I may have l..
Controller:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using MvcApplication1.Models;
using System.ComponentModel.DataAnnotations.Schema..
I have a warning at the bottom of my screen:
Warning 1 'WindowsFormsApplication2.EventControlDataSet.Events' hides
inherited member
'System.ComponentModel.MarshalByValueComponent.Events'...
I am working on a project in which I have a form through which I can edit a question available in a list view. Whenever I select a row from the list view and click on the 'modify' button, the text box..
I have this class
using System.ComponentModel.DataAnnotations;
using Argussoft.BI.DAL.Domain.Users;
namespace Argussoft.BI.DAL.DTOs.UserDTOs
{
public class CreateUserDto
{
[Required(..
Evening all,
I'm trying to connect to a SQL Server 2012 database from C#. My connection settings when using SQL Server Management Studio are as below:-
Server Type: Database Engine
Server Name: ..
I'm running an ASP.NET Web Pages page that upon initial load pulls a list of items from a SQL server. This query runs in a second or so and loads the page within 2 seconds. The return is about a 1000 ..
I have created a database and table using Visual Studio's SQL Server Compact 3.5 with a dataset as my datasource. On my WinForm I have a DataGridView with 3 columns. However, I have been unable to fig..
Does anybody have some experience working with charts in .NET? Specially I want to create them programmatically.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using Sys..
Ok i edited my code i dont get errors but the messageBox.Show return nothing empty box.
Maybe i need to add something in the referrer string ? I didnt understand what is the referrer and what should i..
I'm trying to use DataAnnotations in my WPF project to specify a maximum length of strings, with the following:
using System.ComponentModel.DataAnnotations;
However, I get the error
The type or..
My code is as below
public CountryStandards()
{
InitializeComponent();
try
{
FillPageControls();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Coun..
I began organizing my code to day into seperarate .cs files, and in order to allow the methods that work with the UI to continue to do so I would create the .cs code under the same namespace and publi..
I am having this error when seeding my database with code first approach.
Validation failed for one or more entities. See 'EntityValidationErrors' property for more details.
To be honest I don't..
I am trying to add a [Science.dll] in my project which should be staright forward. But I am getting a problem. Can someone tell me why?
My C# project which I just copied from internet.
using System;..
I'm getting the error:
Extension methods must be defined in a non-generic static class
On the line:
public class LinqHelper
Here is the helper class, based on Mark Gavells code. I'm really c..
I am VERY new to ASP.NET MVC (3) and am having a hard time resolving a build error in Visual Studio:
The type or namespace name 'DbContext' could not be found (are you missing a using directive or an..
On my MVC3 project, I store score prediction for football/soccer/hockey/... sport game. So one of properties of my prediction class looks like this:
[Range(0, 15, ErrorMessage = "Can only be between ..
The following is my Windows service code. When I am debugging the code, I am getting the error/ exception:
The type initializer for 'CSMessageUtility.CSDetails' threw an exception.
using System;..
I have a C# class that I have inherited. I have successfully "built" the object. But I need to serialize the object to XML. Is there an easy way to do it?
It looks like the class has been set up for ..
I get the following error when I try to compile my C# program:
The type or namespace name 'Login' could not be found (are you missing a using directive or an assembly reference?)
using System;
us..
I am using the following code to fire the iexplore process. This is done in a simple console app.
public static void StartIExplorer()
{
var info = new ProcessStartInfo("iexplore");
info.UseSh..
What do I have to change to the following code so that the background is red, neither of the 2 ways I tried worked:
(source: deviantsart.com)
XAML:
<Window x:Class="TestBackground88238.Window..
I would like to know if it is possible to get attributes of the enum values and not of the enum itself? For example, suppose I have the following enum:
using System.ComponentModel; // for Description..
The following example fills the ItemsControl with a List of BackupDirectories which I get from code.
How can I change this so that I get the same information from the app.config file?
XAML:
<Win..
I have a class that creates a static array of all properties, using a static constructor. I also have a function -- GetNamesAndTypes() -- that lists the name & type of each property in that array..
Does any one know how I can specify the Default value for a DateTime property using the System.ComponentModel DefaultValue Attribute?
for example I try this:
[DefaultValue(typeof(DateTime),DateTime...
What is the most efficient way to create a constant (never changes at runtime) mapping of strings to ints?
I've tried using a const Dictionary, but that didn't work out.
I could implement a immuta..
We are seeing this error in a Winform application. Can anyone help on why you would see this error, and more importantly how to fix it or avoid it from happening.
System.ComponentModel.Win32Excepti..
I have a React component and I want to load in my JSON data from a file. The console log currently doesn't work, even though I'm creating the variable data as a global
'use strict';
var React = requ..
I'm trying to understand the whole issue with CSRF and appropriate ways to prevent it. (Resources I've read, understand, and agree with: OWASP CSRF Prevention CHeat Sheet, Questions about CSRF.)
As I..
I am trying to parse two values from a datagrid. The fields are numeric, and when they have a comma (ex. 554,20), I can't get the numbers after the comma. I've tried parseInt and parseFloat. How can I..
Is there a good object-relational-mapping library for PHP?
I know of PDO/ADO, but they seem to only provide abstraction of differences between database vendors not an actual mapping between the doma..
I am trying to remove spaces from a dataframe I have. The columns names look like below. I am trying to get the spaces between name out and replace it with "_" wherever present.
['join_date' 'fiscal_..
I want to be able to list the files in the current directory. I've made something that should work but doesn't return all the file names.
File dir = new File(".");
File[] filesList = dir.listFiles();..
I am trying to execute a script from shared folder that I trust:
PowerShell -file "\\server\scripts\my.ps1"
But I get a security warning, and have to press 'R' to continue
Security Warning Run ..
Oracle has SQL commands that one can issue so that a transaction does not get logged. Is there something similar for SQL Server 2008?
My scenario: We need Tx logs on servers (Dev, QA, Prod), but mayb..
When I run maven install on my multi module maven project I always get the following output:
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!..
I have been working with Rails and it sends me back this error. Please provide questions. Thanks for all the help. I will update this question with a better one because I don't know how to ask it.
Bu..
I'm trying to convert some date/times to UTC, which I thought would be dead simple in Python - batteries included, right? Well, it would be simple except that Python (2.6) doesn't include any tzinfo c..
I have something like the following:
final String url = "http://example.com";
final HttpClient httpClient = new HttpClient();
final PostMethod postMethod = new PostMethod(url);
postMethod.addRequest..
I'm working on a server in a distributed application that has browser clients and also participates in server-to-server communication with a 3rd party.
My server has a CA-signed certificate to let my ..
Possible Duplicate:
commenting VB code
Does anybody know how to do a block comment in Visual Basic?
Note: I did a few searches on here and neither those results nor the results for 'Questi..
I've been looking all around for Angular cookies but I haven't been able to find how to implement cookies management in Angular. Is there any way to manage cookies (like $cookie in AngularJS)?..
Is there a way to convert PEM files to PPK files? (you may guess that Amazon EC2 gives me a PEM file, and I need to use the PPK format for SSH connectivity)...
I have searched and searched to no avail so apologies if the answer does exist.
I am not very good with batch files so please keep this in mind.
All I am after is a single batch file that will list/..
map(function, iterable, ...)
Apply function to every item of iterable and return a list of the results. If additional iterable arguments are passed, function must take that many arguments and is app..
I have a CSV dumpfile from a Blackberry IPD backup, created using IPDDump.
The date/time strings in here look something like this
(where EST is an Australian time-zone):
Tue Jun 22 07:46:22 EST 2010
..
I have an untrusted string that I want to show as text in an HTML page. I need to escape the chars '<' and '&' as HTML entities. The less fuss the better.
I'm using UTF8 and don't need other ..
I have a long document of commands. Using Notepad++ or regex, I want to delete all lines containing "help" including keyboard_help, etc.
How can this be done?..
When I develop the project using Eclipse, the APK file goes on the emulator. But I want to upload my application to a real device. Is there a tool to build an APK file?
What is the process? Or is it..
I have the following MVC 5 Razor HTML helper:
@Html.TextBoxFor(m => m.ShortName,
new { @class = "form-control", @placeholder = "short name"})
I need this field to be required (i.e. have a red..
Upgraded to Studio Canary build. My previous project of Telegram Messenger is giving following error.
Error:All flavors must now belong to a named flavor dimension. The flavor 'armv7' is not assig..
How can I change the supported TLS versions on my HttpClient?
I'm doing:
SSLContext sslContext = SSLContext.getInstance("TLSv1.1");
sslContext.init(
keymanagers.toArray(new KeyManager[keymanager..
I have the following PS script written:
Get-ADUser -Filter * -SearchBase 'OU=Users & Computers, DC=aaaaaaa, DC=com' -Properties DisplayName | Export-CSV "ADUsers.csv"
From what I can tell it s..
It looks like implementing basic HTTP authentication with Express v3 was trivial:
app.use(express.basicAuth('username', 'password'));
Version 4 (I'm using 4.2) removed the basicAuth middleware, tho..
I am using MongoDB with Node.JS. I have a collection which contains a date and other rows. The date is a JavaScript Date object.
How can I sort this collection by date?..
I'm in the process of moving my files onto another computer, and one thing I would like to do is to transfer the data in my MySQL database. I want to dump the databases into .sql files, but also have ..
How can I look up a hostname given an IP address? Furthermore, how can I specify a timeout in case no such reverse DNS entry exists? Trying to keep things as fast as possible. Or is there a better ..
I am new to Python. I am trying to find a simple way of getting a count of the number of elements repeated in a list e.g.
MyList = ["a", "b", "a", "c", "c", "a", "c"]
Output:
a: 3
b: 1
c: 3
..
How can I trigger some action with right click after disabling the browser context menu ?
I tried this . . .
$(document).ready(function(){
$(document).bind("contextmenu",function(e){
$(..
My database is about 25 MB, and I've verified that the username accessing it, as well as the file permissions haven't changed in months. I'm having a problem where queries are failing due to a "databa..
I get the data from DB and display it in a div... what I want to do is when I click a link it should change the content of the div
one option is to pass parameter through URL to itself and reload the..
I'm trying to submit my first app in iOS. I have entered iOS Provisioning Portal and I am about to create an app ID.
Lets say that I name my bundle identifier:
com.mycompany.appdemo
Then going to..
I'm using NetBeans, trying to change the familiar Java coffee cup icon to a png file that I have saved in a resources directory in the jar file. I've found many different web pages that claim they ha..
I need to run a query like:
SELECT p.id, p.name,
(SELECT name
FROM sites s
WHERE s.id = p.site_id) AS site_list
FROM publications p
But I'd like the sub-select to ret..
I have a simple drop down and I want to have it so that if the user selects Have a Baby the message changes to Have a Baby, but for any other selection. The message stays the same (nothing), but this..
I'm using forms in HTML and javascript. I would like an alert to pop up only if the user inputs a LETTER and clicks submit.
So I have the HTML code:
<form name="myForm" action="" onsubmit="return..
Is there a way to style the currently selected <option> element in a <select> element?
I could then give a background color to the currently selected option element? That way I can style ..
I have an IBOutlet to a UIImageView, but when I look at the UIImageView doc, I can't see any hints about programmatically changing it. Do I have to fetch an UIImage object from that UIImageView?..
I'm trying to create an array of structs. Is the code below valid? I keep getting an expected primary-expression before '{' token error.
int main() {
int pause;
struct Customer {
int uid;
..
I have an array of objects:
Object = {
1 : { name : bob , dinner : pizza },
2 : { name : john , dinner : sushi },
3 : { name : larry, dinner : hummus }
}
I want to be able to search the obje..
I'm wondering how to go about obtaining the value of a POST/GET request variable using Python with Flask.
With Ruby, I'd do something like this:
variable_name = params["FormFieldValue"]
How would ..
Scala syntax has a lot of symbols. Since these kinds of names are difficult to find using search engines, a comprehensive list of them would be helpful.
What are all of the symbols in Scala, and what..
We are using Oracle as the database for our Web application. The application runs well most of the time, but we get this "No more data to read from socket" error.
Caused by: java.sql.SQLRecoverableEx..
I have a table with this layout:
CREATE TABLE Favorites
(
FavoriteId uuid NOT NULL PRIMARY KEY,
UserId uuid NOT NULL,
RecipeId uuid NOT NULL,
MenuId uuid
)
I want to create a unique constra..
I often see people using Where.FirstOrDefault() to do a search and grab the first element. Why not just use Find()? Is there an advantage to the other? I couldn't tell a difference.
namespace LinqFin..
PIL does support JPEG in my system.
Whenever I do an upload, my code is failing with:
File "PIL/Image.py", line 375, in _getdecoder
raise IOError("decoder %s not available" % decoder_name)
IOErr..
Back in my C/C++ days, coding an "infinite loop" as
while (true)
felt more natural and seemed more obvious to me as opposed to
for (;;)
An encounter with PC-lint in the late 1980's and subsequen..
I have a DataFrame with 4 columns of which 2 contain string values. I was wondering if there was a way to select rows based on a partial string match against a particular column?
In other words, a fu..
I already tried all the possible ways, but I still didn't get it working.
I have a modal window with a checkbox I want that when the modal opens, the checkbox check or uncheck should be based on a dat..
I am trying to position the text element "Bet 5 days ago" in the lower right-hand corner. How can I accomplish this? And, more importantly, please explain so I can conquer CSS!
..
I am running the exact same code on both windows and mac, with python 3.5 64 bit.
On windows, it looks like this:
>>> import numpy as np
>>> preds = np.zeros((1, 3), dtype=int)
&g..
I wrote a simple batch file to run Frequently Used websites based on a number selection. Here's the code I have. I am trying to set it so if someone inputs a number 6 or greater it will go to :N but w..
I am working on some stuff where I am storing data in a file.
But each time I run the script it gets appended to the previous file.
I want help on how I can remove the file if it already exists...
When trying to convert a JPA object that has a bi-directional association into JSON, I keep getting
org.codehaus.jackson.map.JsonMappingException: Infinite recursion (StackOverflowError)
All I fou..
I'm using the discord.js library and node.js to create a Discord bot that facilitates poker. It is functional except the hands are shown to everyone, and I need to loop through the players and send th..
I am the maintainer of a site that has allegedly 'lost' the source code to a flash swf file. How do I decompile this source?
Are there any programs online or offline that I could use?..
What does git rev-parse do?
I have read the man page but it raised more questions than answers. Things like:
Pick out and massage parameters
Massage? What does that mean?
I'm using as a resolv..
Let's say I have a 1d numpy array
a = array([1,0,3])
I would like to encode this as a 2D one-hot array
b = array([[0,1,0,0], [1,0,0,0], [0,0,0,1]])
Is there a quick way to do this? Quicker than jus..
Does anybody know how to set the encoding in FPDF package to utf-8? Or at least to ISO-8859-7 (Greek) that support greek characters?
Basically I want to create a pdf file containing greek characters...
I have an ArrayList of objects that have a name and an icon pointer and I want to save it in SharedPreferences. How can I do?
NOTE: I don't want to use Database..
I've pasted the example from php.net for using memcached in php and I'm getting:
Fatal error: Class 'Memcache' not found
I have this in my php.ini:
[memcache]
memcache.hash_strategy = "consiste..
I'm a newbie with Hibernate, and I'm writing a simple method to return a list of objects
matching a specific filter. List<Foo> seemed a natural return type.
Whatever I do, I can't seem to make ..
I have made a php script inside localhost and I am connecting that with httpClient but I am getting a problem.
Please tell me how can I connect to a php file at localhost from the emulator?..
I'm trying to get the current time as TimeStamp without success.
I have this code:
QDateTime setTime = QDateTime::fromString (QString("1970-07-18T14:15:09"), Qt::ISODate);
QDateTime current = QDateT..
I am trying to use getResources method in a non-activity class. How do I get the reference to the "resources" object so that I can access the xml file stored under resources folder?
Example:
XmlPull..
Can anyone guide me for formatting date in Bootstrap-DatePicker.
And I used Eternicode/bootstrap-datepicker.
Here my codes at JSP..
<div>Date : </div>
<input type="text" style="width..
I tried the following code different ways, like by taking out the while or the if, but when I put both together (if and while), I always get the error at the end...
undefine numero
set serveroutput o..
How to use/locate LocalBroadcastManager as described in google docs and Service broadcast doc?
I tried to google it, but there is no code available to start with?
The documents say that I should use..
I would like to modify the cell values of a dataframe column (Age) where currently it is blank and I would only do it if another column (Survived) has the value 0 for the corresponding row where it i..
Let T1 and T2 are DataTables with following fields
T1(CustID, ColX, ColY)
T2(CustID, ColZ)
I need the joint table
TJ (CustID, ColX, ColY, ColZ)
How this can be done in C# code in a simple way? ..
I have a table with total no of 1000 records in it.It has the following structure:
EMP_ID EMP_NAME PHONE_NO ARR_DATE
1 A 545454 2012/03/12
I want to calculate no of records for ever..
If exists is there header file to include?
This code give compilation error:
#include <iostream>
using namespace std;
int main()
{
byte b = 2;
cout << b << endl;
re..
Dynamic text of variable length are being injected into tableview cell labels. In order for the tableview cells' heights to be dynamically sized, I have implemented in viewDidLoad():
self.tableView.e..
I'm new to JQuery. In my App I have the following:
$("#displayPanel div").live("click", function(){
$(this).css({'background-color' : 'pink', 'font-weight' : 'bolder'});
});
When I click on a Div..
I use pickle to dump a file on python 3, and I use pickle to load the file on python 2, the ValueError appears.
So, python 2 pickle can not load the file dumped by python 3 pickle?
If I want it? Ho..
I am using Chart.js. I am trying to convert the chart to an image by getting a base 64 string. The tutorial (http://www.chartjs.org/docs/) devotes an entire 1 line on the topic:
The canvas element..
I get this problem in a c++ problem compiling in Ubuntu g++ version 4.4.3.
I dont know the headers to include to solve this problem.. Thanks
centro_medico.cpp: In constructor ‘Centro_medico::Centro..
I have a basic html page with some JS and CSS:
_x000D_
_x000D_
$('.expand').click(function() {_x000D_
$('.img_display_content').show();_x000D_
});_x000D_
@charset "utf-8";_x000D_
_x000D_
/* CSS Doc..
I've a problem with the following dependency in my pom.xml where org.springframework.version = 3.1.0.RELEASE:
<!-- Spring MVC framework -->
<dependency>
<groupId>org.springframe..
This article says that "Emacs has redo because you can reverse direction while undoing, thereby undoing the undo".
What does this mean? How can a user 'redo' with Emacs?..
I just got started using React so this is probably a very simple mistake, but here we go. My html code is very simple:
<!-- base.html -->
<html>
<head>
<title>Note Cards..
This will surely be an easy one but it is really bugging me.
I have a script that reads in a webpage and uses Beautiful Soup to parse it. From the soup I extract all the links as my final goal is to..
How do I set the index of a dropdown in jQuery if the way I'm finding the control is as follows:
$("*[id$='" + originalId + "']")
I do it this way because I'm creating controls dynamically and sin..
I was reading a Java article, but found no differences in the declaration and was confused over. Can anyone list me out this?
Added the Article
http://www.theparticle.com/javadata2.html..
While searching for an answer to this question, I've run into similar ones utilizing LINQ but I haven't been able to fully understand them (and thus, implement them), as I'm not familiarized with it. ..
I am writing a little code in J2ME. I have a class with a method setTableId(Short tableId). Now when I try to write setTableId(100) it gives compile time error. How can I set the short value without d..
I just setup Android Studio on my PC, which is new launch to develop Android application.
My problem is that, when I try to run my small app in emulator, it take to much time to launch and after then..
I am trying to make a simple javascript program bit it isn't working. Kindly help.
In eclipse I have created a dynamic web project and in DD my welcome file is index.jsp.
Given below is my code for in..
How do emulators work? When I see NES/SNES or C64 emulators, it astounds me.
Do you have to emulate the processor of those machines by interpreting its particular assembly instructions? What else..
Suppose I have a string "qwerty" and I wish to find the index position of the e character in it. (In this case the index would be 2)
How do I do it in C?
I found the strchr function but it returns ..
I save some data in session on my verify controller then I extract this session data into user_activity model and insert session data into activity table. My problem is only username data saved in ses..
I have to delete rows from guide_category that have no relation with guide table (dead relations).
Here is what I want to do, but it of course does not work.
DELETE FROM guide_category AS pgc
WHER..
I'm trying to learn to load apps on my iPhone from Xcode. When I do I keep getting "Codesign wants to access key "access" in your keychain, I put I my login password but it keeps popping up over and..
I am trying to get Material Design for my App by following this method.
Whenever I run the App it shows the following error:
Error inflating class android.support.v7.widget.Toolbar.
I checked..
I need make something like this. and I want to do it for a <div></div> which has width in %
I can do this by using an image and adding another div inside and z-index.
But I want to kno..
What is the simple basic explanation of what the return statement is, how to use it in Python?
And what is the difference between it and the print statement?..
I need to store phone numbers in a table. Please suggest which datatype should I use?
Wait. Please read on before you hit reply..
This field needs to be indexed heavily as Sales Reps can use this fi..
Is there a way to make grep output "words" from files that match the search expression?
If I want to find all the instances of, say, "th" in a number of files, I can do:
grep "th" *
but the output..
I have some combo-boxes that are set up as drop down lists, and the user can pick a number in them. I also have a Clear button that should clear the text from the combo boxes but I can't seem to get i..
I have certain data in sqllite and it update every time whenever, I click on save button and I want to show the data into a table layout for adding more rows for updated data.
I have certain code but..
I have a Transact-SQL query that uses the IN operator. Something like this:
select * from myTable where myColumn in (1,2,3,4)
Is there a way to define a variable to hold the entire list "(1,2,3,4)"..
When I try to download Java from Oracle I instead end up downloading a page telling me that I need agree to the OTN license terms.
Sorry!
In order to download products from Oracle Technology ..
I have this at the very top of my send.php file:
ob_start();
@session_start();
//some display stuff
$_SESSION['id'] = $id; //$id has a value
header('location: test.php');
And the following at the..
I tried to make an "alias" for a path that I use often while shell scripting. I tried something, but it failed:
myFold="~/Files/Scripts/Main"
cd myFold
bash: cd: myFold: No such file or directory
..
I am trying to write a bash script. In this script I want user to enter a path of a directory. Then I want to append some strings at the end of this string and build a path to some subdirectories.
For..
I'm building an installer for an application. The user gets to select a datasource they have configured and nominate what type of database it is. I want to confirm that the database type is indeed Or..
I'd like to take a CSV file living server-side and display it dynamically as an html table.
E.g., this:
Name, Age, Sex
"Cantor, Georg", 163, M
should become this:
<html><body><table..
How can I convert a set to a list in Python? Using
a = set(["Blah", "Hello"])
a = list(a)
doesn't work. It gives me:
TypeError: 'set' object is not callable
..
Once again, I have a problem with my apache virtual host configuration. (The default configuration is used instead of my specific one).
The problem is not really the misconfiguration but how to solve..
I am trying to add a width to a div, but I seem to be running into a problem because it has no content.
Here is the CSS and HTML I have so far, but it is not working:
CSS
body{
margin:0 auto;
width:10..
I have a private class variable char name[10] to which I would like to add the .txt extension so that I can open the file present in the directory.
How do I go about this?
It would be preferable to..
How to trigger a build remotely from Jenkins?
How to configure Git post commit hook?
My requirement is whenever changes are made in the Git repository for a particular project it will automatically s..
Although I have no problem whatsoever understanding recursion, I can't seem to wrap my head around the recursive solution to the Tower of Hanoi problem. Here is the code from Wikipedia:
procedure Ha..
What is the longest string that can be created in .NET? The docs for the String class are silent on this question as far as I can see, so an authoritative answer might require some knowledge of intern..
I am trying to get a list of list of tuples : something like [ [(1,0),(2,0),(3,0)],[(1,1),(2,1),(3,1)....]]
I used this statement
set([(a,b)for a in range(3)]for b in range(3))
But it gives me an ..
Caution: This question is over nine years old!
Your best option is to search for newer questions, or to search the answers below looking for your specific version of MVC, as many answers here are ob..
I need to view my SQLite db but I don't know how to do it. I've gone to http://www.sqlite.org/download.html and downloaded the command line shell for my OS, but when I run the program and type adb .....
I want to pass values between two Forms (c#). How can I do it?
I have two forms: Form1 and Form2.
Form1 contains one button. When I click on that button, Form2 should open and Form1 should be in in..
I have a .sql file from a MySQL dump containing tables, definitions and data to be inserted in these tables. How can I convert this database represented in the dump file to a MS SQL Server database?..
I receive error emails from my website whenever an exception occurs. I am getting this error:
The remote host closed the connection. The error code is 0x800704CD
and don't know why. I get about ..
I'm trying to learn how to use Git and have created a small project with an HTML, CSS, and Javascript file. I made a branch from my basically empty project and then made some changes to my code. I tri..
In a web application that makes use of AJAX calls, I need to submit a request but add a parameter to the end of the URL, for example:
Original URL:
http://server/myapp.php?id=10
Resulting URL:..
Context
In Vue 2.0 the documentation and others clearly indicate that communication from parent to child happens via props.
Question
How does a parent tell its child an event has happened via props..
Let me prefix this by saying that I know what foreach is, does and how to use it. This question concerns how it works under the bonnet, and I don't want any answers along the lines of "this is how you..
I know there are lots of questions on SO about how to get Dates in Java, but I want an example using new Java 8 Date API. I also know about the JodaTime library, but I want a method without relying on..
I have been getting the following error when running a SQL to convert my data type value from varchar to datetime.
Msg 242, Level 16, State 3, Line 1
The conversion of a varchar data type to a d..
I am creating a list using ng-repeat something like this
<div ng-repeat="file in files">
{{file.name}}
</div>
But for the last element alone I would like to have a class (<di..
I have the following query which uses a date variable, which is generated inside the stored procedure:
DECLARE @sp_Date DATETIME
SET @sp_Date = DateAdd(m, -6, GETDATE())
SELECT DISTINCT pat.Publicati..
I have an input string and I want to verify that it contains:
Only letters or
Only letters and numbers or
Only letters, numbers or underscore
To clarify, I have 3 different cases in the code, eac..
I've a python script which works just as it should, but I need to write the execution time. I've googled that I should use timeit but I can't seem to get it to work.
My Python script looks like this:..
All I want is to be able to change the color of a bullet in a list to a light gray. It defaults to black, and I can't figure out how to change it.
I know I could just use an image; I'd rather not do ..
Given each of the inputs below, I'd like to get free space on that location. Something like
long GetFreeSpace(string path)
Inputs:
c:
c:\
c:\temp
\\server
\\server\C\storage
..
I realize the Swift book provided an implementation of a random number generator. Is the best practice to copy and paste this implementation in one's own program? Or is there a library that does thi..
Accuracy Vs. Precision
What I would like to know is whether I should use System.currentTimeMillis() or System.nanoTime() when updating my object's positions in my game? Their change in movement is d..
I want to include js and css files in my jsp, but I'm not able to do so. I'm new to the concept of spring MVC. For a long time, I've been working on this same topic.
My index Page is like this
<!D..
Sometimes I break long conditions in ifs onto several lines. The most obvious way to do this is:
if (cond1 == 'val1' and cond2 == 'val2' and
cond3 == 'val3' and cond4 == 'val4'):
do_som..
I need to escape the regular expression special characters using java script.How can i achieve this?Any help should be appreciated.
Thanks for your quick reply.But i need to escape all the special ..
Is there a way to do repetitive background tasks in Go? I'm thinking of something like Timer.schedule(task, delay, period) in Java. I know I can do this with a goroutine and Time.sleep(), but I'd li..
I have a button on a spreadsheet that, when pressed, should allow the user to open a file, then copy columns A-G of the spreadsheet "Data", then paste the data from those columns on the current sheet...
I am having a set of text fields where i am doing validation
Say I am Having a field called "seats" this can accept
value less than "99999".Meaning I should not able to enter the
"99999" any thing ..
I am having a problem with BLOB fields in my MySQL database - when uploading files larger than approx 1MB I get an error Packets larger than max_allowed_packet are not allowed.
Here is what i've trie..
Possible Duplicate:
How to detect system information like os or device type
I am new to android application development.
I developed one small application,and install that application .apk..
I am trying to use the HTML5 canvas element to draw some arcs and circles - this works perfectly in FF but IE8 does not seem to support it.
Now, there exist Javascript libraries which seem to make IE..
How do I count the number of records returned by a group by query,
For eg:
select count(*)
from temptable
group by column_1, column_2, column_3, column_4
Gives me,
1
1
2
I need to count the a..
I have milliseconds in certain log file generated in server, I also know the locale from where the log file was generated, my problem is to convert milliseconds to date in specified format.
The proces..
I want to use order by with union in mysql query.
I am fetching different types of record based on different criteria from a table based on distance for a search on my site.
The first select query ret..
I have a data with the following format:
foo<tab>1.00<space>1.33<space>2.00<tab>3
Now I tried to sort the file based on the last field decreasingly.
I tried the following co..
Maybe it sounds weird, but after a long time programming, I just got on array sorting. Everything was as I expected, until I tried to sort an array of strings containing two identical strings inside. ..
Recently I have started playing with jQuery, and have been following a couple of tutorials. Now I feel slightly competent with using it (it's pretty easy), and I thought it would be cool if I were abl..
Any ideas?
SELECT * INTO OUTFILE '/home/myacnt/docs/mysqlCSVtest.csv'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '*'
LINES TERMINATED BY '\n'
FROM tbl_property
WHERE managerGroupID = {$manager..
How do I print out the contents of a std::vector to the screen?
A solution that implements the following operator<< would be nice as well:
template<container C, class T, String delim = "..
Is there a way to delete duplicate lines in a file in Unix?
I can do it with sort -u and uniq commands, but I want to use sed or awk.
Is that possible?..
I am trying to implement a custom titlebar:
Here is my Helper class:
import android.app.Activity;
import android.view.Window;
public class UIHelper {
public static void setupTitleBar(Activity c..
I have a table named PAYMENT. Within this table I have a user ID, an account number, a ZIP code and a date. I would like to find all records for all users that have more than one payment per day with ..
I have a number that I need to convert to a string. First I used this:
Key = i.ToString();
But I realize it's being sorted in a strange order and so I need to pad it with zeros. How could I do this..
I am trying to upload my Laravel project onto my web server, but my past two attempts have been unsuccessful. I believe I am not uploading the files to the right location.
This is my web server's stru..
I want to dynamically create a template. This should be used to build a ComponentType at runtime and place (even replace) it somewhere inside of the hosting Component.
Until RC4 I was using Componen..
How can I use tabs instead of multiple spaces for indentation in IntelliJ IDEA 11.0?
I have "Use tab character" checked under "Code Style" > "General" > "Default Indent Options". And also tried to ha..
The activity hosting this fragment has its onActivityResult called when the camera activity returns.
My fragment starts an activity for a result with the intent sent for the camera to take a picture...
I work a lot in mixed HTML and PHP and most time I just want solid HTML with a few PHP variables in it so my code look like this:
<tr><td> <input type="hidden" name="type" value="<?..
I am trying to downgrade my version of node
I ran:
npm install nvm
and I exported the bin folder to my Windows path variable,
C:\Program Files (x86)\nodejs\node_modules\npm\bin
but I still get..
I’m trying to get an image (dynamically placed, with no restrictions on dimensions) to be as wide as its parent div, but only as long as that width isn’t wider than its own width at 100%. I’ve t..
I just ran the following command:
pip install -U steem
and the installation worked well until it failed to install pycrypto.
Afterwards I did the
pip install cryptography
command because I thought i..
I'm using Vuejs. This is my markup:
<body>
<div id="main">
<div id="mainActivity" v-component="{{currentActivity}}" class="activity"></div>
</div>
</body>
..
Assuming I have to use C (no C++ or object oriented compilers) and I don't have dynamic memory allocation, what are some techniques I can use to implement a class, or a good approximation of a class? ..
I have an SQL table with 11000 keywords in it.
I want a query that can find fields which contain a certain letter.
So, if I include "a" and "b" the query will select all fields which contain the let..