Given that the TCP connection is already established when the HTTP request is sent, the IP address and port are implicitly known -- a TCP connection is an IP + Port.
So, why do we need the Host header..
I have a custom ListView. This ListView contains 1 Image and 6 TextViews. To retrieve the value I have created a setOnItemClickListener(...). Whenever I click on the ListView how could I actually retr..
Is there a simple selector expression to not select elements with a specific class?
<div class="first-foo" />
<div class="first-moo" />
<div class="first-koo" />
<div class="firs..
I'm having this error come up and I'm not sure why... I've tried to look it up, people are saying to create an object of the class or create the methods as static... but I'm unsure how.
Here's my cod..
Is there a simple way to remove the timezone from a pytz datetime object?
e.g. reconstructing dt from dt_tz in this example:
>>> import datetime
>>> import pytz
>>> dt = da..
I just installed Wireshark, but when I click capture > interfaces, the dialog box appears, but it does not contain my network interface.
When click on capture > interfaces it appears as in the ..
With ui-router, it's possible to inject either $state or $stateParams into a controller to get access to parameters in the URL. However, accessing parameters through $stateParams only exposes paramete..
I having the problem while compiling the my project in eclipse. It was shoving the error The import org.apache.commons cannot be resolved.
Please anyone tell me what does this error tells. and how ..
In my view to get url parameters like this:
date=request.GET.get('date','')
In my url I am trying to pass parameters in this way with the url template tag like this:
<td><a href="{% url..
I have a photo type (not landscape) background image with 979px width by 1200px height. I would like to set it to float left and show 100% full image height fixed, without the need to scroll up/down (..
I have just installed Postgres and have been tinkering with it and various configurations for 1-2 hours.
I am stuck on being unable to change to the postgres-user
$ su - postgres yields the followin..
Question:
If I link in two JavaScript files, both with $(document).ready functions, what happens? Does one overwrite the other? Or do both $(document).ready get called?
For example,
<script type..
I'm receiving a quite deep JSON object string from a service which I must parse to a JSON object and then map it to classes.
How can I transform a JSON string to object in Kotlin?
After that the map..
I'm writing a RESTful API module for an application in PHP, and I'm a bit mixed on the verbs HEAD and OPTIONS.
OPTIONS Used to retrieve the available HTTP verbs for a given resource?
HEAD ..
I'm working on a ASP.Net Core 2.0 project using Entity Framework Core
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.0.1" />
<PackageReference Include="Microsoft.Ent..
I need to be able to extract a string between 2 tags for example: "00002" from "morenonxmldata<tag1>0002</tag1>morenonxmldata"
I am using C# and .NET 3.5...
I need to convert the text in the textbox of my xaml code to an integer value in C#. I am using .NET 4.0 and Visual Studio 2010. Is there a way to do it in xaml tags itself or do i need to write a con..
I'm trying to add all of the calorie contents in my javascript like this:
$(function() {
var data = [];
$( "#draggable1" ).draggable();
$( "#draggable2" ).draggable();
$( "#draggable..
I have the following:
<td>
some text
<div>a div</div>
</td>
I'd like to make the entire <td>...</td> a hyperlink. I'd prefer without the use of JavaScript. ..
I am new to python3, coming from python2, and I am a bit confused with unicode fundamentals.
I've read some good posts, that made it all much clearer, however I see there are 2 methods on python 3, t..
I want to convert a 1-dimensional array into a 2-dimensional array by specifying the number of columns in the 2D array. Something that would work like this:
> import numpy as np
> A = np.array(..
I'm trying to get this Python MYSQL update statement correct(With Variables):
cursor.execute ("UPDATE tblTableName SET Year=%s" % Year ", Month=%s" % Month ", Day=%s" % Day ", Hour=%s" % Hour ", Minu..
I've been trying to get a fix and can't find why the error keeps appearing. Pmin,Pmax,w,fi1 and fi2 have all been assigned finite values
guess=Pmin+(Pmax-Pmin)*((1-w**2)*fi1+(w**2)*fi2)
When i r..
I want to check if a string contains only digits. I used this:
var isANumber = isNaN(theValue) === false;
if (isANumber){
..
}
But realized that it also allows + and -. Basically, I wanna make..
I have this html div tag defined:
<div style="height:100px; width:100px" class="total-title">
first text
</div>
I have jquery code to change its value:
$('div.total-title').html('..
I've an HTML INPUT field.
<input
[(ngModel)]="item.value"
name="inputField"
type="text"
/>
and I want to format its value and use an existing pipe:
....
[(ngModel)]="item.va..
I set up a python code to run Selenium chromedriver.exe. At the end of the run I have browser.close() to close the instance. (browser = webdriver.Chrome()) I believe it should release chromedriver.exe..
Is this how to use AND, OR for RewriteCond on Apache?
rewritecond A [or]
rewritecond B
rewritecond C [or]
rewritecond D
RewriteRule ... something
becomes if ( (A or B) and (C or D) ) rewrite_it.
S..
I want to make a layout that lets me scroll down using constraint layout, but I don't know how to go about it. Should the ScrollView be the parent of the ConstraintLayout like this?
<?xml version=..
I want to apply a binary mask to a color image.
Please provide a basic code example with proper explanation of how the code works.
Also, is there some option to apply a mask permanently so all functio..
I am wondering, how do I append an element to the end of an ArrayList in Java? Here is the code I have so far:
public class Stack {
private ArrayList<String> stringList = new ArrayList<..
I've been using CSS3 transform to rotate images and textboxes with borders in my website.
The problem is that the border look jagged in Chrome, like a (low-resolution) game without Anti-Aliasing. In ..
I want to label my x axis at follows :
pylab.xlabel('metres 10^1')
But I don't want to have the ^ symbol included .
pylab.xlabel('metres 10$^{one}$')
This method works and will superscript lette..
I'm currently writing a little program but I keep getting this error when compiling
error: empty character constant
I realize it's because I'm trying to replace a valid char with empty space c[i..
I need to control the access to views based on users privilege levels (there are no roles, only privilege levels for CRUD operation levels assigned to users) in my MVC 4 application.
As an example; ..
I am getting this error
java.lang.UnsupportedClassVersionError: JVMCFRE003 bad major version; class=map/CareMonths, offset=6
My Eclipse's Java compiler is set to 1.6 and my installed Java SDK in C:\..
I have an application that consists of using ActionBarSherlock in tab mode.I have 5 tabs and the content of each tab is handled using fragments. For tab2 though, I have a fragment the xml file of whic..
In my app I have a EditText with a search Icon on the right side. I used the code given below.
<EditText
android:id="@+id/search"
android:layout_width="0dp"
android:layout..
I am a newbie to C programming. I'm learning by reading the chapters and doing the examples from the book "Teach Yourself C" by Herbert Schildt. I'm trying to run this program in Dev C: #include <..
My problem is that the table in my database is not able to be displayed at the table in my JSP page.
I find this code totally right but dont know y m not getting the output right.
Please tell me wh..
I'm trying to programmatically clear a drop down using the fantastic Select2 library. The drop down is dynamically filled with a remote ajax call using the Select2 query option.
HTML:
<input id="..
I need to perform some action before a popup window(using window.open ) closes.
Something like will be good:
var new_window = window.open('some url')
new_window.onBeforeUnload = function(){ my code}..
I was trying to edit an old commit message as explained here.
The thing is that now, when I try to run rebase -i HEAD~5 it says interactive rebase already started.
So then I try: git rebase --conti..
I was wondering if there is an easy way to strike text within an app widget in Android. In a normal activity, it is pretty easy, using textview flags:
textView.setPaintFlags(textView.getPaintFlags() ..
I want the login and register button in right,and Search button in Center, I searched alot but didn't get any solution.
And also how can I align text area in a proper position.
Here is my html cod..
I need to find all image files from directory (gif, png, jpg, jpeg).
find /path/to/ -name "*.jpg" > log
How to modify this string to find not only .jpg files?..
Can you please describe what the TypeScript language is?
What can it do that JavaScript or available libraries cannot do, that would give me reason to consider it?..
In the Java snippet:
SyndFeedInput fr = new SyndFeedInput();
SyndFeed sf = fr.build(new XmlReader(myInputStream));
List<SyndEntry> entries = sf.getEntries();
the last line generates the warni..
Using ASP.NET, how can I strip the HTML tags from a given string reliably (i.e. not using regex)? I am looking for something like PHP's strip_tags.
Example:
<ul><li>Hello</li></ul..
I have an HTML page from page builder, and it injects style attribute directly to the element. I found it's considered as element.style.
I want to override it using CSS. I can match the element, but ..
Basic question: How do I disassociate a git repo from the origin from which it was cloned?
git branch -a shows:
* master
remotes/origin/HEAD -> origin/master
and I want to remove all knowledg..
I'm now reading documentation on Twitter Bootstrap 3, and tried to follow column ordering as shown in this page but hit the wall. I don't understand why such a code works nor how to correctly specif..
I'm sort of a beginner on the whole web development thing and after researching a lot I still couldn't get this done. Any help is very much appreciated. I'm using latest rails version and bootstrap to..
I need to read the Manifest file, which delivered my class, but when I use:
getClass().getClassLoader().getResources(...)
I get the MANIFEST from the first .jar loaded into the Java Runtime.
My app..
I want my Java application to write HTML code in a file. Right now, I am hard coding HTML tags using java.io.BufferedWriter class. For Example:
BufferedWriter bw = new BufferedWriter(new FileWriter(f..
My question might be simple for you, if you're used to MySQL. I'm used to PostgreSQL SGBD and I'm trying to translate a PL/PgSQL script to MySQL.
Here is what I have :
delimiter //
CREATE TRIGGER p..
I know Bootstrap 3 has a horizontal divider you can place inside of dropdown menus to separate links like this:
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu2">
<l..
There was a post this morning asking about how many people disable JavaScript. Then I began to wonder what techniques might be used to determine if the user has it disabled.
Does anyone know of some..
I need to build a tcp frame with raw binary data, but all examples and tutorials I've found talking about bytes always involve conversion from a string, and that's not what I need.
In short, I need t..
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...
On several occations, I have faced the situation that the default.aspx page on a Site doesn't work. More specifically, a reference to a WebPart and/or Control is throwing a error because the assembly ..
I'm migrating from Eclipse to Intellij Idea. One thing I couldn't figure out yet is autocompletion of the @author JavaDoc tag.
When typing @a in Eclipse, there are two proposals:
@author - author na..
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..
What is the difference between running a Java application withjava -cp CLASSPATH and java -jar JAR_FILE_PATH? Is one of them preferred to the other for running a Java application? I mean which one of ..
I'm using JavaScript with the jQuery library to manipulate image thumbnails contained in a unordered list. When the image is loaded it does one thing, when an error occurs it does something else. I'm ..
When doing:
DELETE FROM `jobs` WHERE `job_id` =1 LIMIT 1
It errors:
#1451 - Cannot delete or update a parent row: a foreign key constraint fails
(paymesomething.advertisers, CONSTRAINT advertise..
How do I pass the command line arguments to an alias? Here is a sample:
alias mkcd='mkdir $1; cd $1;'
But in this case the $xx is getting translated at the alias creating time and not at runtime...
I need to get all the input objects and manipulate the onclick param.
The following does the job for <a> links. Looking for something like this for input tags.
for (var ls = document.links, nu..
I am using the following expression to format my value to show only two decimal points. Which Works fine if the value is not 0. However when the value is 0 it does not show 0.
eg.
Expression used
=..
I do a catalog using Bootstrap 3. When displayed on tablets, the product images look ugly because of their small size (500x500) and a width of 767 pixels in the browser. I want to put the image in the..
I am really looking for either a small code snippet, or a good tutorial on the subject.
I have a C# console app that I will use to somehow add list items to my custom list. I have created a custom c..
I'm new to R and haven't done any programming before...
When I attempt to create a box chart with standard error bars I get the error message mentioned in the title.
I used a script I found on R Coo..
I often see examples in PHP that include.inc files. What is the meaning of .inc? What it is used for? What are the disadvantages and advantages of using it?..
I need to get the OS version with a batch file. I 've seen a lot of examples online, many uses something like this code:
@echo off
ver | find "XP" > nul
if %ERRORLEVEL% == 0 goto ver_xp
if not e..
I am trying to write in a file stored in c:\ drive named vin1.txt
and getting this error .Please suggest!
> ERROR at line 1: ORA-29280: invalid
> directory path ORA-06512: at
> "SYS.UTL_FILE..
I am trying to get the executing assembly version in C# 3.0 using the following code:
var assemblyFullName = Assembly.GetExecutingAssembly().FullName;
var version = assemblyFullName .Split(',')[1].Sp..
I am learning about arrays, and basically I have an array that collects a last name, first name, and score.
I need to write a compareTo method that will compare the last name and then the first name ..
I have an HttpClient that I am using for a REST API. However I am having trouble setting up the Authorization header. I need to set the header to the token I received from doing my OAuth request.
I sa..
I'm building a web app that should play back an RTSP/RTP stream from a server http://lscube.org/projects/feng.
Does the HTML5 video/audio tag support the rtsp or rtp? If not, what would the easiest s..
I have a custom UITableView using UITableViewCells.
Each UITableViewCell has 2 buttons. Clicking these buttons will change an image in a UIImageView within the cell.
Is it possible to refresh each ce..
I'm facing what I think is a simple problem with Hibernate, but can't solve it (Hibernate forums being unreachable certainly doesn't help).
I have a simple class I'd like to persist, but keep getting..
I am getting the below error when I try to run my website.
The website is hosted on Windows 2012 R2.
Config error: This configuration section cannot be used at this path. This happens when the sect..
How do you fix this XCode error :
Code Sign error: The identity 'iPhone Developer' doesn't match any
valid certificate/private key pair in the default keychain
..
I want to know exactly what {} \; and {} \+ and | xargs ... do. Please clarify these with explanations.
Below 3 commands run and output same result but the first command takes a little time and the f..
I keep getting this error while using TypeScript's Angular2-forms framework:
There is no directive with "exportAs" set to "ngForm"
Here's my code
project dependencies :
"dependencies": {
..
My question sounds specific, but I doubt it still can be of a C++ debug issue.
I am using omnet++ which is to simulate wireless network. omnet++ itself is a c++ program.
I encountered a queer phenom..
Just started using Xcode 4.5 and I got this error in the console:
Warning: Attempt to present < finishViewController: 0x1e56e0a0 > on < ViewController: 0x1ec3e000> whose view is not in the w..
I think this should be simple, but I tried a few ideas and none of them worked:
last_row = len(DF)
DF = DF.drop(DF.index[last_row]) #<-- fail!
I tried using negative indices but that also lead ..
I'm new to Laravel and am doing some Laravel 5.3 Passport project with OAuth2.0 password grant. When I curl the API with the params it responds with token. However, in browser it needs an additional s..
I have a list of orders.
I want to select orders based on a set of order statuses.
So essentially select orders where order.StatusCode in ("A", "B", "C")
// Filter the orders based on the order stat..
I tried stopping tomcat. It failed with this message:
Tomcat did not stop in time. PID file was not removed.
I then tried again and got this:
PID file (/opt/tomcat/work/catalina.pid) found but ..
I've got this issue while updating to the latest Support Library version 26.0.0 (https://developer.android.com/topic/libraries/support-library/revisions.html#26-0-0):
Error:(18, 21) No resource f..
Currently have a DataTable, but wish to stream it to the user via a WebHandler. FileHelpers has CommonEngine.DataTableToCsv(dt, "file.csv"). However it saves it to a file. How can I save it to a strea..
I have a set of <li> elements.
<ul>
<li ng-class="{current: selected == 100}">
<a href ng:click="selected=100">ABC</a>
</li>
<li ng-class="{current: ..
I am trying to incorporate Spring-Data-JPA into my project.
One thing that confuses me is how do I achieve setMaxResults(n) by annotation ?
for example, my code:
public interface UserRepository extend..
Is it possible in Hibernate to print generated SQL queries with real values instead of question marks?
How would you suggest to print queries with real values if it is not possible with Hibernate API..
Can anyone tell me how to get the selected item of a ComboBox to a string variable?
string selected = cmbbox.SelectedItem.ToString();
MessageBox.Show(selected);
This gives me System.Data.DataRowVie..
Is there any guideline or standard best practice how to version a software you develop in your spare time for fun, but nevertheless will be used by some people? I think it's necessary to version such ..
I have the following line in a batch file (that runs on an old Windows 2000 box):
7z a QuickBackup.zip *.backup
How do I append the date to the QuickBackup.zip file. So if I ran the batch file toda..
I'm curious, whether there is any way to print formatted numpy.arrays, e.g., in a way similar to this:
x = 1.23456
print '%.3f' % x
If I want to print the numpy.array of floats, it prints several d..
I am making a screen capturing application and everything is going fine. All I need to do is capture the active window and take a screenshot of this active window. Does anyone know how I can do this..
I have two tables in MySQL. Table Person has the following columns:
id | name | fruits
The fruits column may hold null or an array of strings like ('apple', 'orange', 'banana'), or ('strawberry'), ..
I tried working with Apiary and made a universal template to send JSON to mock server and have this code:
package main
import (
"encoding/json"
"fmt"
"github.com/jmcvetta/napping"
"l..
This might sound like too basic of a question, but I have searched for answers and I am more confused now than before.
What does "ours" and "theirs" mean in git when merging my branch into my other b..
How do I test whether an object is an instance of a particular class in Objective-C? Let's say I want to see if object a is an instance of class b, or class c, how do I go about doing it?..
I am new to C#.net MVC and am trying to add FullCalendar to an MVC application.
The FullCalendar script automatically adds ?start={}&end={} to the URL...which is fine, but I have no idea how to..
I'm running a small web application with SQL server express (2005) as backend. I can create a backup with a SQL script, however, I'd like to schedule this on a daily basis. As extra option (should-ha..
If I want to throw away all of my changes, and return to the code that is on the repository, I do the following:
$ rm -fr *
$ svn up
This is easy enough, but I'm wondering if there is a single comm..
I'm developing a Java EE web project. When I try to add a dependency, this error message appears. I use Eclipse Kepler.
An internal error occurred during: "Updating Maven Project". java.lang.NullP..
I just started using the @NotNull annotation with Java 8 and getting some unexpected results.
I have a method like this:
public List<Found> findStuff(@NotNull List<Searching> searchingLi..
I have NetBeans IDE installed on a Windows 7 64-bit machine. Obviously, NetBeans comes with the GlassFish server.
I am currently having problems with a project and would like to check the server log..
I've got a list of datetime objects, and I want to find the oldest or youngest one. Some of these dates might be in the future.
from datetime import datetime
datetime_list = [
datetime(2009, 10,..
I have a current month generated using moment().format('MMM YYYY'). I need to get last six months using this current month.
How to subtract one month using moment.js?..
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 ..
I have a data frame called "newprice" (see below) and I want to change the column names in my program in R.
> newprice
Chang. Chang. Chang.
1 100 36 136
2 120 -33 ..
Since PHP is a dynamic language what's the best way of checking to see if a provided field is empty?
I want to ensure that:
null is considered an empty string
a white space only string is conside..
First of all, my apologies. I know there are various solutions posted for this issue here, but for the life of me I can't get any of them to work.
For a responsive website I'm trying to center an h1..
I have the following in code in my onClick() method as
List<Question> mQuestionsList = QuestionBank.getQuestions();
Now I have the intent after this line, as follows :
Intent resultInten..
I'd like to be able to comment out a single flag in a one-line command. Bash only seems to have from # till end-of-line comments. I'm looking at tricks like:
ls -l $([ ] && -F is turned off) ..
This assembly is in the GAC: Microsoft.SqlServer.Management.RegisteredServers.dll
How can I add a reference to this assembly in Visual Studio?
I can view the file in c:\windows\assembly\..
I am trying to call a method of second controller in first controller by using scope variable. This is a method in my first controller:
$scope.initRestId = function(){
var catapp = document.g..
Can we have a SQL query which will basically help in viewing table and index sizes in SQl Server.
How SQL server maintains memory usage for tables/indexes?..
I have timespans:
String time1 = 01:00:00
String time2 = 05:00:00
I want to check if time1 and time2 both lies between 20:11:13 and 14:49:00.
Actually, 01:00:00 is greater than 20:11:13 and less tha..
I've written a game of tic-tac-toe in Java, and my current method of determining the end of the game accounts for the following possible scenarios for the game being over:
The board is full, and no ..
I have the code below and I'd like to center the "well" elements of the outer "row" div. I've tried various approaches such as text-align: center (which just centers the text and not the inner DIV el..
i am trying to display a simple UITableView with some data. I wish to set the static height of the UITableView so that it doesn't displays empty cells at the end of the table. how do I do that?
code:..
I'm writing an application that takes user data and stores it locally for use later. The application will be started and stopped fairly often, and I'd like to make it save/load the data on application..
I am a newbie (just 1 week) to this Python world. I tried installing django-mssql, but when I tried to import the library (using import sqlserver_ado.dbapi), I got this error message:
ImportError: No..
How can I pretty print a dictionary with depth of ~4 in Python? I tried pretty printing with pprint(), but it did not work:
import pprint
pp = pprint.PrettyPrinter(indent=4)
pp.pprint(mydict)
I si..
Soundcloud's API gives the duration of it's tracks as milliseconds. JSON looks like this:
"duration": 298999
I've tried many functions I found on here to no avail. I'm just looking for something to..
Does anyone know why integer division in C# returns an integer and not a float?
What is the idea behind it? (Is it only a legacy of C/C++?)
In C#:
float x = 13 / 4;
//== operator is overridden he..
I'm looking at the documentation for FileUtils.
I'm confused by the following line:
FileUtils.cp %w(cgi.rb complex.rb date.rb), '/usr/lib/ruby/1.6'
What does the %w mean? Can you point me to th..
I'm having an issue identical to this poster:
Jquery problem with height() and resize()
But the solution doesn't fix my issue. I have three stacked divs, and I want to use JQuery to make the middle o..
Given the following:
<select id="location">
<option value="a" myTag="123">My option</option>
<option value="b" myTag="456">My other option</option>
</select&g..
I'm working on an interactive interface using SVG and JavaScript/jQuery, and I'm trying to decide between Raphael and jQuery SVG. I'd like to know
What the trade-offs are between the two
Where the ..
I have an HTML file :
<!DOCTYPE HTML>
<html lang="en-US" ng-app="Todo">
<head>
<meta charset="UTF-8">
<title>DemoAPI</title>
<meta name="viewport">..
I am able to parse strings containing date/time with time.strptime
>>> import time
>>> time.strptime('30/03/09 16:31:32', '%d/%m/%y %H:%M:%S')
(2009, 3, 30, 16, 31, 32, 0, 89, -1)
..
The Binary Tree here is may not necessarily be a Binary Search Tree.
The structure could be taken as -
struct node {
int data;
struct node *left;
struct node *right;
};
The maximum solu..
I am developing a Java EE application in which I need Base64 Encoding/Decoding
So I added commons-codec-1.5.jar in WEB-INF/lib folder of my application and used
import org.apache.commons.codec.bina..
After a successful import of an Eclipse-Android-Project into "Android Studio 1.4", I get the error
"Please select Android SDK"
when I click on the button to run the application in simulator, bu..
I'm trying to use event.stopPropagation() within a ReactJS component to stop a click event from bubbling up and triggering a click event that was attached with JQuery in legacy code, but it seems like..
I'm new to Java and very confused.
I have a large dataset of length 4 int[] and I want to count the number of times
that each particular combination of 4 integers occurs. This is very similar to cou..
My question involves summing up values across multiple columns of a data frame and creating a new column corresponding to this summation using dplyr. The data entries in the columns are binary(0,1). I..
I am using PyCharm as an editor for python code in Houdini. Whenever I try to import the main Houdini library (hou) I get an error flagged in PyCharm. If I include the code snippet:-
try:
import..
I understand that this question has been asked before, but most of the time it is asked in relation to a specific database or table. I cannot find an answer on this site that describes the two engines..
Using Windows Server 2008, how do I go about capturing the output of a script that is being ran with the windows task scheduler?
I'm testing a rather long custom printing batch-script, and for debugg..
I need help on my Excel sheet. How can I declare the following IF condition properly?
if A1 = "n/a" then C1 = B1
else if A1 != "n/a" or has value(int) then C1 = A1*B1
..
I have a method that uses an IList<T> as a parameter. I need to check what the type of that T object is and do something based on it. I was trying to use the T value, but the compiler does not..
I am planning on using Google to download the jQuery lib for both UI and Core. My question is, do they allow me to download the CSS for it or should I have to host it myself?
Also if I use Google to ..
I have the example code below. This works fine with all browsers except for browsers on mobile devices.
The overflow tag is the issue.
Works with all except for mobile:
margin: 0; padding: 0; heigh..
What's the keyboard shortcut for Visual Studio 2005 and Visual Studio 2008 to display the IntelliSense box if one accidentally hits ESC and wants the box come back again? ..
How might I capture the page reload event?
I have a messaging system which loses all its input when the user refreshes the page. I want to use ajax to re-populate, hence my need to detect when the pa..
I have been trying to disable the Enter key on my form. The code that I have is shown below. For some reason the enter key is still triggering the submit. The code is in my head section and seems to b..
How can I move files (like mv command shell) on node.js? Is there any method for that or should I read a file, write to a new file and remove older file?..
I have a basic form for which I want to handle buttons inside the form by calling the ActionResult method in the View's associated Controller class. Here is the following HTML5 code for the form:
<..
I'm recently starting to pick up C++ and the SFML library, and I was wondering if I defined a Sprite on a file appropriately called "player.cpp" how would I call it on my main loop located at "main.cp..
I am creating a GUI, albeit a simple one, and I want to have a background image (2048 X 2048) fill up the whole window and a square to the left top corner where the occasional 64 X 64 image can be loa..
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'm new to Python and Flask and I'm trying to do the equivalent of Response.redirect as in C# - ie: redirect to a specific URL - how do I go about this?
Here is my code:
import os
from flask import ..
I have a form that, when submitted, I need to do some additional processing before it should submit the form. I can prevent default form submission behavior, then do my additional processing (it's bas..
This is probably something very basic, but I am having trouble figuring out where I am going wrong.
I am trying to grab a string from the body of a POST, but "jsonString" only shows as null. I also ..
Seems like I'm having some problems after updating my android sdk tools and platform-tools using the sdk manager. The problem is that, after updating, I found that the avd or sdk options in the window..
I downloaded XAMPP about a month ago and it was working just fine. Today I installed a voice recognition software and then restarted my computer. Ever since, MySQL won't start in my manager-osx applic..
When build my angular 7 project with --prod, i have a warning in budgets.
I have a angular 7 project, i want to build it, but i have a warning:
WARNING in budgets, maximum exceeded for initial. Budg..
I'm trying to filter WooCommerce product archive by custom attributes.
For example, there are 5 products with attribute "color" containing "red", and another 3 with attribute "color" containing "blue..
How do I learn where the source file for a given Python module is installed? Is the method different on Windows than on Linux?
I'm trying to look for the source of the datetime module in particular, ..
In my Android application it automatically focuses the first Button I have in my layout, giving it an orange outline. How can I set the initial focus preferably in XML, and can this be set to nothing?..
In python, is there a difference between calling clear() and assigning {} to a dictionary? If yes, what is it?
Example:d = {"stuff":"things"}
d.clear() #this way
d = {} #vs this way
..
Since this question continues to attract responses that are either
refuted by the question body or don't address the actual problem,
please read this simple summary of what you need to know:
..
As the title suggests... I'm trying to figure out the fastest way with the least overhead to determine if a record exists in a table or not.
Sample query:
SELECT COUNT(*) FROM products WHERE produc..
Similar to this issue, when using a Scripting.Dictionary object in VBA, the outcome of the code below is unexpected.
Option Explicit
Sub test()
Dim d As Variant
Dim i As Integer
Dim s A..
My HTML email template is displaying correctly without major problems in Gmail, Apple Mail and iOS Mail. Outlook however is a horrifying mess and I can't for the life of me figure out what I've done w..
I am trying to use the ps -o command to get just specific info about processes matching a certain name. However, I am having some issues on this, when I try to use this even to just get all processes,..
I installed Android Studio 0.1.9. Today I got and update to version 0.2 and of course I updated. After the installation I restarted Android Studio but now I get this message:
Project is using an ..