In Microsoft Dynamics AX, application objects are defined in the Application Object Tree (AOT) and are instantiated at runtime. The AOT also contains application resources, references, and documentation. This section describes the AOT and its contents, how to use the AOT to define application objects, and how to import and export definitions of application objects.
First time using firestore and I'm getting this error. It seems to be a problem with Ivy, from my research. I don't have a lot of experience modifying tsconfig.app.json, which is the direction I've be..
In my project, I'm using Angular6 for the frontend. Now what I'm trying to do is deploy my project which is in remote server into the actual server. I'm using npm run build -prod command to build the ..
Using npm, I followed the getting started directions on the Angular CLI quick start page.
Angular CLI Quickstart
Running ng serve --open after creating and going into my new project "frontend" gave..
After updating to Angular 6.0.1, I get the following error on ng serve:
Could not find module "@angular-devkit/build-angular" from "/home/Projects/myProjectName".
Error: Could not find module "@angul..
After upgrading from angular 4.4 to 5.0 and after updating all HttpModule and Http to HttpClientModule I started to get this error.
I also added HttpModule again to be sure it's not due to some depe..
I have a simple app, initialized by angular-cli.
It display some pages relative to 3 routes. I have 3 components. On one of this page I use lodash and Angular 2 HTTP modules to get some data (using R..
I have a WinJS project that is previously built on Windows 8.1 using VS 2013.
Recently I upgraded this project to Universal Windows 10 by creating a blank Javascript Universal windows 10 project and..
I've downloaded this C++ code from the SBIG website in order to control (take pictures and save them) the camera (model ST-401ME) which I purchased from them. I have a Matlab program which needs to ca..
I know with that an image can be placed in a MD with the MD syntax of either  or , but I am having difficulty placi..
I used this annotation successfully for a Dao class. And rollback works for tests.
But now I need to rollback real code, not just tests.
There are special annotations for use in tests. But which ann..
My code:
@Test
public void testAddRoleAndAddUser() {
Role r = roleDao.findByProperty("name", "admin");
if(r == null) {
r = new Role();
r.setName("admin");
r.setDe..
I am working on a test harness for a SAML 1.1 Assertion Consumer Service. The test must generate a signed SAMLResponse and submit it to the ACS encoded in Base64. The ACS must be able to verify the ..
When trying to start my JUnit-Test out of Eclipse, I get a "ClassNotFoundException". When running "mvn test" from console - everything works fine. Also, there are no problems reported in Eclipse.
My ..
I'm trying to unit test (JUnit) a DAO i've created. I'm using Spring as my framework, my DAO (JdbcPackageDAO) extends SimpleJdbcDaoSupport. The testing class (JdbcPackageDAOTest) extends AbstractTra..
I want to do conversion in T-SQL from a varbinary type to string type
Here is an example :
First I got this varbinary
0x21232F297A57A5A743894A0E4A801FC3
And then I want to convert it to
21232f2..
I want to put a "rate/review this app" feature into my app.
Is there a way to link directly to the screen in the app store where they review the app? So the customer doesn't have to click through th..
Using python I want to print a range of numbers on the same line. how can I do this using python, I can do it using C by not adding \n, but how can I do it using python.
for x in xrange(1,10):
pr..
I've seen different advice on the best way to do this This question covers creating a jar. Elsewhere, I've seen advice to simply copy the volley source into your own project. This section on libraries..
I have a script which uses test command to check if $? (return code of last executed command) is not equal to zero. The code is as follows: -
$? is the exit status of the last command executed.
if (..
I have been using Github for a little while and I have been fine with git add, git commit, and git push so far with no problems. Suddenly I am having an error that says:
fatal: Authentication Fail..
Actually I'm a bit confused. Although I read several resources about this.
For having a test of Selenium 3 using ChromeBrowser we need an extra app called ChromeDriver.
I found this text from GitHub..
In TypeScript, I can declare a parameter of a function as a type Function. Is there a "type-safe" way of doing this that I am missing? For example, consider this:
class Foo {
save(callback: Funct..
Is there a way to hide the browse button and only leave the text box that works in all browsers?
I have tried setting the margins but they show up different in each browser..
I'm working in a small team, building in AngularJS and trying to maintain some basic standards & best practices; especially given we're relatively new with Angular.
My question is with regards to..
I have Parsed some JSON data and its working fine as long as I store it in String variables.
My problem is that I need the ID in an int varibable and not in String.
i have tried to make a cast int id..
I have a Windows service which need the currently logged username. I tried System.Environment.UserName, Windows identity and Windows form authentication, but all are returning "System" as the user as ..
I want to do some pre-server-validation of a form in a Backbone.js model. To do this I need to get the user input from a form into usable data.
I found three methods to do this:
var input = $("#inp..
I know how to add a class on click of a button in 'jQuery'
$('#button1').click(function(){
$('#div1').addClass('alpha');
});
I want to achieve same thing by angular js. I have a controller - myCon..
I just created sample BB app, which can allow to choose the date.
DateField curDateFld = new DateField("Choose Date: ",
System.currentTimeMillis(), DateField.DATE | DateField.FIELD_LEFT);
After c..
I am trying to use JavaScript to get the value from an HTML text box but value is not coming after white space
For example:
<input type="text" name="txtJob" value="software engineer">
I onl..
I need to delete the first three rows of a dataframe in pandas.
I know df.ix[:-1] would remove the last row, but I can't figure out how to remove first n rows...
I have a dictionary which represents a book shop. The keys represent the book title and values represent the number of copies of the book present. When books are sold from the shop,the number of copie..
I have 2 main divs, the header and a scrolling list contained in a div.
I want the header to always remain at the top of the page, and the scrolling list below.
The scrollbar should be attached to the..
I have a small snippet of code that I want to style from echo.
foreach($months as $key => $month){
if(strpos($filename,$month)!==false){
echo '<style = "font-color: #ff0000"> Movie..
This is probably a stupidly simple question to some :)
I've created a new linux instance on Amazon EC2, and as part of that downloaded the .pem file to allow me to SSH in.
When I tried to ssh with:..
I know that this kind of question was asked before and I've checked all the answers and I have tried several times to find a solution but in vain.
In fact I call a Dataframe using Pandas. I've upload..
I am trying to develop for android and I want to add the adb to my PATH so that I can launch it really easily. I have added directories before by for some reason adb does not want to be found. This is..
Possible Duplicate:
C and C++ : Partial initialization of automatic structure
While reading Code Complete, I came across an C++ array initialization example:
float studentGrades[ MAX_STU..
I'm just learning JavaScript and it seems like there are a number of ways to declare arrays.
var myArray = new Array()
var myArray = new Array(3)
var myArray = ["apples", "bananas", "oranges"]
var m..
Any time I want to replace a piece of text that is part of a larger piece of text, I always have to do something like:
"(?P<start>some_pattern)(?P<replace>foo)(?P<end>end)"
And th..
I'm attempting to use JSON to initiate a POST request to an API.
I've found some example code, and before I get too far I wanted to get that working, but I'm stuck...
<html>
<head>
<s..
I'm new to web development, and met a problem when removing margin of body.
There's space between the very top of the browser and "logo" text. And my code is here on jsbin.
Is body { margin: 0;} w..
I am getting following error for the stored procedure and not able to understand the issue (must be from db side) While googling, I found similar issues but couldn't get the solution. Can any one help..
In my project folder I created venv folder.
python -m venv venv
When I in VS Code run command select python interpreter my venv folder is not shown. I went one level up like suggested here but VS C..
I'm running into a weird error when trying to install Django on my computer.
This is the sequence that I typed into my command line:
C:\Python34> python get-pip.py
Requirement already up-to-date: p..
How to use the host listener and host binding in angular 2?
I tried like the below for host listener, but it's always showing a Declaration expected error.
app.component.ts:
import {Component, EventE..
I am making an HTML form. I want the results to appear in the PHP script.
<form action="chk_kw.php" method="post"> <br />
<select> name="website_string"
<option valu..
To avoid same-domain AJAX issues, I want my node.js web server to forward all requests from URL /api/BLABLA to another server, for example other_domain.com:3000/BLABLA, and return to user the same thi..
Our database is currently at 64 Gb and one of our apps started to fail with the following error:
System.Data.SqlClient.SqlException: Could not allocate space for object 'cnv.LoggedUnpreparedSpos'...
I was trying to use jQuery's page scroll inside some pages and could successfully make a smooth page scroll. The only problem I have now is when attempting to do that from different page. What I mean ..
At the moment I use save to add a single document. Suppose I have an array of documents that I wish to store as single objects. Is there a way of adding them all with a single function call and then..
Having an issue sending an image via email as an embedded image in the body.
The image file shows as an attachment which is ok but the inline image portion just shows as a red x.
Here is what I have ..
I'm new to spark. I want to perform some operations on particular data in a CSV record.
I'm trying to read a CSV file and convert it to RDD. My further operations are based on the heading provided in..
As the title states, I have trouble understanding loops and have come up with a way to do a simple 1 through 100 sum, but like I said, the loops are causing me some confusion. I think I have the FOR L..
I want to have an inline svg element's contents scale when size is non-native. Of course I could have it as a separate file and scale it like that.
index.html: <img src="foo.svg" style="width: 100..
This should be dead simple, but I cannot get it to work for the life of me.
I'm just trying to connect remotely to my MySQL server.
Connecting as:
mysql -u root -h localhost -p
works fine, b..
How do I set Default Controller for my ASP.NET MVC 4 project without making it HomeController?
How should I setup a default Area when the application starts?..
If the data look like:
Store,Dept,Date,Weekly_Sales,IsHoliday
1,1,2010-02-05,24924.5,FALSE
1,1,2010-02-12,46039.49,TRUE
1,1,2010-02-19,41595.55,FALSE
1,1,2010-02-26,19403.54,FALSE
1,1,2010-03-05,2182..
How can I get the nth character of a string? I tried bracket([]) accessor with no luck.
var string = "Hello, world!"
var firstChar = string[0] // Throws error
ERROR: 'subscript' is unavailable..
I'm trying to add a vCard from a web link to the user's contact list on Android 2.2. When I direct the user to .vcf file, all I get is text output in the mobile browser. I have confirmed that the fi..
I want to check if two structs, slices and maps are equal.
But I'm running into problems with the following code. See my comments at the relevant lines.
package main
import (
"fmt"
"reflect..
I have a following class :
[DataContract]
public class Pair<TKey, TValue> : INotifyPropertyChanged, IDisposable
{
public Pair(TKey key, TValue value)
{
Key = key;
Value ..
Why can't do you this if you try to find out whether an int is between to numbers:
if(10 < x < 20)
Instead of it, you'll have to do
if(10<x && x<20)
which seems like a bit of..
I'm trying to get some json data from a "remote" website.
I run my web service on the 99000 port then, I launch my website on the 99001 port (http://localhost:99001/index.html).
I get the following m..
I dynamically load an iframe with JavaScript. After it's loaded, how can I make it scroll down a specific number of pixels (ie. after the page in the iframe has loaded, how can I make the iframe scrol..
I want to convert a nullable DateTime (DateTime?) to a DateTime, but I am getting an error:
Cannot implicitly convert type 'System.DateTime?' to
'System.DateTime'. An explicit conversion exists..
I have database content which has different types of data, such as Youtube videos, Vimeo videos, text, Imgur pictures, etc. All of them have different heights and widths. All I have found while search..
I have created Windows Application. In this, I have multiple tables in dataset, now I want to bind that to a single DataGridView. Can anybody help me?..
How can I deploy an ASP.NET web service to IIS 7?
I have deployed my webservice to IIS-5 installed on windows server 2008. However, I am not well versed with configuration options in IIS-7.
For IIS-..
I'm trying to write a script that will check if the current date/time is past the 05/15/2010 at 4PM
How can I use PHP's date() function to perform this check? ..
I was wondering what the difference between BigInt, MediumInt, and Int are... it would seem obvious that they would allow for larger numbers; however, I can make an Int(20) or a BigInt(20) and that wo..
I have several buttons on my page, but I'm not sure how to tell which one was clicked.
Here's the markup for my two buttons:
<input type="submit" id="btnSubmit" value="Save Changes" />
<inpu..
My heart is bleeding internally after having to go so deep to subtract two dates to calculate the span in number of days:
GregorianCalendar c1 = new GregorianCalendar();
GregorianCalendar c2 ..
In Ubuntu I want to change the file permissions of a whole folder and all its sub folders to read/write by anybody
I have tried sudo chmod 666 /var/www and sudo chmod 755 /var/www without success
up..
How do you import CommonCrypto in a Swift framework for iOS?
I understand how to use CommonCrypto in a Swift app:
You add #import <CommonCrypto/CommonCrypto.h> to the bridging header.
However,..
I know there are no default selection methods in recyclerview class, But I have tried in following way,
public void onBindViewHolder(ViewHolder holder, final int position) {
holder.mTextView.setT..
I have below class
class Cdata12Mnt
{
public:
char IOBname[ID1_IOB_PIOTSUP-ID1_IOB_TOP][BOADNAM_MAX + 4];
char ExIOBname[ID1_MAX_INF-ID1_EXIOB_U1TOP][BOADNAM_MAX + 4];
char cflpath[256];
..
I'm making a responsive layout with a top fixed navbar. Underneath I have two columns, one for a sidebar (3), and one for content (9). Which on desktop looks like this
navbar
[3][9]
When I resize ..
I'm currently building a single page application using ReactJS.
I read that one of the reasons for not using localStorage is because of XSS vulnerabilities.
Since React escapes all user input, would i..
I have to disable inputs at first and then on click of a link to enable them.
This is what I have tried so far, but it doesn't work.
HTML:
<input type="text" disabled="disabled" class="inputDisa..
I am working on a legacy code base with an existing DB schema. The existing code uses SQL and PL/SQL to execute queries on the DB. We have been tasked with making a small part of the project database-..
Being a beginner to React world, I want to understand in depth what happens when I use {this.props.children} and what are the situations to use the same. What is the relevance of it in below code snip..
The scenario:
I make some changes in a single file locally and run git add, git commit and git push
The file is pushed to the remote origin master repository
I have another local repository that is ..
Hello I want to have a button on my website and I want to resize the text on my button. How do I do this?
My code is below:
<input type="submit" value="HOME" onclick="goHome()" style="width: 100%..
I have an mvc application in which I am using a model like this:
public class BlockedIPViewModel
{
public string IP { get; set; }
public int ID { get; set; }
public bool Checked { get;..
I am iterating over a list and I want to print out the index of the item if it meets a certain condition. How would I do this?
Example:
testlist = [1,2,3,5,3,1,2,1,6]
for item in testlist:
if ..
I have a project which requires printing an HTML table with many rows.
My problem is the way the table is printed over multiple page. It will sometimes cut a row in half, making it unreadable because..
It's my first time using FCM.
I download a sample from firebase/quickstart-android and I install the FCM Quickstart. But I can't get any token from the log even hit the LOG TOKEN button in the app.
Th..
I want to get the selected label or value of a drop down using Selenium WebDriver and then print it on the console.
I am able to select any value from the drop down, but I am not able to retrieve the..
Could someone please advise the current "best practice" around Date and Calendar types.
When writing new code, is it best to always favour Calendar over Date, or are there circumstances where Date is..
While asking this question, I realized I didn't know much about raw strings. For somebody claiming to be a Django trainer, this sucks.
I know what an encoding is, and I know what u'' alone does since..
I am trying to convert a character to its binary representation (so character --> ascii hex --> binary).
I know to do that I need to shift and AND. However, my code is not working for some reason.
H..
I am using Selenium for automating the tests. My application exclusively uses IE, it will not work on other Browsers.
Code:
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.se..
I know that lots of social network APIs provide a way to construct a url to the profile picture of a user, using their user_id or username. For Facebook it looks like this:
http://graph.facebook.com/..
How do I break out a loop?
var largest=0
for(i<-999 to 1 by -1) {
for (j<-i to 1 by -1) {
val product=i*j
if (largest>product)
// I want to break out here
..
I have a regex that I thought was working correctly until now. I need to match on an optional character. It may be there or it may not.
Here are two strings. The top string is matched while the lower..
I want to change the default appearance of the arrow of a dropdown list so that looks the same across browsers. Is there a way to override the default look and feel of the drop down arrow using CSS or..
I am a beginner to programming. I'm a few weeks into my first programming class, so please bear with me. I am not a person to ask for help, so I have searched for an answer extensively with no luck. T..
If I have a list containing [alice, bob, abigail, charlie] and I want to write an iterator such that it iterates over elements that begin with 'a', can I write my own ? How can I do that ?..
I have an Eclipse project where I want to keep my Java project built into a JAR automatically. I know I have an option to export the project into a JAR; if I do a right click; but what I am really loo..
I have a question about including a file in javascript.
I have a very simple example:
--> index.html
--> models
--> course.js
--> student.js
course.js:
function Course() ..
How do you compare strings so that the comparison is true only if the cases of each of the strings are equal as well. For example:
Select * from a_table where attribute = 'k'
...will return a row ..
I'm trying to match a list of words from Column A against another list of words in column B. I only need the first three characters of the words in column A to match the first three characters of the..
How can I get the file name and line number in a Python script?
Exactly the file information we get from an exception traceback. In this case without raising an exception...
I have saved a JSON file in my local system and created a JavaScript file in order to read the JSON file and print data out. Here is the JSON file:
{"resource":"A","literals&q..
I know how to make a new branch that tracks remote branches, but how do I make an existing branch track a remote branch?
I know I can just edit the .git/config file, but it seems there should be an e..
I keep getting an error, if without else.
I tried else if as well
for (;;){
System.out.println("---> Your choice: ");
choice = input.nextInt();
if (choice==1)
..
Background
Write an XML document to a browser's response stream and cause the browser to display a "Save As" dialog.
Problem
Consider the following download() method:
HttpServletResponse respons..
I am using this function to get the featured images:
<a href="#" rel="prettyPhoto">
<?php the_post_thumbnail('thumbnail'); ?>
</a>
Now I want to get the full featured image on..
I am facing the below issue and am unable to build the application.
XXX has conflicting provisioning settings. XXX is automatically
provisioned, but provisioning profile WildCard has been manual..
I must be missing something here, but the following code (Fiddle) returns an empty string:
var test = new Array();
test['a'] = 'test';
test['b'] = 'test b';
var json = JSON.stringify(test);
alert(jso..
I understand that I need to use LoadLibrary(). But what other steps do I need to take in order to use a third-party DLL file?
I simply jumped into C++ and this is the only part that I do not get (as ..
I'm currently trying to make a new admin command script; all I have so far is the kill command... everything I've tried (so far) works unless I use the ":* me" parameter ("*"being any command and ":" ..
Let's say I have a spark data frame df1, with several columns (among which the column id) and data frame df2 with two columns, id and other.
Is there a way to replicate the following command
sqlContex..
I'm getting this error when I try to start a windows service I've created in C#:
My Code so far:
private ServiceHost host = null;
public RightAccessHost()
{
InitializeComponent();
}
protecte..
I have an element that needs to be move from left to right and right to left when I change the left, right variables.
Here is an jsfiddle example that I'm working on it. It moves left to right and ri..
One more question concerning JSF.Particularly, Primefaces.
Have following problem with ajax update of elements by id's at same time.
If elements on page goes one by one ,that ajax update performs ok:
..
I am wondering if anyone can give a "best practices" response to using blank HTML form actions to post back to the current page.
There is a post asking what a blank HTML form action does here and som..
I am creating a node command line interface. It is installed globally and uses a bin file to execute.
I plan to have a command window open at the root directory of the files I am working on and then ..
I have a link button inside a <td> which I have to disable. This works on IE but not working in Firefox and Chrome.
Structure is - Link inside a <td>. I cannot add any container in the <..
For example, running wget https://www.dropbox.com results in the following errors:
ERROR: The certificate of `www.dropbox.com' is not trusted.
ERROR: The certificate of `www.dropbox.com' hasn't got a..
If I use tel: I should write the international phone code, like that.
<a href="tel:+6494461709">61709</a>
So far, so good, but I can't find information on how to write a cell phone numb..
I would like to see if a particular string exists in a particular column within my dataframe.
I'm getting the error
ValueError: The truth value of a Series is ambiguous. Use a.empty,
a.bool()..
Trying to use fileReader.readAsBinaryString to upload a PNG file to the server via AJAX, stripped down code (fileObject is the object containing info on my file);
var fileReader = new FileReader();
..
In order to test some functionality I would like to create a DataFrame from a string. Let's say my test data looks like:
TESTDATA="""col1;col2;col3
1;4.4;99
2;4.5;200
3;4.7;65
4;3.2;140
"""
What is..
I'm trying to write an automated test of an application that basically translates a custom message format into an XML message and sends it out the other end. I've got a good set of input/output messa..
Given [1,2,3,4,5], how can I do something like
1/1, 1/2, 1/3,1/4,1/5, ...., 3/1,3/2,3/3,3/4,3/5,.... 5/1,5/2,5/3,5/4,5/5
I would like to store all the results, find the minimum, and return the two..
I am writing an application (Django, it so happens) and I just want an idea of what actually a "CSRF token" is and how it protects the data.
Is the post data not safe if you do not use CSRF ..
I have two repositories, and I need to copy whole of one onto the other empty one which has different access levels from the first one. The copy and the mother repository should not be linked together..
I am aware of CocoaMySQL but I have not seen a Mac GUI for SQLite, is there one?
My Google search didn't turn up any Mac related GUI's which is why I'm asking here rather than Google...
Is there any way to debug a stored procedure on SQL Server 2008?
I have access to use SQL Server Management Studio 2008 and Visual Studio 2008 (not sure whether either provides this functionality).
..
I am trying to decode some HTML entities, such as '&lt;' becoming '<'.
I have an old gem (html_helpers) but it seems to have been abandoned twice.
Any recommendations? I will need to use ..
Note: PowerShell 1.0
I'd like to get the current executing PowerShell file name. That is, if I start my session like this:
powershell.exe .\myfile.ps1
I'd like to get the string ".\myfile.ps1" (o..
Consider:
When I create a simple Maven project in Eclipse I am getting this error:
web.xml is missing and <failOnMissingWebXml> is set to
true
How can I fix this problem?..
Possible Duplicate:
Python List vs. Array - when to use?
I'm working on a few projects in Python, and I have a few questions:
What's the difference between Arrays and Lists?
If it's not o..
How can I convert a string that describes an object into a JSON string using JavaScript (or jQuery)?
e.g: Convert this (NOT a valid JSON string):
var str = "{ hello: 'world', places: ['Africa', 'A..
An ADO.Net application is only sometimes able to connect to another server on the local network. It seems random whether a given connection attempt succeeds or fails. The connection is using a conne..
Some of my script are using different encoding, and when I try to combine them, this has becom an issue.
But I can't change the encoding they use, instead I want to change the encodig of the result f..
I would like to launch a Fancybox (e.g. Fancybox's version of a modal or light box) on page load. I could bind it to a hidden anchor tag and fire the click event of that anchor tag via JavaScript, but..
I know this is so easy (doh...) but I am looking for a way to run a method on tapping or clicking a TextView line of text in an Android App.
I keep thinking about button listeners and anonymous metho..
Im using Spring Boot and want to use a Controller to receive a multipart file upload.
When sending the file I keep getting the error 415 unsupported content type response and the controller is never r..
I have a set of div elements. In jQuery, I would like to be able to find out the div with the maximum height and also the height of that div. For instance:
<div>
<div class="panel">
L..
I checked out a Java project from SVN in eclipse and realized that it requires Java 8 because it uses lambdas etc. I installed the eclipse addon for Java 8 and restarted eclipse and and have the proje..
I'm trying to learn Typescript. While I don't think it's relevant, I'm using VSCode for this demo.
I have a package.json that has these pieces in it:
{
"devDependencies": {
"gulp": "^3.9.1",
..
Steps to reproduce:
create a android project "MyApp"
import ActionBarSherlock(ABS),Directional ViewPager(DVP), or any other open source library which use android support library.
Add the libraries t..
Are there any modern browsers that won't detect the favicon.ico automatically? Is there any reason to add the link tag for favicon.ico?
<link rel="shortcut icon" href="/favicon.ico">
My guess..
In Java, is it possible to write a switch statement where each case contains more than one value? For example (though clearly the following code won't work):
switch (num) {
case 1 .. 5:
S..
The question is fairly simple. I want to use a Node.js server as a proxy to log, authenticate, and forward HTTP queries to a backend HTTP server (PUT, GET, and DELETE requests).
What library should I..
I am trying to do POST with HttpURLConnection(I need to use it this way, can't use HttpPost) and I'd like to add parameters to that connection such as
post.setEntity(new UrlEncodedFormEntity(nvp));
..
Being used to (and potentially spoiled by) MSSQL, I'm wondering how I can get at tables size in Oracle 10g.
I have googled it so I'm now aware that I may not have as easy an option as sp_spaceused. St..
Something like:
import fileinput
for lines in fileinput.FileInput("test.txt", inplace=1):
lines = lines.strip()
if lines == '': continue
print lines
But nothing is being printed on std..
I am curious as to why df[2] is not supported, while df.ix[2] and df[2:3] both work.
In [26]: df.ix[2]
Out[26]:
A 1.027680
B 1.514210
C -1.466963
D -0.162339
Name: 2000-01-03 00:00:00
In..
For Example I have the date: "23/2/2010" (23th Feb 2010). I want to pass it to a function which would return the day of week. How can I do this?
In this example, the function should return String "Tu..
I am new to android, I have a code in which I have placed buttons in list view.
My list is as..
Number | Name | ID (visibility = gone) | Level | button1 | button2
Function is different in button 1 ..
I am trying to add validation to my form with jQuery Validation Plugin, but I'm having a problem where the plugin puts the error messages when I'm using input groups.
$('form').validate({
rules..
Are there any good libraries for streaming live video using Java? Ideally both ends of the pipe should be written in Java but I am mostly concerned about the video player. What software would you reco..
In WebDriver, if I use sendKeys it will append my string to the value that already exists in the field. I can't clear it by using clear() method because the second I do that, the webpage will throw a..
I have a calendar and a textbox that contains a time of day. I want to create a datetime that is the combination of the two. I know I can do it by looking at the hours and mintues and then adding thes..
I've got a large (by number of lines) plain text file that I'd like to split into smaller files, also by number of lines. So if my file has around 2M lines, I'd like to split it up into 10 files that..
I am installing Xampp to my computer but when i tried to install it a dialog box is showing up. how do i fix this one.. thank you so much for the help.! the dialog Box:
Important! Because an activate..
I am trying to play a *.wav file with Java. I want it to do the following:
When a button is pressed, play a short beep sound.
I have googled it, but most of the code wasn't working. Can someone give ..
I just got started with Markdown. I love it, but there is one thing bugging me: How can I change the size of an image using Markdown?
The documentation only gives the following suggestion for an imag..
I returned an array of JSON data type from javascript to PHP, I used json_decode($data, true) to convert it to an associative array, but when I try to use it using the associative index, I get the err..
I just want to know, whether a String variable contains a parsable positive integer value. I do NOT want to parse the value right now.
Currently I am doing:
int parsedId;
if (
(String.IsNullOrE..
I can't seem to figure out how this is happening.
Here's an example of the file that I'm attempting to bulk insert into SQL server 2005:
***A NICE HEADER HERE***
0000001234|SSNV|00013893-03JUN09
00..
I receive the following warning:
[javac] build.xml:9: warning: 'includeantruntime' was not set,
defaulting to build.sysclasspath=last; set to false for repeatable builds
What does this mean?..
Consider:
http://example.com/page.html?returnurl=%2Fadmin
For js within page.html, how can it retrieve GET parameters?
For the above simple example, func('returnurl') should be /admin.
But it should ..
Possible Duplicate:
Installing specific package versions with Pip
I am a bit new to pip install and virtualenv in general.
I have setup an virtualenv on my server as well as on my local de..
Is there a simple way to ignore the white space in a target string when searching for matches using a regular expression pattern? For example, if my search is for "cats", I would want "c ats" or "ca ..
Before I re-invent this particular wheel, has anybody got a nice routine for calculating the size of a directory using Python? It would be very nice if the routine would format the size nicely in Mb/G..
Why does vim create <filename>~ files? Is there a way to disable that?
If it's for backup (or something), I use git for that.
Also, these .<filename.with.path.hints>.swp files too.
How..
How to $scope.$watch multiple variables in Angular, and trigger callback when one of them has changed.
$scope.name = ...
$scope.age = ...
$scope.$watch('???',function(){
//called when name or age..
I'm trying to have an image (as the background) on a button and add dynamically, depending on what's happening during run-time, some text above/over the image.
If I use ImageButton I don't even have ..
Possible Duplicate:
How do I save a stream to a file?
I have got a stream object which may be an image or file (msword, pdf), I have decided to handle both types very differently, as I may ..
I have tried to compare those two JSON objects:
<input type="hidden" id="remoteJSON" name="remoteJSON" value='{"allowExternalMembers": "false", "whoCanJoin": "CAN_REQUEST_TO_JOIN"}' /><br /&..
I am using my new mac for the first time today. I am following the get started guide on the mongodb.org up until the step where one creates the /data/db directory. btw, I used the homebrew route.
So..
I'm attempting to connect to a SQL Server 2005 DB from my Mac using unixODBC and FreeTDS as I have outlined here. However, when I try to connect in to a different DB using the same setup, I get:
Conn..
My PowerShell prompt's currently pointed to my C drive (PS C:\>). How do I change directory to a folder on my Q (PS Q:\>) drive?
The folder name on my Q drive is "My Test Folder"...
How can one get the name of the class from a static method in that class. For example
public class MyClass {
public static String getClassName() {
String name = ????; // what goes here so..
When I change the connection string using this code, it does not reload app.config at runtime. I expected it to reload similarly to how we reload app.config.
config.ConnectionStrings.ConnectionString..
I have downloaded and installed XAMPP 1.8.1 for Windows on Windows 7 Ultimate. I have set up XAMPP to run together with IIS as per these instructions
All good so far, my PHP sites run locally and eve..
I have 2 CSV files: 'Data' and 'Mapping':
'Mapping' file has 4 columns: Device_Name, GDN, Device_Type, and Device_OS. All four columns are populated.
'Data' file has these same columns, with Device_..
I'm trying to get the MySQL-python lib installed on centos 5.5. I ran
sudo yum install MySQL-python
but then when I tried:
import MySQLdb
I get this error:
Traceback (most recent call last):
..
I am working on YouTube broadcast sample examples. I have created a sample Java Project & added required jars. But, when I try to run the project it throws exception.
Exception :
Throwable: com/..
Let us assume,
int *p;
int a = 100;
p = &a;
What will the following code will do actually and how?
p++;
++p;
++*p;
++(*p);
++*(p);
*p++;
(*p)++;
*(p)++;
*++p;
*(++p);
I know, this is kin..
I'm reading file content and take string at exact location like this
string fileContentMessage = File.ReadAllText(filename).Substring(411, 3);
Output will always be either Ok or Err
On the other ..
How do I get a Dictionary key by value in C#?
Dictionary<string, string> types = new Dictionary<string, string>()
{
{"1", "one"},
{"2", "two"},
{"3", "..