Here's the table
Users
UserId
UserName
Password
EmailAddress
and the code..
public void ChangePassword(int userId, string password){
//code to update the password..
}
..
I'm working on uploading images, everything works great, but I have 100 pictures and I would like to show all of them in my View, as I get the complete list of the images in a folder, I can not find a..
I keep receiving this error when trying to add my own array into the code.
Here is my array;
$array = array();
while (odbc_fetch_row($rs))
{
$array[] = odbc_result($rs,'Product Name');
}
$test = pr..
I'm passing a large dataset into a MySQL table via PHP using insert commands and I'm wondering if it's possible to insert approximately 1000 rows at a time via a query other than appending each value ..
You can have 80-characters / right margin line in Netbeans, Text Mate and probably many, many more other IDEs. Is it possible to have it in Sublime Text 3 as well? Any option, plugin etc.?..
I have numbers like 1100, 1002, 1022 etc. I would like to have the individual digits, for example for the first number 1100 I want to have 1, 1, 0, 0.
How can I get it in Java?..
Possible Duplicate:
I have a nested data structure / JSON, how can I access a specific value?
I have a service that returns nested Objects in a JSON Array. How can I loop through the object..
I have a UIView, it is not inside UIScrollView. I would like to move up my View when the keyboard appears. Before I tried to use this solution: How can I make a UITextField move up when the keyboard i..
I've seen this post already and tried everything I could to change the padding for my placeholder but alas, it seems it just doesn't want to cooperate.
Anyway, here is the code for the css. (EDIT: Th..
I have some JavaScript code that works in FireFox but not in Chrome or IE.
In the Chrome JS Console I get the follow error:
"Uncaught SyntaxError: Unexpected end of input".
The JavaScript cod..
Is it possible to set the absolute position of a view in Android? (I know that there is an AbsoluteLayout, but it's deprecated...)
For example, if I have a 240x320px screen, how could I add an ImageV..
How do I convert 5 random ascii values into chars?
Prompt:
Randomly generate 5 ascii values from 97 to 122 (the ascii values for all of the alphabet). As you go, determine the letter that corresp..
I have a form where there's a "Submit" button and a "Cancel" anchor. The HTML is this:
<input type="submit" value="Submit" />
<a href="some_url">Cancel</a>
I'd like for the two t..
When using a standard .NET Xml Serializer, is there any way I can hide all null values? The below is an example of the output of my class. I don't want to output the nullable integers if they are set ..
In my application I need to get the hour and minute separately:
NSString *currentHour=[string1 substringWithRange: NSMakeRange(0,2)];
int currentHourInNumber=[currentHour intValue];
Conside..
This question also has the answer, but it mentions DB2 specifically.
How do I search for a string using LIKE that already has a percent % symbol in it? The LIKE operator uses % symbols to signify wil..
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..
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..
Firstly, I do not want to use Visual Studio at all when dealing with the certain .nupkg files.
I know there is a tool called NuGet Package Explorer and this can export nupkg files to a certain file l..
Consider this trigger:
ALTER TRIGGER myTrigger
ON someTable
AFTER INSERT
AS BEGIN
DELETE FROM someTable
WHERE ISNUMERIC(someField) = 1
END
I've got a table, someTable, and I'm tr..
I am hoping someone can help me with a problem I am struggling with.
When I try to build my project from the terminal I get this error:
Failed to read artifact descriptor for com.morrislgn.merchandi..
I'm trying to get the CREATE scripts for existing tables within SQL Server 2008. I assume I can do this by querying the sys.tables somehow, however this isn't returning me the CREATE script data...
Just installed a fresh copy of python 3.4.1 on windows 7. Here says that pip is included by default. but i could not find any pip.exe or some pip commands. Do I need to install it separately or it exi..
I've got an array:
myArray = [{'id':'73','foo':'bar'},{'id':'45','foo':'bar'}, etc.]
I'm unable to change the structure of the array. I'm being passed an id of 45, and I want to get 'bar' for that ..
How do I use Assert.Throws to assert the type of the exception and the actual message wording?
Something like this:
Assert.Throws<Exception>(
()=>user.MakeUserActive()).WithMessage("..
I know there are many duplicates of this question, but I have looked at them all, and none of them have solved the issue.
I am trying to run a class that has a main function. I have cleaned the proje..
I'm programming a script using PHP and MySQL and I want to get a
unique id (consisting of a string: capitals and small
letters with numbers) like: gHYtUUi5b.
I found many functions in PHP that can g..
I have a Git repository in a folder called XXX, and I have second Git repository called YYY.
I want to import the XXX repository into the YYY repository as a subdirectory named ZZZ and add all XXX's ..
I am getting following error in my Node-Express App
UnhandledPromiseRejectionWarning: Unhandled promise rejection. This
error originated either by throwing inside of an async function
without..
I want to design my rest endpoint with the appropriate method for the following scenario.
There is a group. Each group has a status. The group can be activated or inactivated by the admin.
Should I ..
In matlab I use
a=[1,4,6]
b=[1,2,3]
corr(a,b)
which returns .9934. I've tried numpy.correlate but it returns something completely different. What is the simplest way to get the correlation of two v..
How can line breaks be added within a HTML tooltip?
I tried using <br/> and \n within the tooltip as follows:
<a href="#" title="Some long text <br/> Second line text \n Third line t..
I'm looking for something like createdb in PostgreSQL or any other solution that would allow me to create database with a help of a shell command. Any hints?..
I have a clean Eclipse Java SDK. I would like to make it suitable for developing PHP applications. So I need a PHP IDE plugin (or something like that). How could I install it from the Eclipse environm..
I want to be able to do the following:
Create a local branch based on some other (remote or local) branch (via git branch or git checkout -b)
Push the local branch
to the remote repository (publish)..
I have problem with reading the input until EOF in Java. In here, there are single input and the output consider the input each line.
Example:
input:
1
2
3
4
5
output:
0
1
0
1
0
But, I have c..
I am having some problems pulling values from a JSON object. Here is my code
try {
JSONObject json = new JSONObject(result);
JSONObject json2 = json.getJSONObject("results");
test = json2..
I am running a windows service and using a loop and Thread.Sleep to repeat a task, would it be better to use a timer method?
If yes a code example would be great
I am currently using this code to r..
Here is my code:
USE [xxx]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[problemParam]
@StartDate INT = CONVERT(INT,(CONVERT(CHAR(8),GETDATE()-130,112))),
@End..
We have a project that is stored within our TFS server and some files were Checked-Out by me from another computer and another user (both of which are not used anymore). Is there a way to force the un..
I am trying to read data from hdf5 file in Python. I can read the hdf5 file using h5py, but I cannot figure out how to access data within the file.
My code
import h5py
import numpy as np
f1 ..
#include <stdio.h>
#include <stdlib.h>
int main()
{
int randomnumber;
randomnumber = rand() % 10;
printf("%d\n", randomnumber);
return 0;
}
This is a simple program whe..
Code:
import urllib2 as u
import os as o
inn = 'dword.txt'
w = open(inn)
z = w.readline()
b = w.readline()
c = w.readline()
x = w.readline()
m = w.readline()
def Dict(Let, Mod):
global str
in..
I like my UIs to be intuitive; each screen should naturally and unobtrusively guide the user on to the next step in the app. Barring that, I strive to make things as confusing and confounding as possi..
Is there a method I can use for a div to extend to full height? I've got a sticky footer in it as well.
Here's the web page: Website removed. The middle bit I'm talking about is the white div, midcon..
I have a script using java to connect to display X11 in the port 10.0 at localhost
but i get always this error
java.lang.InternalError: Can't connect to X11 window server using 'localhost:10.0' as t..
When pushing an array's contents to another array I get
"Uncaught TypeError: Cannot read property 'push' of undefined" error
in this snippet.
var order = new Object(), stack = [];
for(var i=0..
I'm trying to fire the foo() function with the @click but as you can see, need press the radio button two times to fire the event correctly . Only catch the value the second time that you press...
I ..
I'm receiving this message but I can't find the postgresql.conf file:
OperationalError: could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "???&q..
I need a function to add a GUID to cells in excel. I found this previous question on stackoverflow, but it is not working. It suggests the following function:
=CONCATENATE(DEC2HEX(RANDBETWEEN(0,429496..
I'm getting the following error: Possible unhandled promise rejection (id:0: Network request failed
Here's the promise code, I don't see what's wrong here, any ideas?
return fetch(url)
.the..
I am trying to understand the dmesg timestamp and find it hard to convert that to change it to java date/custom date format.
Sample dmesg log:
[14614.647880] airo(eth1): link lost (missed beacons)
So..
I have a development database that re-deploy frequently from a Visual Studio Database project (via a TFS Auto Build).
Sometimes when I run my build I get this error:
ALTER DATABASE failed because a ..
Is it possible to use CSS transitions to animate something between a position set as left: 0px to right: 0px so it goes all the way across the screen? I need to accomplish the same thing with top to b..
I setup a link element and called its click event in jquery but the click event is calling twice, please see below the code of jquery.
$("#link_button")
.button()
.click(function () {
$("#attachme..
I have been looking for sometime on how to encrypt and decrypt a string. But most of it is in 2.7 and anything that is using 3.2 is not letting me print it or add it to a string.
So what I'm trying t..
I'm looking for a way to access an SQLite database in my app with Swift code.
I know that I can use an SQLite Wrapper in Objective C and use the bridging header, but I'd rather be able to do this pro..
I have constructed two dataframes. How can we join multiple Spark dataframes ?
For Example :
PersonDf, ProfileDf with a common column as personId as (key).
Now how can we have one Dataframe com..
Using jackson 2.1, how do I disable the fail_on_empty beans that the error message seems to want me to disable?
I'm assuming this is just the simplest thing in the world, but hell it is late and I h..
I am looking for a nice way to pretty-print a Map.
map.toString() gives me: {key1=value1, key2=value2, key3=value3}
I want more freedom in my map entry values and am looking for something more like ..
When I load an image from the media gallery into a Bitmap, everything is working fine, except that pictures that were shot with the camera while holding the phone vertically, are rotated so that I alw..
I'm having trouble creating a select in Angular2 that is backed by an array of Objects instead of strings. I knew how to do it in AngularJS using ngOptions, but it doesn't seem to work in Angular2 (I'..
Does Twig support ternary (shorthand if-else) operator?
I need some conditional logic like:
{%if ability.id in company_abilities %}
<tr class="selected">
{%else%}
<tr>
{%..
I have been trying to reset my MySQL root password. I have run the mysqld_safe --skip-grant-tables, updated the root password, and checked the user table to make sure it is there. Once restarting th..
Periodically I am getting the following exception:
Unable to load DLL 'SQLite.Interop.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
I am using 1.0.82.0. version..
I want to do this:
run a command
capture the output
select a line
select a column of that line
Just as an example, let's say I want to get the command name from a $PID (please note this is just a..
I am busy with a script that will make a google maps canvas on my website, with multiple markers. I want that when you click on a marker, a infowindow opens. I have done that, and the code is at the m..
I have the following json file. I want to know where should i place the json file in my project and how to read and store it.
{
"aakash": [
[ 0.070020,0.400684],
[ 0.134198,0.515837],
[..
I need to validate a domain name:
google.com
stackoverflow.com
So a domain in its rawest form - not even a subdomain like www.
Characters should only be a-z | A-Z | 0-9 and period(.) and dash(-)
..
In ipython Notebook, first create a pandas Series object, then by calling the instance method .hist(), the browser displays the figure.
I am wondering how to save this figure to a file (I mean not b..
I'm starting out using Git + GitHub.
In our distributed team, each member is creating their own branch for each issue/requirement they are allocated.
git branch Issue#1 <-- create this branch
..
If I have a list of strings such as:
[("aaaa8"),("bb8"),("ccc8"),("dddddd8")...]
What should I do in order to get rid of all the 8s in each string? I tried using strip or replace in a for loop but ..
I am trying to create an XSD, and trying to write the definition with the following requirement:
Allow child element specified to appear any number of times (0 to unbounded)
Allow child elements to ..
Some background:
I have a Java 1.6 webapp running on Tomcat 7. The database is MySQL 5.5. Previously, I was using Mysql JDBC driver 5.1.23 to connect to the DB. Everything worked. I recently upgraded..
Hi I want to set table height 100% to its parent div without define height in div. My code is not working. I dont know what I am missing. Fiddle link
<div style="overflow:hidden">
<div style..
I have an xpath selector. How can I get the elements matching that selector using jQuery?
I've seen https://developer.mozilla.org/en/Introduction_to_using_XPath_in_JavaScript but it doesn't use jQuer..
having trouble getting multiple lines to work correctly in a mailto link
In my case I'm testing it with an Outlook default mail reader.
The following is put in an anchor href:
mailto:email@address..
what is table variable? And how to create a table variable (virtual in-memory table) with columns that match the existing Stored procedure resultset.
I executed the procedure and after executing it, ..
(All done in poshgit on Windows 8):
git init --bare test-repo.git
cd test-repo.git
(Folder is created with git-ish files and folders inside)
git status
fatal: This operation must be run in a wor..
I have a ArrayList made up of different elements imported from a db, made up of strings, numbers, doubles and ints. Is there a way to use a reflection type technique to find out what each type of data..
Is there any way to make this function more elegant? I'm new to C++, I don't know if there is a more standardized way to do this. Can this be turned into a loop so the number of variables isn't restri..
How would I use python to check a list and delete all duplicates? I don't want to have to specify what the duplicate item is - I want the code to figure out if there are any and remove them if so, kee..
Is this static println function in out class from System namespace?
namespace System {
class out {
static println ...
}
How can I interpret this name? And where in JRE this function is def..
In my iOS 5 app, I have an NSString that contains a JSON string. I would like to deserialize that JSON string representation into a native NSDictionary object.
"{\"password\" : \"1234\", \"user\" :..
Reading the changes in Python 3.1, I found something... unexpected:
The sys.version_info tuple is now a named tuple:
I never heard about named tuples before, and I thought elements could either ..
I have the following JSON structure:
[{ "id":"10", "class": "child-of-9" }, { "id": "11", "classd": "child-of-10" }]
How do I iterate over it using JavaScript?..
I have a ASP.NET GridView with a column mapped to a boolean. I want do display "Yes"/"No" instead of "True"/"False". Well actually I want "Ja"/"Nej" (in Danish).
Is this possible?
<asp:gridview ..
Problem: Fragment onResume() in ViewPager is fired before the fragment becomes actually visible.
For example, I have 2 fragments with ViewPager and FragmentPagerAdapter. The second fragment is only a..
Is it necessary to turn both Internet and GPS on before I can read my current location(country, city, locality etc) in my app? If they are, then any alternative way to get the location only from GPS? ..
What is the proper way to set a timer in android in order to kick off a task (a function that I create which does not change the UI)?
Use this the Java way:
http://docs.oracle.com/javase/1.5.0/docs/a..
I'd like to see what the post fields in the request are before I send it. (For debugging purposes).
The PHP library (class) I am using is already made (not by me), so I am trying to understand it.
A..
In a Python for loop that iterates over a list we can write:
for item in list:
print item
and it neatly goes through all the elements in the list. Is there a way to know within the loop how man..
I want to match a regular expression special character, \^$.?*|+()[{. I tried:
x <- "a[b"
grepl("[", x)
## Error: invalid regular expression '[', reason 'Missing ']''
(Equivalently stringr::str..
How can I go about rolling back to a specific commit in git?
The best answer someone could give me was to use git revert X times until I reach the desired commit.
So let's say I want to revert bac..
I have an image in a HTML page:
<img src="smiley.gif" alt="Smiley face" width="32" height="32" />
If the image is not found on the server it shows an ugly blank square.
I want to make it so ..
In command prompt - How do I export all the content of the screen to a text file(basically a copy command, just not by using right-clicking and the clipboard)
This command works, but only for the com..
I run sudo pip install git-review, and get the following messages:
Downloading/unpacking git-review
Cannot fetch index base URL http://pypi.python.org/simple/
Could not find any downloads that sa..
I have tried to find the answer to this but I couldn't find an answer...
How do I check if my SSL Certificate is using SHA1 or SHA2?
Reason I ask is because it might have to do with the certificate ..
I am trying to set a background image for the home page. I am getting the image place from start of the screen and filling the width but not the height.
Am I missing something in my code? Are there i..
I have one String variable, str with possible values, val1, val2 and val3.
I want to compare (with equal case) str to all of these values using an if statement, for example:
if("val1".equalsIgnoreCa..
I've set up django server with nginx, and it gets 403 error in some of the pages.
Where can I find the django logs? where can I see the errors in detail?..
I'm trying to do something like a C #include "filename.c", or PHP include(dirname(__FILE__)."filename.php") but in javascript. I know I can do this if I can get the URL a js file was loaded from (e.g...
I uninstalled grunt with following command.
npm uninstall -g grunt
Then I again installed grunt with following command.
npm install -g grunt-cli
Visit following link:
https://npmjs.org/package/..
I have the following function:
$(document).ready(function() {
$("#dSuggest").keypress(function() {
var dInput = $('input:text[name=dSuggest]').val();
console.log(dInput);
..
How can I detect when a System.Windows.Forms.WebBrowser control has completed loading?
I tried to use the Navigate and DocumentCompleted events but both of them were raised a few times during documen..
I want to be able to scroll to a target when a button is pressed. I was thinking something like this.
<button (click)="scroll(#target)">Button</button>
And in my component.ts a ..
I have a global variable in JavaScript (actually a window property, but I don't think it matters) which was already populated by a previous script but I don't want another script that will run later t..
With a JavaScript Array, I can reset it to an empty state with a single assignment:
array.length = 0;
This makes the Array "appear" empty and ready to reuse, and as far as I understand is a single ..
Can CSS transitions be used to allow a text paragraph to fade-in on page load?
I really like how it looked on http://dotmailapp.com/ and would love to use a similar effect using CSS. The domain has s..
I am just starting to fiddle with Excel via C# to be able to automate the creation, and addition to an Excel file.
I can open the file and update its data and move through the existing worksheets. My..
In the official docs of React it mentions -
If you’re familiar with React class lifecycle methods, you can think
of useEffect Hook as componentDidMount, componentDidUpdate, and
componentWi..
I am developing a platform independent application. I am receiving a file URL*.
On windows these are:
file:///Z:/folder%20to%20file/file.txt
file://host/folder%20to%20file/file.txt (an UNC path)
I..
I have a VBA script that that generates and email when a VBA button is pushed in a given worksheet.
The script currently generates the email in a relatively small font. I was wondering if there is a..
What is the keyboard shortcut to expand the little red line that gives you the menu where you can choose to have the necessary using statement added to the top of the file?..
I'm having issues with QByteArray and QString.
I'm reading a file and stores its information in a QByteArray. The file is in unicode, so it contains something like: t\0 e\0 s\0 t\0 \0 \0
I'm trying ..
I'm using Tortoise SVN to update and commit changes to the repository in the server whenever I make changes to my working copy. But from a few days I'm not able to commit the changes and I get the fol..
What's the best way (or tool) on the Windows (Vista) command line to get size and modification time for a file on a remote webserver, without downloading it?..
After validation of select combo box which I have selected and I am not able to insert it in my database. Tomcat gives following error:
java.sql.SQLException: Parameter index out of range (1 > num..
Say you have a linked list structure in Java. It's made up of Nodes:
class Node {
Node next;
// some user data
}
and each Node points to the next node, except for the last Node, which has ..
CSS text-overflow: ellipsis on second line, is this possible? I can't find it on the net.
example:
what I want is like this:
I hope someone could help me. I need
an ellipsis on the second line of...
I need to run web.exe file from my developer command prompt in Visual Studio 2013. By default, the command prompt is not installed in Visual Studio 2013.
Previously, I was using Visual Studio 2012. I..
How can I loop through all the properties of object?. Right now I have to write a new code line to print each property of object
echo $obj->name;
echo $obj->age;
Can I loop through all the pr..
If I have a list of strings
List<String> list = new list<String>();
list.add("str1");
list.add("str2");
list.add("str3");
and I want to know if for example index position 2 contains an..
I want to create an iCal Calendar that can be downloaded from my website to the users Calendar program or imported to Google Calendar. What I want to know is if I do a direct Export from iCal on Mac O..
Why doesn't this work.
<li ng-if="!area"></li>
Feels a bit illogical since
<li ng-if="area"></li>
works just fine.
'area' is defined in scope as true/false
Any workarounds..
I know there is the /etc/group file that lists all users groups.
I would like to know if there is a simple command to list all user group names in spite of parsing the world readable /etc/group file...
I noticed that JavaScript's new Date() function is very smart in accepting dates in several formats.
Xmas95 = new Date("25 Dec, 1995 23:15:00")
Xmas95 = new Date("2009 06 12,12:52:39")
Xmas95 = new D..
I am building a project with Bootstrap and im facing little issue .I have a container below the Nav-top.My issue is that some portion of my container is hidden below the nav-top header.I dont want to ..
I have Windows 7 and tried to use the 'make' command but 'make' is not recognized as an internal or external command.
I did Start -> cmd -> run -> make, which outputs:
'make' is not reco..
I would like to introduce multithreading feature in my shell script.
I have a script which calls the function read_cfg() with different arguments.
Each of these function calls are independent.
Would..
I found a lot of questions about how to resize the form when a child control resizes, but I'm trying to do something much simpler (maybe so simple people don't even ask it :| )
I'd like to automatica..
We were asked to set up an automated upload from one of our servers to an SFTP site. There will be a file that is exported from a database to a filer every Monday morning and they want the file to be ..
I 'm currently building a full background image layout and I want to change the image based on which page the user is visiting. To get to the point: I need to change a images attribute when the user c..
This is the main error that I get when I try to run my ARDUINO program. The full list of errors is as follows:
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
..
I would like to let the user choose their options after a button is clicked. For example, showing two buttons, "Restart Now" and "Restart Later" in a modal popup window would be my preference. Using a..
I've seen many tutorials online that says you need to check $_SERVER['HTTPS'] if the server is connection is secured with HTTPS. My problem is that on some of the servers I use, $_SERVER['HTTPS'] is a..
I'm looking for a fast and secure way to add and remove classes from an html element without jQuery.
It also should be working in early IE (IE8 and up)...
I am trying to add
<location inheritInChildApplications="false">
to my parent web application's web.config but it doesn't seem to be working.
My parent's web.config has:
<configuration&g..
This is ugly. What's a more Pythonic way to do it?
import datetime
t= (2010, 10, 2, 11, 4, 0, 2, 41, 0)
dt = datetime.datetime(t[0], t[1], t[2], t[3], t[4], t[5], t[6])
..
I'm trying to set up my Nexus 7 (2013) for debugging, but I am getting stuck at the step where you install the USB driver. Here's what I've tried so far:
Steps taken:
Turned on debugging mode on N..
How to pass an array into a SQL Server stored procedure?
For example, I have a list of employees. I want to use this list as a table and join it with another table. But the list of employees should b..
When I multiply two numpy arrays of sizes (n x n)*(n x 1), I get a matrix of size (n x n). Following normal matrix multiplication rules, a (n x 1) vector is expected, but I simply cannot find any info..
I am trying to convert from an int to a string but I am having trouble. I followed the execution through the debugger and the string 'myT' gets the value of 'sum' but the 'if' statement does not work..
I am running an ASP.NET 2.0 application in IIS 6.0. I want session timeout to be 60 minutes rather than the default 20 minutes. I have done the following
Set <sessionState timeout="60"></se..
Possible Duplicate:
Calculating the Difference Between Two Java Date Instances
In Java, I want to calculate the number of days between two dates.
In my database they are stored as a DATE d..
How would do the following in SQL
"select dept names who have more than 2 employees whose salary is greater than 1000" ?
DeptId DeptName
------ --------
1 one
2 two
3 three
..
I'm building a web application using Visual Studio 2012.
I'm attempting to add word count into my textbox.
However after adding the the javascript codes and the html codes. I receive the error as st..
I'd like to set up a multidimensional list.
For reference, I am working on a playlist analyzer.
I have a file/file-list, which my program saves in a standard list. One line from the file in each list..
Is it possible to make a CSS grid wrap without using media queries?
In my case, I have a non-deterministic number of items that I want placed in a grid and I want that grid to wrap. Using Flexbox, I'..
It is possible to add and remove elements from an enum in Java at runtime?
For example, could I read in the labels and constructor arguments of an enum from a file?
@saua, it's just a question of ..
This is similar to this question:
How to convert int[] to Integer[] in Java?
I'm new to Java. How can i convert a List<Integer> to int[] in Java? I'm confused because List.toArray() actually re..
In my web app I'm using Newtonsoft.Json and I have following object
[Newtonsoft.Json.JsonObject(Title = "MyCar")]
public class Car
{
[Newtonsoft.Json.JsonProperty(PropertyName = "name")]
publ..
How do I read data from a DataSet in WPF? I have a train schedule table with just 2 columns and I want to be able to read the departure times and calculate when the next train is leaving. For example,..
Is there a smart way to go back last page in Angular 2?
Something like
this._router.navigate(LASTPAGE);
For example, page C has a Go Back button,
Page A -> Page C, click it, back to page A.
Page..
I'm confused on button styles for material design. I'd like to get colorful raised buttons like in the attached link., like the "force stop" and "uninstall" buttons seen under the usage section. Are t..
I'm trying to cast a CHARACTER VARYING column to a DATE but I need a date format like this : DD/MM/YYYY. I use the following SQL query :
ALTER TABLE test
ALTER COLUMN date TYPE DATE using to_date(da..
I would like to increment two variables in a for-loop condition instead of one.
So something like:
for (int i = 0; i != 5; ++i and ++j)
do_something(i, j);
What is the syntax for this?..
Currently I have an input box which will detect the URL and parse the data.
So right now, I am using:
var urlR = /^(?:([A-Za-z]+):)?(\/{0,3})([0-9.\-A-Za-z]+)
(?::(\d+))?(?:\/([^?#]*))?(?..
I created a new project in Visual Studio 2010 and noticed that there are now two new folders named obj and bin in my project directory.
A similar pair of folders are created when building and debuggi..
I am creating a JFrame and I call the method setSize(500, 500). Now the desired behaviour is that JFrame should not be resized by user in any condition. Either by maximizing or by dragging the borders..
I had some uncommitted changes in my development branch and I stashed them using git stash, but there were some changes which were very important among those stashed ones. Is there any way to get back..
I am just starting to mess around with Angular 2 and I wonder if anyone can tell me the best way to dynamically add and remove event listeners from elements.
I have a component set up. When a certain..
I have been using the twitter bootstrap framework for quite a while now and they recently updated to version 3!
I'm having trouble getting the sticky footer to stick to the bottom, I have used the st..
html5 supports the placeholder attribute on input[type=text] elements, but I need to handle non-compliant browsers. I know there are a thousand plugins out there for placeholder but I'd like to create..
I am new to angular js. In my code there is color picker initialized from a text field. User changes the value of color and I want that color to be reflected as a background of a text in a span. It is..
I am running Python3.4 on Windows 7. I am trying to use the Python interface for graphviz. This is a script I intend to run:
from graphviz import Digraph
import pydotplus
dot = Digraph(comment='The ..
I am using MySQL with Spring JDBC template for my web application. I need to store phone number with only digits (10). I am little bit confused about data type using data type.
What is preferable da..
https://cwiki.apache.org/confluence/display/Hive/HiveClient#HiveClient-Python appears to be outdated.
When I add this to /etc/profile:
export PYTHONPATH=$PYTHONPATH:/usr/lib/hive/lib/py
I can then..
Does anybody encounter this warning when executing python setup.py install of a PyPI package?
install_requires defines what the package requires. A lot of PyPI packages have this option. How can it b..
I would like to reverse the order of this code's list items. Basically it's a set of years going from oldest to recent and I am trying to reverse that output.
<?php
$j=1;
foreach ( $s..
update in java9: https://docs.oracle.com/javase/9/docs/api/java/io/InputStream.html#transferTo-java.io.OutputStream-
I saw some similar, but not-quite-what-i-need threads.
I have a server, which wil..
I have following code
div {
width:200px;
border-bottom:1px solid magenta;
height:50px;
}
DEMO
The div width is 200px so border-bottom is also 200px but what should I do if I want bord..
When using LINQ to get data from a list I encounter this error. How can this be fixed?
Value cannot be null. Parameter name: source
var nCounts = from sale in sal
select new
..
I have a type:
public class Human
{
public int Id { get; set; }
public string Address { get; set; }
public string Name { get; set; }
public List<ContactNumber> ContactNumbers {..