I'm a beginner in python. I'm not able to understand what the problem is?
def list_benefits():
s1 = "More organized code"
s2 = "More readable code"
s3 = "Easier code reuse"
..
I am not able to create a simple 3D sphere using the OpenGL library function glutSolidSphere() in C++.
Here's what I tried:
#include<GL/glu.h>
void display()
{
glClear(GL_COLOR_BUFFER_B..
I recently updated the Android Studio to it's latest version, and now I am experiencing a headache with an exception in Gradle build.
Every time I run the project, two or three times before it succee..
I have View in which there are two text boxes, and the user can select text color from another view on the same screen (through dialog box).
So when the user changes color via dialog box, I am changi..
I don't know what to do! I have a great understanding of C basics. Structures, file IO, strings, etc. Everything but CLA. For some reason I cant grasp the concept. Any suggestions, help, or advice. PS..
I don't know when attribute should be private and if I should use property.
I read recently that setters and getters are not pythonic and I should use property decorator.
It's ok.
But what if I hav..
In a cell in Excel sheet I have a Date value like:
01/01/2010 14:30:00
I want to convert that Date to Text and also want the Text to look exactly like Date. So a Date value of 01/01/2010 14:30:00 s..
How do I write a regex to match any string that doesn't meet a particular pattern? I'm faced with a situation where I have to match an (A and ~B) pattern...
I'm calling this function from my asp.net form and getting following error on firebug console while calling ajax.
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote ..
I was wondering if there is a way to change the color on the bullets in a list.
I have a list like this:
<ul>
<li>House</li>
<li>Car</li>
<li>Garden<..
This looks very simply, but I can't figure it out. I'm using the jquery validate plugin. I'm trying to validate <input name=first> and <input name=second> to output the error messages into..
I run scripts against my database like this...
psql -d myDataBase -a -f myInsertFile.sql
The only problem is I want to be able to specify in this command what schema to run the script against. I c..
How can you run GUI applications in a Docker container?
Are there any images that set up vncserver or something so that you can - for example - add an extra speedbump sandbox around say Firefox?..
I have real difficulties with enabling mbstring extension on my localhost.
I'm using XAMPP 1.7.4, for Windows, which has PHP 5.3.5, and tried to edit my php.ini file according to the documentation a..
I am writing a SQL query creator using some parameters. In Java, it's very easy to detect the last element of an array from inside the for loop by just checking the current array position with the arr..
By installing the package in R using the following command:
install.packages('FILE_PATH', repos=NULL, type = "source")
I got the following error:
Installing package into ‘/home/p/R/x86_64-pc-..
I want to find the longest VARCHAR in a specific column of a SQL Server table.
Here's an example:
ID = INT IDENTITY
DESC = VARCHAR(5000)
ID | Desc
---|-----
1 | a
2 | aaa
3 | aa
What's the SQL..
I am having this issue in Android studio.
Error:Failed to resolve: com.android.support:appcompat-v7:27.+
<a href="install.m2.repo">Install Repository and sync project</a><br><a h..
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..
I have two jobs in jenkins, both of which need the same parameter.
How can I run the first job with a parameter so that when it triggers the second job, the same parameter is used?..
I have a series of 20 plots (not subplots) to be made in a single figure. I want the legend to be outside of the box. At the same time, I do not want to change the axes, as the size of the figure ge..
I have a route setup like this:
var myApp = angular.module('myApp', []).
config(['$routeProvider', function ($routeProvider) {
$routeProvider.
when('/landing', {
templateU..
I have written some code in Python that checks for an MD5 hash in a file and makes sure the hash matches that of the original.
Here is what I have developed:
# Defines filename
filename = "file.e..
The documentation basically says that range must behave exactly as this implementation (for positive step):
def range(start, stop, step):
x = start
while True:
if x >= stop: return
yie..
I want to replace the contents within a html element so I'm using the following function for that:
function ReplaceContentInContainer(id,content) {
var container = document.getElementById(id);
..
Does java.util.List.isEmpty() check if the list itself is null, or do I have to do this check myself?
For example:
List<String> test = null;
if (!test.isEmpty()) {
for (String o : test) {..
Which is the best implementation(in terms of speed and memory usage) for iterating through a Perl array? Is there any better way? (@Array need not be retained).
Implementation 1
foreach (@Array)
{
..
I have a string, which I have split using the code $CreateDT.Split(" "). I now want to manipulate two separate strings in different ways. How can I separate these into two variables?..
I'm using Twitter Bootstrap 2.0.1 in a Rails 3.1.2 project, implemented with bootstrap-sass. I'm loading both the bootstrap.css and the bootstrap-responsive.css files, as well as the bootstrap-collaps..
What's a clean and efficient JavaScript implementation to strip leading and trailing spaces from a string?
For example:
" dog"
"dog "
" dog "
" dog "
all get turned into
"dog"..
I'm trying to set the value of the hidden field below using jQuery.
<input type="hidden" value="" name="testing" />
I'm using this code:
var test = $("input[name=testing]:hidden");
test.valu..
I know about AJAX cross-domain policy.
So I can't just call "http://www.google.com" over a ajax HTTP request and display
the results somewhere on my site.
I tried it with dataType "jsonp", that actua..
What is the SQL Server SYSNAME data type for? BOL says:
The sysname data type is used for
table columns, variables, and stored
procedure parameters that store object
names.
but I don't rea..
I'm puzzled with dependencies. I want to be able to replace some function calls with mock ones. Here's a snippet of my code:
func get_page(url string) string {
get_dl_slot(url)
defer free_dl_s..
I have the latest 64 bit version of PostgreSQL. I am running Win 7 64 bit. I had installed the ODBC driver (via the initial installer) when I installed PG, and upgraded it to the latest version from h..
Normally, I’d set the interval to a variable and then clear it like var the_int = setInterval(); clearInterval(the_int); but for my code to work I put it in an anonymous function:
function interval..
I am trying to send a GET message that contains strings with ampersands and can't figure how to escape the ampersand in the URL.
Example:
http://www.example.com?candy_name=M&M
result => candy..
I would like to know the command to perform a mysqldump of a database without the prompt for the password.
REASON:
I would like to run a cron job, which takes a mysqldump of the database once everyda..
This has always confused me. It seems like this would be nicer:
my_list = ["Hello", "world"]
print(my_list.join("-"))
# Produce: "Hello-world"
Than this:
my_list = ["Hello", "world"]
print("-".joi..
I started using PHP a couple of months ago. For the sake of creating a login system for my website, I read about cookies and sessions and their differences (cookies are stored in the user's browser an..
Possible Duplicate:
SQL group_concat function in SQL Server
I am looking to create a query but somehow I am unable to do so. Can anyone please help me out here?
The original data
ID Re..
I have a string like this:
/var/cpanel/users/joebloggs:DNS9=domain.com
I need to extract the username (joebloggs) from this string and store it in a variable.
The format of the string will always..
I'm new to MySQL, and I'm really confused about the different terms that I've encountered. I tried googling the answer but the results are really confusing and when I try and understand it just seems ..
Suppose my site's url is given as hyperlink on some page on the internet; that page could be anything on internet - blog, orkut, yahoo, even stackoverflow etc, and someone clicks on it,and visited my ..
What is the difference between WPF's ListBox and ListView? I can not find any significant difference in their properties. Is there different typical use?..
So I am trying to open websites on new tabs inside my WebDriver. I want to do this, because opening a new WebDriver for each website takes about 3.5secs using PhantomJS, I want more speed...
I'm usin..
I have a TextBlock in WPF. I write many lines to it, far exceeding its vertical height. I expected a vertical scroll bar to appear automatically when that happens, but it didn't. I tried to look for a..
As I understand, Python 2.7.9 comes with Pip installed, however when I try to execute a Pip command from CMD (Windows) I get the following error:
'pip' is not recognized as an internal or external c..
I have noticed that some applications change their controls position to adjust them as much as possible in the resolution as possible, If window is maximized they set themselves in such a way that ove..
Is there a way to install the win32api module for python 3.6 or do I have to change my version of python?
Everytime I try to install it using pip I get the following error:
Could not find a version ..
I want to run my application from IIS on my local machine. I created the virtual directory and added the application to it and in the properties folder of the application I checked the radio button 'U..
I just learned that MySQL has a native CSV storage engine which stores data in a Comma-Separated-Value file per table.
Is it possible to create a table directly from a uploaded CSV file, something li..
In order to make a simple game, I used a template that draws a canvas with bitmaps like this:
private void doDraw(Canvas canvas) {
for (int i=0;i<8;i++)
for (int j=0;j<9;j++)
..
I have a form that allows me with
<input type="file" name="filename" accept="image/gif, image/jpeg, image/png">
to browse and select a file.
What I want to do is display that image immediat..
I have a query that counts the price of all items between two dates. Here is the select statement:
SELECT SUM(Price) AS TotalPrice
FROM Inventory
WHERE (DateAdded BETWEEN @StartDate AND @EndDate)
..
I have completed an application I have made in Visual Studio 14.0, but when I tried to publish the program, I get an error as Visual Studio cannot find 'SignTool.exe'. I have searched my Hard drive a..
See below the solid line for my original question.
I have a folder in my local directory that is untracked. When I run git status, I get:
Changed but not updated:
modified: vendor/plugins/open_fla..
How can I remove some specific elements from a numpy array? Say I have
import numpy as np
a = np.array([1,2,3,4,5,6,7,8,9])
I then want to remove 3,4,7 from a. All I know is the index of the value..
Assume active is a "boolean field" (tiny int, with 0 or 1)
# Find all active users
select * from users where active
# Find all inactive users
select * from users where NOT active
In words, can t..
Please can someone help me on the best way to import an excel 2007 (.xlsx) file into R. I have tried several methods and none seems to work. I have upgraded to 2.13.1, windows XP, xlsx 0.3.0, I don't ..
I want to get the value of HashMap based on key.
HashMap<String, ArrayList<String>> map
= new HashMap<String, ArrayList<String>>();
ArrayList<String> arrayList = ne..
What exactly do *args and **kwargs mean?
According to the Python documentation, from what it seems, it passes in a tuple of arguments.
def foo(hello, *args):
print hello
for each in args:
..
I am doing a find and then getting a list of files. How do I pipe it to another utility like cat (so that cat displays the contents of all those files) and basically need to grep something from these ..
One of my favourite tools for linux is lsof - a real swiss army knife!
Today I found myself wondering which programs on a WinXP system had a specific file open. Is there any equivalent utility to lso..
I'm creating a Jersey client for a GET service that has a List as query parameter. According to the documentation, it's possible to have a List as a query parameter (this information is also at @Query..
I'm new to both C# and Selenium WebDriver.
I know how to select/click on an option in a drop-down list, but I've a problem before that. Since the drop-down list is dynamically generated, I have to g..
Possible Duplicate:
Why does Oracle 9i treat an empty string as NULL?
I have a table in Oracle 10g named TEMP_TABLE with only two columns - id and description just for the sake of demonstra..
I know that in most programming scenarios, the preference is for empty collections to null collections when there are 0 elements. However, most languages that consume JSON (like JavaScript) will trea..
I am trying to print out all the elements of a List, however it is printing the pointer of the Object rather than the value.
This is my printing code...
for(int i=0;i<list.size();i++){
System..
I'm learning sql from a book and I'm trying to write a stored procedure but I don't believe that I'm doing it correctly. Is the following way not valid in Microsoft SQL? If not, when is it valid, if e..
Here is my media query:
@media screen and (min-device-width: 768px) and (max-device-width: 1824px) and (orientation : portrait){
.hidden-desktop {
display: inherit !important;
}
.visible-de..
I am working on a web application developed using Java and AngularJS and chose to implement token authentication and authorization.
For the exercise purpose, I've come to the point where I send the cr..
function leapYear(year){
var result;
year = parseInt(document.getElementById("isYear").value);
if (years/400){
result = true
}
else if(years/100){
result = false
..
I've been searching for a "lightbox" type solution that allows this but haven't found one yet (please, suggest if you know of any).
The behavior I'm trying to recreate is just like what you'd see at ..
I get an error when I try to create an array from the variables I declared.
int row = 8;
int col= 8;
int [row][col];
Why do I get this error:
expression must have a constant value.
..
I'm showing a confirmation alert box through JavaScript:
function checked() {
if (hdnval.toLowerCase() != textbox1.toLowerCase()) {
var save = window.confirm('valid')
if (save == true)
{
..
I need to add a new path (sumatraPDF) on my PATH variable.
I don't know why it does not work...
I think everything is right but when I try to execute sumatrapdf.exe from CMD it cannot find the program..
I am trying to write a simple application that gets updated. For this I need a simple function that can download a file and show the current progress in a ProgressDialog. I know how to do the Progress..
I'm new to java (& to OOP too) and I'm trying to understand about the class ArrayList
but I don't understand how to use the get(). I tried searching in net, but couldn't find anything helpful...
Here's my situation.
I have followed the exact instructions on wordpress codex page about moving a site to another server.
Here are the step's i have taken.
Export a copy of my database
Make a new d..
How do I tell Eclipse to automatically make suggestions as I type? I'm looking for a Visual Studio Intellisense-like feature with Resharper.
Currently I have to press CTRL+Space each time...
How can you check if a network socket (System.Net.Sockets.Socket) is still connected if the other host doesn't send you a packet when it disconnects (e.g. because it disconnected ungracefully)?..
I am using a script in Python to collect data from a PIC microcontroller via serial port at 2Mbps.
The PIC works with perfect timing at 2Mbps, also the FTDI usb-serial port works great at 2Mbps (both..
How do you connect to a MySQL database in Java?
When I try, I get
java.sql.SQLException: No suitable driver found for jdbc:mysql://database/table
at java.sql.DriverManager.getConnection(DriverM..
I'm currently learning C++ and I've learned about the incrementation a while ago.
I know that you can use "++x" to make the incrementation before and "x++" to do it after.
Still, I really don't know ..
I need to write a standalone ruby script that is supposed to deal with database. I used code given below in rails 3
@connection = ActiveRecord::Base.establish_connection(
:adapter => "mysql2",
:ho..
Is it possible to remove the # symbol from angular.js URLs?
I still want to be able to use the browser's back button, etc, when I change the view and will update the URL with params, but I don't want..
I need to solve a java problem for an interview, and they have sent me the test class. It starts with
import org.junit.Before;
and also has the following syntax at places:
@RunWith(JUnit4.class)
..
I want my html file to show the code, but not the output of this chunk:
```{r echo=True, include=FALSE}
fun <- function(b)
{
for(a in b)
{print(a)
return(a * a)}
}
y &l..
I'm relatively new to node.js and it's addons, so this is probably a beginnersquestion.
I'm trying to get a simple HTML page on a webserver connect to a different server running node.js with websocke..
I am having a little confusion about the various ways to print (echo) to the console. I have seen that there are multiple ways to write output to the console, such as:
Write-Host "Hello world1"
"Hell..
I have this configuration:
development:
adapter: mysql2
encoding: utf8
database: my_db_name
username: root
password: my_password
host: mysql://127.0.0.1:3306
And I am getting this error..
I am running vagrant 1.4 and virtual box 4.3 on fedora 17 machine. When I do "vagrant up", I get this error:
Bringing machine 'default' up with 'virtualbox' provider... ..
I'm really new to HTML5 for mobile. I use jQuery Mobile for my current app and I have some problems hiding the navigation bar.
I found this site: http://m.somethingborrowedmovie.warnerbros.com/. (I d..
I'm trying to do a simple git clone https://github.com/org/project.git on a CentOS box but get:
error: The requested URL returned error: 401 while accessing
https://github.com/org/project.git/in..
I need to connect to a Oracle DB (external) through Visual Studio 2010. But I dont want to install Oracle on my machine.
In my project I referenced: System.Data.OracleClient. But its not fulfilling t..
I want to use user.dir dir as a base dir for my unit tests (that creates a lot of files). Is it correct that this property points to the current working directory (e.g. set by the 'cd' command)?..
I'm new to R, and after researching this error extensively, I'm still not able to find a solution for it. Here's the code. I've checked my working directory, and made sure the files are in the right ..
I am looking to do the opposite of what has been done here:
import re
text = '1234-5678-9101-1213 1415-1617-1819-hello'
re.sub(r"(\d{4}-){3}(?=\d{4})", "XXXX-XXXX-XXXX-", text)
output = 'XXXX-XXXX..
May be this is silly question. I want to get rid of the fractional part of the Double number. But I cant do that. It shows the error that incompatible types. What to do?
Double to int conversion in o..
I am basing my question and example on Jason's answer in this question
I am trying to avoid using an eventListener, and just to call handleClick onsubmit, when the submit button is clicked.
Absolute..
Consider:
#div p {
color: red !important;
}
...
#div p {
color: blue;
}
I understand how !important works. In this case the div will render red because now it has priority (!important). But..
I'm trying to compile my excel addin using C# 4.0, and started to get this problem when building my project in Visual Studio. It's important to tell you that I haven't had this problem before. What co..
Say I want to get https://golang.org programatically. Currently golang.org (ssl) has a bad certificate which is issued to *.appspot.com So when I run this:
package main
import (
"log"
"net/h..
What is the difference between the following codes?
code1:
var=2**2*3
code2:
var2=2*2*3
I see no difference.
This raises the following question.
Why is the code1 used if we can use code2?..
I'm trying to use Eloquent to perform the following query during a database seed:
SELECT
*
FROM
customers
LEFT JOIN
orders
ON customers.id = orders.customer_id
WHERE
orders.custom..
I have a problem on this error message, when i try this:
INSERT INTO `PROGETTO`.`UFFICIO-INFORMAZIONI` (`ID`, `viale`, `num_civico`,
`data_apertura`, `data_chiusura`, `orario_apertura`, `orario_chi..
Does Rails 3 or Ruby have a built-in way to check if a variable is an integer?
For example,
1.is_an_int #=> true
"[email protected]".is_an_int #=> false?
..
I am currently writing a desktop application, but I cannot seem to get my head around what to use when redirecting someone to a new section of the application.
My options appear to be
Window
Page
U..
Is it possible to use multiple left joins in sql query?
LEFT JOIN
ab
ON
ab.sht = cd.sht
i want to add to attach one more query like this to it?
will it work?
LEFT JOIN..
I have a table that contains a Xml column:
SELECT *
FROM Sqm
A sample of the xml data of a row would be:
<Sqm version="1.2">
<Metrics>
<Metric id="TransactionCleanupThread...
I have a SQL query that takes a date parameter (if I were to throw it into a function) and I need to run it on every day of the last year.
How to generate a list of the last 365 days, so I can use st..
I've been using Twitter Bootstrap to build a site, and a lot of its functionality depends on wrapping things in <a>, even if they're just going to execute Javascript. I've had problems with the ..
I am adding checkboxes on JPanel in FlowLayout the checkboxes are being added horizontally.
I want to add checkboxes vertically on the Panel. What is the possible solution?..
Can anybody show me how to generate Javadoc from command line?
My project contains the package com.test and I want to put the generated documentation in files located in a specific folder like this: ..
why
getRequestDispatcher(String path) of
the ServletRequest interface cannot
extend outside the current servlet
context
where as
getRequestDispatcher(String path) of
the ServletCon..
I am currently studying Java and have recently been stumped by angle brackets(<>). What exactly do they mean?
public class Pool<T>{
public interface PoolFactory<T>{
public ..
How to remove a blank page that gets added automatically after \part{} or \chapter{} in a book document class?
I need to add some short text describing the \part. Adding some text after the part comm..
I'm using jQuery DataTables and I would like to know if there's possible to disable automatic sorting on the first column of the table?
My code looks like this:
/* Default class modification..
I have a reporting spreadsheet that grabs some data from a database and forms three sheets of summary report information. I want to run the spreadsheet automatically from the command line, and have it..
I have a <select> element in HTML. This element represents a drop down list. I'm trying to understand how to iterate through the options in the <select> element via JQuery.
How do I use J..
I don't understand the following from pep-0404
In Python 3, implicit relative imports within packages are no longer
available - only absolute imports and explicit relative imports are
supporte..
Using C++, and hopefully the standard library, I want to sort a sequence of samples in ascending order, but I also want to remember the original indexes of the new samples.
For example, I have a set, ..
I'd like to programmatically modify my app.config file to set which service file endpoint should be used. What is the best way to do this at runtime? For reference:
<endpoint address="http://myd..
How do I get the current route in Symfony 2?
For example, routing.yml:
somePage:
pattern: /page/
defaults: { _controller: "AcmeBundle:Test:index" }
How can I get this somePage value?..
I'd like to be able to use the result of the last executed command in a subsequent command. For example,
$ find . -name foo.txt
./home/user/some/directory/foo.txt
Now let's say I want to be able to..
I open urls with:
site = urllib2.urlopen('http://google.com')
And what I want to do is connect the same way with a proxy
I got somewhere telling me:
site = urllib2.urlopen('http://google.com', prox..
This question has nothing to do with git itself; rather, it has to do with removing a binding/mapping to a git repository that Visual Studio 2015 (VS2015) has previously seen.
Here's a screen shot of..
I am developing under Android 1.6 (Android SDK 2.1).
I create a avd by using avd manager in Eclipse.
When I launch this avd, I found that the /sdcard directory's permisson is "d---------".
So I can't ..
I have just discovered the new Java 8 stream capabilities. Coming from Python, I was wondering if there was now a neat way to do operations on arrays like summing, multiplying two arrays in a "one lin..
For some of my Java NIO connections, when I have a SocketChannel.write(ByteBuffer) call, it throws an IOException: "Broken pipe".
What causes a "broken pipe", and, more importantly, is it possible to..
I keep stumbling on the format specifiers for the printf() family of functions. What I want is to be able to print a double (or float) with a maximum given number of digits after the decimal point. ..
How can I query git to find out which branches contain a given commit? gitk will usually list the branches, unless there are too many, in which case it just says "many (38)" or something like that. I ..
How can we get the difference between two git repositories?
The scenario:
We have a repo_a and repo_b. The latter was created as a copy of repo_a. There have been parallel development in both the rep..
var i;
for(i=10; i>=0; i= i-1){
var s;
for(s=0; s<i; s = s+1){
document.write("*");
}
//i want this to print a new line
/document.write(?);
}
I am printing a pyramid of sta..
Does a Python equivalent to the Ruby ||= operator ("set the variable if the variable is not set") exist?
Example in Ruby :
variable_not_set ||= 'bla bla'
variable_not_set == 'bla bla'
variable_s..
I'm getting this error if i try to login as db user. If lsnrctl status is run i get the below error. DB was working fine all these years and stopped working suddenly.
Connecting to (DESCRIPTION=(ADDR..
The code pasted below was taken from java docs on HttpURLConnection.
I get the following error:
readStream(in)
as there is no such method.
I see this same thing in
the Class Overview for URLC..
It amazes me that JavaScript's Date object does not implement an add function of any kind.
I simply want a function that can do this:
var now = Date.now();
var fourHoursLater = now.addHours(4);
fun..
Is there a way to see what would be pushed if I did a git push command?
What I'm picturing is something like the "Files Changed" tab of Github's "pull request" feature. When I issue a pull request, I..
I'm building an ASP.NET website - it's a solution with a few projects, a data base and a web service. Everything worked fine, but last time I tried to run the project, I got the following error:
Ther..
I would like to make one of my methods "deprecated" = not used anymore.
But still I would like to have it in my API. I just want to show "warning" to anyone using that method.
How can I achieve that..
I am trying to add a feature of csv download option in my website. It should convert the html table present in the website in to csv content and make it downloadable. Ive been searching through intern..
This question may have been asked before but no it was not definitively answered. How exactly does one post raw whole JSON inside the body of a Retrofit request?
See similar question here. Or is this..
I have two columns- column A which extends upto 11027(values) and column I which extends to 42000(values).Both the columns contains some code details.
Something like this
A B
q123 ..
Are there good reasons why it's a better practice to have only one return statement in a function?
Or is it okay to return from a function as soon as it is logically correct to do so, meaning there ..
I am trying to send an email using JavaMail through gmails SMTP Server. however this code.
final String username = "[email protected]";
final String password = "mygmailpassword";
Properties ..
I would like to see test results ( system.out/err, log messages from components being tested ) as they run in the same console I run:
gradle test
And not wait until tests are done to look at the te..
I had created a project which is C# console application project for which I need to call this project dll in another windows application project. I had built the project in visual studio 2010 and chec..
I am not very experience with java and this is driving me crazy. I wrote a java program FileManagement and I need to run it from the command line.
I can compile it from the command line with javac Fi..
I got this list:
words = ['how', 'much', 'is[br]', 'the', 'fish[br]', 'no', 'really']
What I would like is to replace [br] with some fantastic value similar to <br /> and thus getting..
I did the upgrade according to.
http://www.asp.net/mvc/tutorials/mvc-5/how-to-upgrade-an-aspnet-mvc-4-and-web-api-project-to-aspnet-mvc-5-and-web-api-2
I get the error. Does any one else got this er..
I'm running SQL that needs rounding up the value to the nearest whole number.
What I need is 45.01 rounds up to 46. Also 45.49 rounds to 46. And 45.99 rounds up to 46, too. I want everything up one w..
Both queries below translates to the same number
SELECT CONVERT(bigint,CONVERT(datetime,'2009-06-15 15:00:00'))
SELECT CAST(CONVERT(datetime,'2009-06-15 23:01:00') as bigint)
Result
39978
39978
..
I am trying to send mail using gmail, and I am getting an exception that is The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue ..
I have a server that is capable of creating and running an Excel Import task using the Import Wizard. I am trying to automate that process by using a visual Studio 2010 Integration Services package, t..
I'm trying to storage 5000 data elements on an array. This 5000 elements are storage on an existent file (therefore it's not empty).
But I'm getting an error and I don't know what is causing it.
I..
In my android app i want to get user current location every few minute interval and update in to my center server using web service.
Currently i am using Fused Location Provide for get user current lo..
I have an ASP.NET MVC (beta) application that I'm working on, and am having trouble figuring out if I'm doing something wrong, or if my Application_Start method in Global.asax.cs is in fact not firing..
I need to write the following data into a text file using JSON format in C#. The brackets are important for it to be valid JSON format.
[
{
"Id": 1,
"SSN": 123,
"Message": "whatever"
..
I have a select2 v4.0.0 being populated from an Ajax array. If I set the val of the select2 I can see via javascript debugging that it has selected the correct item (#3 in my case), however this is no..
If I have a util class with static methods that will call Hibernate functions to accomplish basic data access. I am wondering if making the method synchronized is the right approach to ensure thread-s..
Well, I've been searching few days already, how to display HTML5 video in full-screen mode on android WebView.
I managed to play HTML5 videos on my webview. Problems are arising when displaying video..
I am working on a corporate network.
Trying to install npm. But I'm getting this error again and again.
$ npm install
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe..
I've spent some time trying to figure out what is wrong but as I could not find out, I decided to ask here.
I am running MongoDB(Windows 64-bit 2008 R2+) version 3.2.3 on Windows 8, the paths are :
..
I have gone through configuration documentation on ASP.NET core. Documentation says you can access configuration from anywhere in the application.
Below is Startup.cs created by template
public clas..
Ran across this line of code:
FormsAuth = formsAuth ?? new FormsAuthenticationWrapper();
What do the two question marks mean, is it some kind of ternary operator?
It's hard to look up in Google...
The two entities are one-to-many relationship (built by code first fluent api).
public class Parent
{
public Parent()
{
this.Children = new List<Child>();
}
public int ..
Once the user is on my page, I do not want him to refresh the page.
Anytime, the user hits F5 or refresh button on top. He should get an alert saying
You cannot refresh the page.
Also if the user ..
I am using Primefaces 3.4.2.
I have the following in my JSF page
<p:selectOneMenu id="emp" value="#{mymb.emp.employeeName}"
valueChangeListener="#{mymb.handleChange}"
required="..
Hi I would like to remove the 'required=""' attribute with jquery.
<input
type="text"
id="edit-submitted-first-name"
name="submitted[first_name]"
value=""
size="30"
maxleng..
I have the following HTML:
<button name="btnG" class="gbqfb" aria-label="Google Search" id="gbqfb"><span class="gbqfi"></span></button>
My following code for clicking "Googl..
Does anyone know of an easy way to create a script that can connect to a telnet server, do some usual telnet stuff, and then log off? I am dealing with users who are not familiar with telnet and the ..
I am trying to compile a simple VS program in C++ as an assignment for class. We only ever include <iostream> and I keep getting this error:
1>Assignment.cpp(15): fatal error C1010: unexpect..
I'm using the underscore.js templating function and have done a template like this:
<script type="text/template" id="gridItem">
<div class="griditem <%= gridType %> <%= gridSiz..
Is there a way that one can cause CakePHP to dump its SQL log on demand? I'd like to execute code up until a point in my controller and see what SQL has been run...
I am trying to create facebook sign-in page according to this tutorial. I only changed the two lines
appId : '370675846382420', // App ID
channelUrl : '//http://bp.php5.cz/channel.html', // Cha..
This may seem like a newbie question, but it is not. Some common approaches don't work in all cases:
sys.argv[0]
This means using path = os.path.abspath(os.path.dirname(sys.argv[0])), but this does ..