I frequently find myself writing code like this:
List<int> list = new List<int> { 1, 3, 5 };
foreach (int i in list) {
Console.Write("{0}\t", i.ToString()); }
Console.WriteLine();
B..
I'm extremely new to Java and just wanted to confirm what Double is? Is it similar to Float or Int? Any help would be appreciated. I also sometimes see the uppercase Double and other times the lower c..
In my classes I implement IDisposable as follows:
public class User : IDisposable
{
public int id { get; protected set; }
public string name { get; protected set; }
public string pass { ge..
I'm writing a CSV file. I need to write timestamps that are accurate at least to the second, and preferably to the millisecond. What's the best format for timestamps in a CSV file such that they can..
I have a Rakefile that compiles the project in two ways, according to the global variable $build_type, which can be :debug or :release (the results go in separate directories):
task :build => [:so..
I am using HTML Purifier (http://htmlpurifier.org/)
I just want to remove <script> tags only.
I don't want to remove inline formatting or any other things.
How can I achieve this?
One more t..
I'm trying to make something like this:
private String getStringIfObjectIsPresent(Optional<Object> object){
object.ifPresent(() ->{
String result = "result";
..
From the RFC 2616
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.1
no-cache
If the no-cache directive does not specify a field-name, then a cache
MUST NOT use the response ..
I'm importing a multiple-module Maven project from the root directory on a shared drive on another server A. On server A, mvn install will run successfully, and Maven is set up properly with repositor..
I have a form that is a little complex and I am hoping to simplify the server-side (PHP) processing by natively POSTing an array of tuples.
The first part of the form represents a User:
First Name
..
I am new to Ruby, if I have an object like this
{"apple" => "fruit", "carrot" => "vegetable"}
How can I return an array of just the keys?
["apple", "carrot"]
..
Here is the problem. I want to run my Android Studio apps on my device (Samsung Galaxy Ace 2). But nothing works for me. Tell me what I've missed:
1) USB debugging is on
2) ADB driver is installed (..
I can't get the array length of the JSON array. when I using length(); method it is not working, it show as red underline in Netbeans
this is the source code
try {
JSONObject myjson = JS..
During my search, I found several ways of signing a SSL Certificate Signing Request:
Using the x509 module:
openssl x509 -req -days 360 -in server.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out ..
I am trying to get all rows within a dataframe where a columns value is not within a list (so filtering by exclusion).
As an example:
df = sqlContext.createDataFrame([('1','a'),('2','b'),('3','b'),(..
I have installed Clang by using apt-get in Ubuntu, and I can successfully compile C files using it. However, I have no idea how to compile C++ through it. What do I need to do to compile C++?..
How can I use a servlet filter to change an incoming servlet request url from
http://nm-java.appspot.com/Check_License/Dir_My_App/Dir_ABC/My_Obj_123
to
http://nm-java.appspot.com/Check_License?Cont..
I am having an issue with FireBase Cloud Messaging in which I get the Token from the device and send the notification test through the Google Firebase notification console however, the notification is..
I have a database configuration class to connect my spring web service with the database. I'm using spring boot, to make it stand alone application.
Here is my class
@Configuration
@EnableTransactio..
What is the main purpose of using CROSS APPLY?
I have read (vaguely, through posts on the Internet) that cross apply can be more efficient when selecting over large data sets if you are partitioning...
I don't want to rename a remote branch, as described in Rename master branch for both local and remote Git repositories.
How can I rename a local branch which hasn't been pushed to a remote branch?
..
I am trying to open port 3306 in iptables in my Debian System to allow access to MySQL server. For which I entered this command:
root@debian:/# sudo iptables -A INPUT -p tcp --dport 3306 ACCEPT
root@..
I want to convert current data into 'yyyy-MM-dd' format in .ts file. i template it can easily be done by using data pipe. how to do that in typescript.
In template:
{{date | date:'yyyy-MM-dd'}}
H..
I am trying to use activemq in my application, but keep getting an error when I try and connect to localhost:
log4j:WARN No appenders could be found for logger (org.springframework.core.env.StandardE..
What is the best method for converting a PHP array into a string?
I have the variable $type which is an array of types.
$type = $_POST[type];
I want to store it as a single string in my database w..
PROBLEM
I've been looking for request/response timeouts for Express.js but everything seems to be related to the connection rather than the request/response itself.
If a request is taking a long tim..
In Xcode, I know that you can get variables such as PROJECT_DIR to use in some situations, such as a run script build phase. I am wondering if it's possible to get the build type (i.e., Release or Deb..
How can someone validate that a specific element exists in an XML file? Say I have an ever changing XML file and I need to verify every element exists before reading/parsing it. ..
The question is as follows:
How can I get the server path to the web directory in Symfony2 from inside the controller (or from anywhere else for that reason)
What I've already found (also, by search..
I have a list of Booleans:
[True, True, False, False, False, True]
and I am looking for a way to count the number of True in the list (so in the example above, I want the return to be 3.) I have f..
I have two columns, fromdate and todate, in a dataframe.
import pandas as pd
data = {'todate': [pd.Timestamp('2014-01-24 13:03:12.050000'), pd.Timestamp('2014-01-27 11:57:18.240000'), pd.Timestamp('2..
I have a Python file which might have to support Python versions < 3.x and >= 3.x. Is there a way to introspect the Python runtime to know the version which it is running (for example, 2.6 or 3.2.x..
I am a total newbie. Can somebody tell me how to remove an HTML element using the original Javascript not jQuery.
index.html
<html>
<head>
<script type="text/javascript" src="myscrip..
The appropriate bits of what I tried are here:
<a href="#" data-content="<div id='my_popover'></div>"> Click here </a>
$(".button").popover({html: true})
$(".button").click(..
I am getting this issue when I type localhost:8000/admin/.
`TemplateSyntaxError: Could not parse the remainder: ':password_change' from 'admin:password_change'. The syntax of 'url' changed in Djan..
I am building a mobile web app with jQuery Mobile and I want to check if a checkbox is checked. Here is my code.
<script type=text/javascript>
function validate(){
if (remember.checked ==..
I have a page which,
If a variable is set(in a session)
it will do an action,
then it unsets the session.
Now it has to refresh itself.
This is where i am stuck.
Is there a way to get the exact ur..
Many times I've seen links like these in HTML pages:
<a href='#' onclick='someFunc(3.1415926); return false;'>Click here !</a>
What's the effect of the return false in there?
Also, I d..
What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?
What methods/tools can be used to determine the cause so that you stop the exception from causing the program t..
I have a question that will be found very often. The problem is that nowhere can be found an explicit solution.
I have two problems regarding anchors.
The main goal should be to get a nice clean url..
I've built a basic app in Angular, but I have encountered a strange issue where I cannot inject a service into one of my components. It injects fine into any of the three other components I have creat..
I'd like a cleaner way to obtain the following functionality, to catch AError and BError in one block:
try
{
/* something */
}
catch( AError, BError $e )
{
handler1( $e )
}
catch( Exception $..
I have worked on number of J2EE projects where the view layer is JSP. In most projects, I have seen that we reference external resources i.e. images, javascript, jsp's, css etc. using the contextPath ..
I would like to write a CSS selector rule that selects all elements that don't have a certain class. For example, given the following HTML:
<html class="printable">
<body class="printabl..
I want to use App.config for storing some setting.
I tried to use the next code for getting a parameter from a config file.
private string GetSettingValue(string paramName)
{
return String.Format(..
I am trying to create a histogram on a continuous value column Trip_distance in a large 1.4M row pandas dataframe. Wrote the following code:
fig = plt.figure(figsize=(17,10))
trip_data.hist(column="..
I'm trying to understand what makes the lock in concurrency so important if one can use synchronized (this). In the dummy code below, I can do either:
synchronized the entire method or synchronize t..
Is there a way to show the console in a Windows application?
I want to do something like this:
static class Program
{
[STAThread]
static void Main(string[] args) {
bool consoleMode =..
I'm using jQuery and I want to show some calculation in a span (called span1) and I want when text of span1 changed do some calculation on it's value and show in other spans (called `span2 ,span3,...)..
I think a lot of developers are trying to learn more about the new Google Play App Signing feature presented at Google I/O 2017.
The ability to store the keystore to sign the apps inside Google Play ..
Is it possible to do a "deep" comparison of two object in Angular? What I would like to do is compare each key/value pair. For example:
Object 1
{
key1: "value1",
key2: "value2",
key3: "val..
I changed the color of an AlertDialog title using this command
alert.setTitle( Html.fromHtml("<font color='#FF7F27'>Set IP Address</font>"));
But I want to change the color of the line..
I'm basically looking for a python version of Combination of List<List<int>>
Given a list of lists, I need a new list that gives all the possible combinations of items between the lists.
..
I am facing problem while conecting R with internet in my office. May be this due to LAN settings. I tried the almost all possible ways I come across in the web (see below) but still in vain.
Metho..
I just need a plain list of conflicted files.
Is there anything simpler than:
git ls-files -u | cut -f 2 | sort -u
or:
git ls-files -u | awk '{print $4}' | sort | uniq
I guess I could set up ..
I'm trying to build a new Docker image for our development process, using cpanm to install a bunch of Perl modules as a base image for various projects.
While developing the Dockerfile, cpanm returns..
I tried this method (their fiddle) to enable scrollable menu with Bootstrap, but with that approach, the scrollable menu expands its container -- fiddle -- the non-scrollable menu, correctly, does not..
I tried using random.randint(0, 100), but some numbers were the same. Is there a method/module to create a list unique random numbers?
Note: The following code is based on an answer and has been adde..
I've looked at numerous other questions and found very simple answers, including the code below. I simply want to detect when someone changes the content of a text box but for some reason it's not wo..
I've got two tables:
TableA
------
ID,
Name
TableB
------
ID,
SomeColumn,
TableA_ID (FK for TableA)
The relationship is one row of TableA - many of TableB.
Now, I want to see a result like this:
..
Currently i have the following syntax (list is a list containing objects with many different properties (where Title is one of them):
for (int i=0; i < list.Count; i++)
{
if(title == list[i].Ti..
I'm building a multilingual site, with the owner helping me with some translations. Some of the displayed phrases need line breaks to maintain the style of the site.
Unfortunately, the owner isn't..
I'd like to create a user in PostgreSQL that can only do SELECTs from a particular database. In MySQL the command would be:
GRANT SELECT ON mydb.* TO 'xxx'@'%' IDENTIFIED BY 'yyy';
What is the equi..
Is there any simple way to convert .xls file to .csv file ? (Excel)
in C# code ?
i mean to take an existing .xls file and convert them to .csv file
Thanks in advance..
I am a C guy and I'm trying to understand some C++ code. I have the following function declaration:
int foo(const string &myname) {
cout << "called foo for: " << myname << end..
Why am I getting "Unable to find the requested .Net Framework Data Provider" when trying to setup a new datasource in Visual Studio 2010 Professional?
My stats:
Windows 7 64bit 16gig RAM
Visual Stu..
I'm looking to reformat (replace, not validate - there are many references for validating) a phone number for display in Javascript. Here's an example of some of the data:
123 4567890
(123) 456-7890..
I have an FFT result. These are stored in two double arrays: a real part array and an imaginary part array. How do I determine the frequencies that correspond to each element in these arrays?
In othe..
During one of my interview, I was asked "If we can instantiate an abstract class?"
My reply was "No. we can't". But, interviewer told me "Wrong, we can."
I argued a bit on this. Then he told me to ..
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..
Is there any way to determine a string's encoding in C#?
Say, I have a filename string, but I don't know if it is encoded in Unicode UTF-16 or the system-default encoding, how do I find out?..
I am making my first parallel application, but I am stuck with basics of C. I need to know, how to cast int to char and then how to append one char to another.
It you could help me please, i would b..
I want to be able to set the major and minor xticks and their labels for a time series graph plotted from a Pandas time series object.
The Pandas 0.9 "what's new" page says:
"you can either us..
This is my fiddle, http://jsfiddle.net/4vaxE/35/
It work fine in my fiddle.
However, when I transfer it to dreamweaver, it can't work. And I found this two error in my coding.
Uncaught ReferenceEr..
I have a LaTeX document that contains a paragraph followed by 4 tables followed by a second paragraph. I want the 4 tables to appear between the two paragraphs which from what I've read means I should..
I'm trying to set up a formula with multiple IF statements between number ranges but I'm seeing the error:
Formula parse error
Here is the forumula:
=IF((AND(A2>0,A2<500),"Less than 500",..
I am striving to convert a string to a tuple without splitting the characters of the string in the process. Can somebody suggest an easy method to do this. Need a one liner.
Fails
a = 'Quattro ..
I'm using a standard Switch control with the holo.light theme in a ICS app.
I want to change the highlighted or on state color of the Toggle Button from the standard light blue to green.
This should..
I was reading about sql injection and i understand how it works if there is a form where the user can enter his username and login. What i dont get is how websites without a login page can be vulnerab..
I am using commons-httpclient 3.1 in an integration test suite. The default logging for HttpClient is extremely noisy and I can't seem to turn it off. I've tried following the instructions here but no..
I use the following function to post a form to via jQuery AJAX:
$('form#add_systemgoal .error').remove();
var formdata = $('form#add_systemgoal').serialize();
$.ajaxSetup({async: false}); ..
I have downloaded and extracted Eclipse. I have Eclipse in the following directory: C:\Applications\eclipse. When I try and run the executable , I get the following message :
I currently have the f..
We have a large Oracle database with many tables. Is there a way I can query or search to find if there are any tables with certain column names?
IE show me all tables that have the columns: id, fna..
I want to get the output from some shell commands like ls or df in a python script. I see that commands.getoutput('ls') is deprecated but subprocess.call('ls') will only get me the return code.
I'll ..
We're using SCCM 2012 and I'm packaging all of our application and testing them as I go. Some only have .exe's and are more difficult than the .msi's. Some have no documentation and I'm trying diffe..
I'm looking for a neat RegEx solution to replace
All non Alpha-Numeric Characters
All NewLines
All multiple instances of white space
With a single space
For those playing at home (the following..
I'm building my first MVC application after years of doing webforms, and for some reason I am not able to make this work:
@Html.DropDownList("PriorityID", String.Empty, new {@class="textbox"} )
Er..
I'm trying to create a regular expression for matching latitude/longitude coordinates. For matching a double-precision number I've used (\-?\d+(\.\d+)?), and tried to combine that into a single expres..
This question was originally asked for Android 1.6.
I am working on photos options in my app.
I have a button and an ImageView in my Activity. When I click the button it would redirect to the galle..
I'm trying to use Font Awesome on my application, I was able to integrate the font using Typeface.createFromAsset(), but I also want to use the icons provided by this font, but so far I haven't been a..
In underscore, I can successfully find an item with a specific key value
var tv = [{id:1},{id:2}]
var voteID = 2;
var data = _.find(tv, function(voteItem){ return voteItem.id == voteID; });
//data = ..
What's the difference between an email Sender, From and Return-Path value?
Example: I have a contact form where the user can input their email, would this be assigned to sender, from or return-path?
..
CGI is a Common Gateway Interface. As the name says, it is a "common" gateway interface for everything. It is so trivial and naive from the name. I feel that I understood this and I felt this every ti..
I am using Ansible 2.1. I have the following inventory host file and a role being called by a play that needs access to the host file variable. Any thoughts on how to access it (currently getting an..
I just used the XmlWriter to create some XML to send back in an HTTP response. How would you create a JSON string. I assume you would just use a stringbuilder to build the JSON string and them forma..
In Maven2, to exclude a single transitive dependency, I have to do something like this:
<dependency>
<groupId>sample.group</groupId>
<artifactId>sample-artifactB</artif..
Currently, I'm using Jackson to send out JSON results from my Spring-based web application.
The problem I'm having is trying to get all money fields to output with 2 decimal places. I wasn't able to ..
I've looked into and considered many JavaScript unit tests and testing tools, but have been unable to find a suitable option to remain fully TDD compliant. So, is there a JavaScript unit test tool tha..
From wikipedia:
the cross product is a binary operation on two vectors in a three-dimensional Euclidean space that results in another vector which is perpendicular to the plane containing the two..
Is there a way to incorporate React's curly brace notation and an href tag? Say we have the following value in the state:
{this.state.id}
and the following HTML attributes on a tag:
href="#demo1"
..
I am aware of function debug_backtrace, but I am looking for some ready to use implementation of function like GetCallingMethodName()? It would be perfect if it gave method's class too (if it is indee..
My current code:
RestTemplate restTemplate = new RestTemplate();
restTemplate.getMessageConverters().add(new MappingJackson2HttpMessageConverter());
Mall[] malls = restTemplate.getForObject(url, Mall..
We are using ProxyPass to redirect all "/r" requests to jboss on port 18080 as follows:
ProxyPreserveHost on
ProxyPass /r http://localhost:18080/redirectService/
ProxyPassReverse /r http://localhost:..
How can I navigate through all my text fields with the "Next" Button on the iPhone Keyboard?
The last text field should close the Keyboard.
I've setup the IB the Buttons (Next / Done) but now I'm st..
Sometimes java puzzles me.
I have a huge amount of int initializations to make.
What's the real difference?
Integer.toString(i)
new Integer(i).toString()
..
I tried the sample provided within the documentation of the requests library for python.
With async.map(rs), I get the response codes, but I want to get the content of each page requested. This, for ..
I usually work with PHP so sadly don't have some basic JS principles down. This is all I want to accomplish--I've seen many posts on this topic but they are usually beyond what I need.
Here is my fo..
I have a batch file as follows;
CD C:\MyFolder
findstr /c:"stringToCheck" fileToCheck.bat
IF NOT XCOPY "C:\OtherFolder\fileToCheck.bat" "C:\MyFolder" /s /y
I am getting an error ("C:\OtherFolder\fi..
I'm working on a web service using ASP.NET MVC's new WebAPI that will serve up binary files, mostly .cab and .exe files.
The following controller method seems to work, meaning that it returns a file,..
I created a bitmap and now i want to save that bitmap to a directory somewhere. Can anyone show me how this is done. Thanks
FileInputStream in;
BufferedInputStream buf;
try {
..
How do I recursively list all files under a directory in Java? Does the framework provide any utility?
I saw a lot of hacky implementations. But none from the framework or nio ..
I have a comma-separated string that I want to convert into an array, so I can loop through it.
Is there anything built-in to do this?
For example, I have this string
var str = "January,February,..
I want to find the foreign keys of a table but there may be more than one user / schema with a table with the same name. How can I find the one that the currently logged user is seeing? Is there a fun..
I am building an application with a REST-based API and have come to the point where I am specifying status codes for each requests.
What status code should i send for requests failing validation or w..
What is the complete list of all special characters for a SQL (I'm interested in SQL Server but other's would be good too) LIKE clause?
E.g.
SELECT Name FROM Person WHERE Name LIKE '%Jon%'
SQL Ser..
I am in need of a way to get the binary representation of a string in python. e.g.
st = "hello world"
toBinary(st)
Is there a module of some neat way of doing this?..
I am running centos 5.5 with 768mb ram. i keep getting server reached MaxClients setting, consider raising the MaxClients setting in the logs also apache runs really slow. when i look at cacti graphs ..
I have a component in React which I am importing in index.js, but it is giving this error:
Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing..
How do I import other files in Python?
How exactly can I import a specific python file like import file.py?
How can I import a folder instead of a specific file?
I want to load a Python file dynamic..
Does the .NET String.Format method allow placement of a string at a fixed position within a fixed length string.
" String Goes Here"
" String Goes Here "
"String Goes Here ..
How would I convert a preexisting datetime to UTC time without changing the actual time.
Example:
DateTime dateTime = GetSomeDateTime(); // dateTime here is 3pm
dateTime.ToUtcDateTime() // datetime ..
I have a very simple Java + Gradle project. It builds fine. It runs fine from the shell with "gradle run". However, if I try to run inside of IntelliJ, I get:
Cannot start compilation: the output pat..
As a beginner, creating timestamps or formatted dates ended up being a little more of a challenge than I would have expected. What are some basic examples for reference?..
I have a Visual Studio C++ project that relies on an external DLL file. How can I make Visual Studio copy this DLL file automatically into the output directory (debug/release) when I build the project..
I create a ReactJS project with the create-react-app package and that worked well, but I cannot find webpack files and configurations.
How does react-create-app work with webpack? Where are the webpa..
Seems like this would be a duplicate, but maybe it is just so obvious it hasn't been asked...
Is this the proper way of checking if a variable (not pointer) is initialized in a C++ class?
class MyCl..
I'm trying to use the below code to calculate the average of a set of values that a user enters and display it in a jTextArea but it does not work properly. Say, a user enters 7, 4, and 5, the program..
I cannot find a way to comment and uncomment multiple lines of code in Visual Studio Code.
Is it possible to comment and uncomment multiple lines in Visual Studio Code using some shortcut? If yes, ho..
My ISP account requires that I send a username & password for outbound SMTP mail.
How do I get PHP to use this when executing php.mail()? The php.ini file only contains entries for the server (S..
I'm just starting to use NLTK and I don't quite understand how to get a list of words from text. If I use nltk.word_tokenize(), I get a list of words and punctuation. I need only the words instead. Ho..
I am using xdebug (php_xdebug-2.1.2-5.3-vc9.dll) on WAMP. When I use var_dump on a large object or variable it does not show the full variable.
array
'node' =>
array
'my_form' =>
..
I'm using JQuery as such:
$(window).resize(function() { ... });
However, it appears that if the person manually resizes their browser windows by dragging the window edge to make it larger/smaller, ..
I created a project in Eclipse using the Spring Starter project template.
It automatically created an Application class file, and that path matches the path in the POM.xml file, so all is well. Here ..
In the markup shown below, I'm trying to get the content div to stretch all the way to the bottom of the page but it's only stretching if there's content to display. The reason I want to do this is so..
I want to make query in Laravel Eloquent like here its raw MySQL query
SELECT * from exampleTbl where id in(1,2,3,4)
I have tried this in Laravel Eloquent but it's not working
DB::where("id IN..
I know a little bit about TextWatcher but that fires on every character you enter. I want a listener that fires whenever the user finishes editing. Is it possible? Also in TextWatcher I get an instanc..
I am taking input of date of birth and date of death. Validation required
date of death should be more than date of birth
Date format to be dd/mm/yyyy
Dates to be less than or equal to today.
Val..
Just faced with strange issue. When i type
java -version
i got
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
..
I have cloned a github repository and made no changes locally. Github repository moved forward with commits on the same branch.
How do I find a diff between my local repository and the original gith..
How does one convert NSInteger to the NSString datatype?
I tried the following, where month is an NSInteger:
NSString *inStr = [NSString stringWithFormat:@"%d", [month intValue]];
..
I need to set a PHP $_SESSION variable using the jQuery. IF the user clicks on an image I want to save a piece of information associated with that image as a session variable in php.
I think I can d..
Is there a one line macro definition to determine the endianness of the machine. I am using the following code but converting it to macro would be too long.
unsigned char test_endian( void )
{
in..
How would I go about converting an address or city to a latitude/longitude? Are there commercial outfits I can "rent" this service from? This would be used in a commercial desktop application on a Win..
So i'm basically working on a project where the computer takes a word from a list of words and jumbles it up for the user. there's only one problem: I don't want to keep having to write tons of words ..
While running an app on the virtual device (AVD) created on Android studio (in Windows 10), I am getting an error and panic.
Emulator: PANIC: Cannot find AVD system path. Please define ANDROID_SDK_RO..
I want to load and draw pdf files graphically using C#. I don't need to edit them or anything, just render them at a given zoom level.
The pdf libraries I have found seem to be focussed on generation..
Just getting back into using C++ and trying to convert a simple Java program I wrote recently.
What's the preferred equivalent to the Java ArrayList in C++?..
In Java, when doing a replaceAll to look for a regex pattern like:
replaceAll("\\?i\\b(\\w+)\\b(\\s+\\1)+\\b", "$1");
(to remove duplicate consecutive case-insensitive words, e.g. Test test), I'm ..
I am trying to get the product categories from WooCommerce through a function in my WordPress theme
function get_me_list_of($atts, $content = null)
{
$args = array( 'post_type' =&..
I am trying to create a <div> dynamically, with an appended <div> inside. I have this so far which works:
var iDiv = document.createElement('div');
iDiv.id = 'block';
iDiv.className = 'bl..
I opened port #5955 from a java class to comunicate from a client. How do i close this port after I am done? and also which command can show me if port open or closed?..
I'm having a little trouble here,
I'm trying to convert a numpy.ndarray to string, I've already done that like this:
randomArray.tostring()
It works, but I'm wondering if I can transform it back t..
I have some problem for a while now, I'm experiencing CSRF Cookie not set. Please look at the codes below
Python
def deposit(request, account_num):
if request.method == 'POST':
account = g..
I am trying to use SVMLight from Java, using the JNI wrapper on this page:
static {
System.loadLibrary("lib/JNI_SVM-light-6.01/lib/svmlight");
}
I get the following error:
... lib\JNI_S..
I'm trying to create a Regex test in JavaScript that will test a string to contain any of these characters:
!$%^&*()_+|~-=`{}[]:";'<>?,./
More Info If You're Interested :)
It's for a pre..
Simple question here: I'm trying to get the size of my legend using matplotlib.pyplot to be smaller (i.e., the text to be smaller). The code I'm using goes something like this:
plot.figure()
plot.sc..
Is there a way to pass more data into a callback function in jQuery?
I have two functions and I want the callback to the $.post, for example, to pass in both the resulting data of the AJAX call, as w..
I am getting this strange error in Eclipse while trying to set a breakpoint.
Unable to insert breakpoint Absent Line Number Information
I ticked the checkbox from Compiler options but no luck...
I am using Android studio 1.0.1. I have a java module referred by other modules in my project. I have checked it out from SVN But now every
Unsupported Modules Detected: Compilation is not supported..
I am learning Java EE and I downloaded the eclipse with glassfish for the same. I saw some examples and also read the Oracle docs to know all about Java EE 5. Connecting to a database was very simple...
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..
Even if I create a clean WinForms project, Edit and Continue doesn't work and gives me the error:
Changes are not allowed when the debugger has been attached to an already running process or the code..
Is there a way we can fetch first 10 results from a list. Something like this maybe:
list = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]
list.fetch(10)
?..
Possible Duplicate:
How to get only filenames within a directory using c#?
Using C#, I want to get the list of files in a folder.
My goal: ["file1.txt", "file2.txt"]
So I wrote this:
stri..
I'm trying to put a link called Submit resume in a menu using a li tag. Because of the whitespace between the two words it wraps to two lines. How to prevent this wrapping with CSS?..
Can anyone explain why following code won't compile? At least on g++ 4.2.4.
And more interesting, why it will compile when I cast MEMBER to int?
#include <vector>
class Foo {
public:
..
I'm trying to add an actual percent sign into a printf statement in Java and I'm getting the error:
lab1.java:166: illegal escape character
System.out.printf("%s\t%s\t%1.2f\%\t%1.2f\%..
I have a form to input records to a table. I would like it to open on an empty add (New) instead of displaying the first record of the table. To be used by a Navigation Form which opens the input fo..
http://en.wikipedia.org/wiki/Upsert
Insert Update stored proc on SQL Server
Is there some clever way to do this in SQLite that I have not thought of?
Basically I want to update three out of four co..
How can you access and display the row index of a gridview item as the command argument in a buttonfield column button?
<gridview>
<Columns>
<asp:ButtonField ButtonType="Button"
..
I am writing a program in Java which displays a range of afterschool clubs (E.G. Football, Hockey - entered by user). The clubs are added into the following ArrayList:
private ArrayList<Club>..
I work with multiple projects, and I want to recursively delete all folders with the name 'bin' or 'obj' that way I am sure that all projects will rebuild everything (sometimes it's the only way to fo..
An Android mobile actually does know quite well where it is - but is there a way of retrieving the country by something, like a country code or country name?
There isn't any need to know the exact GPS..
<a href="gohere.aspx" class="my-link">Click me</a>
I did
$('.my-link').attr('disabled', true);
but it didn't work
Is there an easy way to disable the hyperlink using jquery? Remove ..
I'm having an issue and I have no idea why this is happening and how to fix it. I'm working on developing a Videogame with python and pygame and I'm getting this error:
File "/home/matt/Smoking-Gam..
I was looking for a way to add new elements to an an existing object like what push does with arrays
I have tried this and it didn't work :
var myFunction = {
Author: 'my name ',
date: '15-..
I have following setup, but when I put 1024 and replace all 512 with 1024, then eclipse won't start at all. How can I have more than 512M memory for my eclipse JVM?
-startup
plugins/org.eclipse.equin..