The Zend_Gdata component is a PHP 5 interface for accessing Google Data from PHP. The Zend_Gdata component also supports accessing other services implementing the Atom Publishing Protocol.
I'm troubleshooting a Java app where XML is sent between two systems using HTTP POST and Servlet. I suspect that the problem is that the XML is growing way too big. Is it possible that this is the pro..
I was wondering what is the best way to search keys in an array and return it's value. Something like array_search but for keys. Would a loop be the best way?
Array:
Array([20120425] => 409 [20..
A Pandas DataFrame contains column named "date" that contains non-unique datetime values.
I can group the lines in this frame using:
data.groupby(data['date'])
However, this splits the data by the..
I have a URL "http://localhost:8888/api/rest/abc" which will give following json data. I wants to get this data in my UI using Jquery or java script. I'm trying this from couple of hours but I'm unabl..
I am attempting to import an Excel spreadsheet into Access using some simple VBA code. The issue I have run into is there are 2 worksheets in the Excel file, and I need the 2nd worksheet to be importe..
Is it possible in Microsoft SQL Server generate random int value from Min to Max (3-9 example, 15-99 e.t.c)
I know, i can generate from 0 to Max, but how to increase Min border?
This query generate ..
I am primarily a developer and dont know to use Adobe Flash CS4. Is there a simple way to add link to flash banner. I have .flv file with some items in Library and two layers.
Please, give me step by ..
I have file with chain of certificates - certificate.cer:
subject=/C...
issuer=/C=US/O=VeriSign, Inc...
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
subject=/C=US/O=VeriSign, Inc...
i..
I am trying to use a regular expression to validate a phone number and return an error when an invalid number or phone number is submitted.
MVC Code:
<ol class="row">
<li class="cell" ..
Is there a way that I could limit the length of the string to a number characters?
for e.g: I have to limit a title length to 20 {{ data.title }}.
Is there any pipe or filter to limit the length?..
I've been looking for a simple Java algorithm to generate a pseudo-random alpha-numeric string. In my situation it would be used as a unique session/key identifier that would "likely" be unique over ..
I loaded a text file containing a two column matrix (e.g. below)
[ 1 3
2 4
3 5
2 0]
My calculation is just to sum each row i.e. 1+3, 2+4, 3+5 and 2+0. I am using the below code:
da..
As a developer, I found the new Internet Explorer version to be a complete nightmare. I turned the windows feature off, but I wasn't able to install Internet Explorer 10. It says that i..
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..
This question is while postmaster is running your query in the background, how to kill or stop it?
For example, your shell or any frontend may be disconnected due to network issue, you cannot use ctr..
I have a web directory where I store some config files. I'd like to use wget to pull those files down and maintain their current structure. For instance, the remote directory looks like:
http://mysit..
Possible Duplicate:
When processing CSV data, how do I ignore the first line of data?
I am using python to open CSV file. I am using formula loop but I need to skip the first row because it h..
I have a problem while connecting to github from my PC, using git. System Win 7.
I have connection through proxy, so i specified it in git config files (both in general git folder, and in git repo fo..
I am new to Ajax and I am attempting to use Ajax while using a for loop. After the Ajax call I am running a function that uses the variables created in the Ajax call. The function only executes two ti..
Is it possible to position a DIV relative to another DIV? I imagine this can be done by first placing it inside of the reference DIV, and then using position: relative. However, I can't figure out how..
if ($("#makespan").is(":visible") == true) {
var make = $("#make").val();
}
else {
var make = $("#othermake").val();
}
Make:<span id=makespan><select id=make></select><..
I have an inherited project and there are places where it's an utter mess. This is one of them. I need to target only IE (any version).
#nav li {
float: left;
height: 54px;
background: #..
I’m looking for the best practice of how to bind to a service property in AngularJS.
I have worked through multiple examples to understand how to bind to properties in a service that is created usi..
What datatype should I choose for storing an IP Address in a SQL Server?
By selecting the right datatype would it be easy enough to filter by IP address then?..
I want to send dynamic object like
new { x = 1, y = 2 };
as body of HTTP POST message. So I try to write
var client = new HttpClient();
but I can't find method
client.PostAsJsonAsync()
So I ..
How do I extract the "program name" from a string. The string will look like this :
% O0033(SUB RAD MSD 50R III) G91G1X-6.4Z-2.F500 G3I6.4Z-8. G3I6.4
G3R3.2X6.4F500 G91G0Z5. G91G1X-10.4 G..
I don't understand why I get an error message using the substring method to declare a variable.
I want to use the first part of the URL in a comparison.
Site: http://www.elizabet.nl/wordpress
This ..
I am trying to create a simple conditional loop that will go to the next iteration if a condition is true. The code I have so far is:
For i = 2 To 24
Level = Cells(i, 4)
Return = Cells(i, 5)
..
How can I check if a user has selected something from a <select> field in HTML5?
I see <select> doesn't support the new required attribute... do I have to use JavaScript then? Or is the..
What is the correct/best/simplest way to convert a c-style string to a std::string.
The conversion should accept a max_length, and terminate the string at the first \0 char, if this occur before max_..
Is there an easy way to remove all chars before a "_"? For example, change 3.04_somename.jpg to somename.jpg.
Any suggestions for where to learn to write regex would be great too. Most places I check..
I'm having a problem executing some SQL from within Python, despite similar SQL working fine from the mysql command-line.
The table looks like this:
mysql> SELECT * FROM foo;
+-------+-----+
| fo..
I'm trying to mess with the new RecyclerView and whenever I try to run it, my app immediately crashes. It gives me NullPointerException for trying to access methods from android.support.v7.widget.Recy..
How do I accomplish variable variables in Python?
Here is an elaborative manual entry, for instance: Variable variables
I hear this is a bad idea in general though, and it is a security hole in PHP. I..
In my current repo I have the following output:
$ git branch -a
* master
remotes/origin/master
remotes/public/master
I want to delete remotes/public/master from the branch list:
$ git branch -..
I've started learning Bootstrap. My question is how to center align a column horizontally, bootstrap contains 12 column layout, there is no middle number. To be more clear if it was 11 column layout, ..
I need to do a market research on specific type of apps. so is there a way for me to know the download count of the app / any app.
Is there a way to find the number of downloads for a particular app ..
What is the best way to go about calling a function given a string with the function's name in a Python program. For example, let's say that I have a module foo, and I have a string whose content is ..
Is there an easy way to change $month = "July"; so that $nmonth = 7 (07 would be fine too).
I could do a case statement, but surely there is already a function to convert?
EDIT:
I wish I could accept..
I have Googled this and got patchy / contradictory opinions - is there actually any difference between doing a map and doing a collect on an array in Ruby/Rails?
The docs don't seem to suggest any, ..
How do I create an unmodified hex dump of a binary file in Linux using bash? The od and hexdump commands both insert spaces in the dump and this is not ideal.
Is there a way to simply write a long st..
As soon as my code gets to my while(rs.next()) loop it produces the ResultSet is closed exception. What causes this exception and how can I correct for it?
EDIT: I notice in my code that I am nesting..
This is a two part question. Someone answered a similar question the other day (which also contained info about this type of array in PHP), but I cannot find it.
1.) First off, what is the correct t..
How will I free the nodes allocated in another function?
struct node {
int data;
struct node* next;
};
struct node* buildList()
{
struct node* head = NULL;
struct node* second = NULL..
Why can't I define a workbook either of these ways? (I have the range bit in there just for a quick test.) How do I fix it?
This produces a "Compile Error: Type Mismatch"
Sub Setwbk()
Dim wbk..
I was under the assumption that REST was a web service but it seems that I am incorrect in thinking this - so, what is REST?
I've read through Wikipedia but still cant quite wrap my head around it. W..
I decided to try out IntelliJ this morning via the trial version and installed the JUnit plugin. I made a new Java project and I want to write a test case for it.
How do I add the junit.jar file to m..
I have some trivial JavaScript to effect a style change:
sel = document.getElementById('my_id');
sel.className = sel.className.replace(/item-[1-9]-selected/,'item-1-selected');
return false;
This w..
I have an MySQL table with 25000 rows.
This is an imported CSV file so I want to look at the last ten rows to make sure it imported everything.
However, since there is no ID column, I can't say:
SE..
This is PascalCase: SomeSymbol
This is camelCase: someSymbol
This is snake_case: some_symbol
So my questions is whether there is a widely accepted name for this: some-symbol? It's commonly used in ..
I'm working with some code where I need to test the type of an exception thrown by a function (is it TypeError, ReferenceError, etc.?).
My current testing framework is AVA and I can test it as a secon..
I am using tcpdump to get HTTP data by executing the below command:
sudo tcpdump -A -s 1492 dst port 80
The result of above command:
Headers, I think request and response headers.
Unread..
Through using IntelliSense and looking at other people's code, I have come across this IntPtr type; every time it has needed to be used I have simply put null or IntPtr.Zero and found most functions t..
How to extract text from the PDF document using PHP?
(I can't use other tools, I don't have root access)
I've found some functions working for plain text, but they don't handle well Unicode characte..
I have installed node.js from here http://nodejs.org/ . in my windows8 machine. copied the example server code in my server.js file
var http = require('http');
http.createServer(function (req, res)..
Yesterday my app was running perfect from Android Studio but today when I started working on my app and running it i am getting error message continuously
Installation failed with message Failed t..
How can one check if a variable is empty in Angular 2? I know that there are native ways such as
if (myVar === null) {do stuff}
but I am looking for something like Angular 1 had such as
if (angu..
I have an array of objects that is an input. Lets call it content.
When trying to deep copy it, it still has a reference to the previous array.
I need to duplicate that input array, and change one p..
I am pulling JSON via the URI module and want to write the received content out to a file. I am able to get the content and output it to the debugger so I know the content has been received, but I do..
a lot of people have answered the question of how to bind an enum to a combo box in WinForms. Its like this:
comboBox1.DataSource = Enum.GetValues(typeof(MyEnum));
But that is pretty useless withou..
Let's say I have a date in the following format: 2010-12-11 (year-mon-day)
With PHP, I want to increment the date by one month, and I want the year to be automatically incremented, if necessary (i.e...
I have a stack of divs inside of each other, all of which have an ID which specifies CSS only.
But for some reason the surrounding DIV tag only expands to it's anointed height value, and not it's def..
I've searched all over stackoverflow / google for this, but can't seem to figure it out.
I'm scraping social media links of a given URL page, and the function returns an object with a list of URLs. ..
I have a website that a lot of people view on mobile.
I have link for : Call and SMS and I want to add one for Whatsapp, so a user can click the whatsapp link I create and start a conversation with me..
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 post some data over to another page from a form. It's a shopping cart, and the form that's being submitted is being generated on the page before depending on how many items are in the cart. For exam..
I activated a virtualenv which has pip installed. I did
pip3 install Django==1.8
and Django successfully downloaded. Now, I want to open up the Django folder. Where is the folder located?
Normally it..
I'm getting this error
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysql.sock' (2)
even though I have managed to start mysql via command line in ubuntu
..
Let's say I have the following string:
something1: +12.0 (some unnecessary trailing data (this must go))
something2: +15.5 (some more unnecessary trailing data)
something4: +9.0 (some ..
How can I replace a character in a string from a certain index? For example, I want to get the middle character from a string, like abc, and if the character is not equal to the character the user spe..
my_list1 = [30,34,56]
my_list2 = [29,500,43]
How to I check if all values in list are >= 30? my_list1 should work and my_list2 should not.
The only thing I could think of doing was:
boolean = 0
de..
I am showing a Bootstrap modal window for loading when performing AJAX calls. I broadcast a "progress.init" event when the loading modal should show and a "progress.finish" when I want the modal to hi..
Is there anything like static class in java?
What is the meaning of such a class. Do all the methods of the static class need to be static too?
Is it required the other way round, that if a class co..
I have a data frame with several rows. I want to select some rows with specific rownames (such as stu2,stu3,stu5,stu9) from this dataframe. The input example dataframe is as follows:
attr1 at..
Here are the code of my login page where the login script checks for the authenticity of the user and then redirects to inbox page using header function.
<?php
session_start();
include_once('conf..
I have a function that returns a string. The string contains carriage returns and new line feeds (0x0D, 0x0A). However when I write to a file it contains only the new line feeds. Is there a way to get..
I am having trouble subsetting my data. I want the data subsetted on column x, where the first 3 characters begin G45.
My data frame:
x <- c("G448", "G459", "G479", "G406")
y <- c(1:4)
M..
What are the best practices for naming unit test classes and test methods?
This was discussed on SO before, at What are some popular naming conventions for Unit Tests?
I don't know if this is a very..
Using C++11, Ubuntu 14.04, GCC default toolchain.
This code fails:
constexpr std::string constString = "constString";
error: the type ‘const string {aka const std::basic_string}’ of
const..
If #{myBean.birthdate} is of java.util.Calendar or java.util.Date type, can I possibly format this inside the EL itself using an existing function perhaps, with the output of like the one produced by ..
I am trying to hide a button (not inside form tags) after it has been clicked. Below is the existing code. All solutions I have tried either break the functionality or interfere with the form on the p..
I'm using jQuery's ajax code to load new pages, but wanted him to get only the html of a div.
My codes:
HTML:
<body>
<div id="content"></div>
</body>
Script:
$.ajax({
..
unique_ptr<T> does not allow copy construction, instead it supports move semantics. Yet, I can return a unique_ptr<T> from a function and assign the returned value to a variable.
#include..
I would like to send an email using Gmail SMTP server through PHP Mailer.
this is my code
<?php
require_once('class.phpmailer.php');
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->CharSe..
Is there a way to search for text in all files in a directory using VS Code?
I.e., if I type "find this" in my search, it will search through all the files in the current directory and return the fil..
I have a table in Oracle which has following schema:
City_ID Name State Country BuildTime Time
When I declared the table my primary key was both City_ID and the BuildTime, but now I want to chan..
I am reading this JavaScript: Alert.Show(message) From ASP.NET Code-behind
I am trying to implement the same. So I created a static class like this:
using System;
using System.Collections.Generic;
u..
How can I find the number of occurrences of a character in a string?
For example: The quick brown fox jumped over the lazy dog.
Some example outputs are below,
'a' = 1
'o' = 4
'space' = 8
'.' = 1
..
We filmed a spokesperson on a green screen and have the video files ready in multiple formats.
With Flash we could use the wmode transparent within the param and embed tags, but is there something s..
I have just installed GitLab.
I created a project called project-x.
I have created few users and assigned it to the project.
Now I tried to clone:
git clone [email protected]:project-x.git
It p..
So I have a problem that I think is quite common but I have yet to find a good solution for. I want to make an overlay div cover the ENTIRE page... NOT just the viewport. I don't understand why this..
How can I convert a cv::Mat to a gray scale?
I am trying to run drawKeyPoints func from opencv, however I have been getting an Assertion Filed error. My guess is that it needs to receive a gray scale..
Why does the slice a remain the same? Does append() generate a new slice?
package main
import (
"fmt"
)
var a = make([]int, 7, 8)
func Test(slice []int) {
slice = append(slice, 100)
fm..
Following the "Code First Modeling" section of the Pluralsight "Getting Started with Entity Framework 5" course by Julie Lerman, I created two POCO classes with a one-to-zero-or-one relationship: a pa..
I am getting the following error:
XMLHttpRequest cannot load file:///C:/Users/richa.agiwal/Desktop/get/rm_Library/templates/template_viewSettings.html. Cross origin requests are only supported for HT..
I need to execute a batch file which executes another Java application.
I don't care whether it executes successfully or not and I don't have to capture any errors.
Is it possible to do this with Pro..
How can I make a copy values from one column to another? I have:
Database name: list
number | test
123456 | somedata
123486 | somedata1
232344 | 34
I want to have:
Database name: list
number | tes..
I'm trying to present query results, but I keep getting a blank data grid.
It's like the data itself is not visible
Here is my code:
private void Employee_Report_Load(object sender, EventArgs e)
..
Okay, so I'm trying to make a full text search in multiple columns, something simple like this:
SELECT * FROM pages WHERE MATCH(head, body) AGAINST('some words' IN BOOLEAN MODE)
Now i want to order..
Using Java, I want to go through the lines of a text and replace all ampersand symbols (&) with the XML entity reference &.
I scan the lines of the text and then each word in the text wit..
I'm trying to redirect all insecure HTTP requests on my site (e.g. http://www.example.com) to HTTPS (https://www.example.com). I'm using PHP btw. Can I do this in .htaccess?..
Is there a way to create a hyperlink without it auto resolving? I simply want some text I type to be clickable to some url when I post in slack. I don't see a way to do this yet...
I'm running a PowerShell script against many servers, and it is logging output to a text file.
I'd like to capture the server the script is currently running on. So far I have:
$file = "\\server\sha..
I am designing an app, with several button for users to click on. Once button is clicked, user is directed to appropriate website. How do I accomplish this?..
I want to put a packman game on my *.xhtml page.(I am using jsf 2 and primefaces 3.5)
However,
when I "translated" the html page in xhtml I get an error at this script:
<script>
var ..
I have this .csv file:
ID,GRADES,GPA,Teacher,State
3,"C",2,"Teacher3","MA"
1,"A",4,"Teacher1","California"
And what I want to do is read in the file using the R statistical software and read in t..
I am using Entity Framework 4.3 and using Code Fist.
I have a class
public class User
{
public int UserId{get;set;}
public string UserName{get;set;}
}
How do I tell Entity Framework that Us..
I have an EC2 instance running (FreeBSD 9 AMI ami-8cce3fe5), and I can ssh into it using my amazon-created key file without password prompt, no problem.
However, when I want to copy a file to the ins..
I have an issue in angular.js with directive/class ng-cloak or ng-show.
Chrome works fine, but Firefox is causing blink of elements with ng-cloak or ng-show.
IMHO it's caused by the converting ng-clo..
Is there a simple calculation I can do which will convert km into a value which I can add to a lat or lon float to calculate a bounding box for searches? It doesn't need to be completely accurate.
Fo..
I have two array lists e.g.
List<Date> a;
contains : 10/10/2014, 10/11/2016
List<Date> b;
contains : 10/10/2016
How can i do a check between list a and b so the value that is missing ..
I am not sure why, and the service was working fine just yesterday, all of a sudden I can not get MongoDB to start up.
[root@purr ~]# service mongod start
Starting mongod: Thu Aug 29 23:26:07.550
Th..
I'm building a support ticket tracking app and have a few models I'd like to create from one page. Tickets belong to a Customer via a ForeignKey. Notes belong to Tickets via a ForeignKey as well. I'd ..
I wrote C++ for 10 years. I encountered memory problems, but they could be fixed with a reasonable amount of effort.
For the last couple of years I've been writing C#. I find I still get lots of memo..
Whenever I try to use a Font Awesome icon in React's render(), it isn't displayed on the resulting web page although it works in normal HTML.
render: function() {
return <div><i class="f..
I have a stored procedure in SQL Server 2005 with multiple variables and I want to set the values of these variables using a select statement. All three variables come from a same table and there shou..
I just downloaded and installed Python 2.7.2 to my laptop and I am trying to run some sample programs. My laptop is running Windows XP.
When I open a cmd window and type python I get:
'python' is..
I know that you can't (at least not easily) restore a SQL Server 2012 backup on SQL Server 2008. But how does it work for SQL Server 2014 to SQL Server 2012 ?
On database level there is the property ..
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..
How exactly do you make an auto-refreshing div with JavaScript (specifically, jQuery)?
I know about the setTimeout method, but is it really a good practice ? Is there a better method?
function updat..
I need to always crop a random-sized image to a square 160x160 using only CSS.
The images should stay centered when cropped.
My markup should be:
<a href="#" class="cropper">
<img src="i..
So I know this may seem a little strange but I for sake of consistency, I would like all my urls to appear in this form: http://domain.com/page/ So far I have gotten the regular pages working but I ca..
I am trying to create a simple back button on a page. The user can arrive to this page from two different pages so I would like to know from which page he arrived. Is that possible?..
I am getting an error ./test.sh: line 13: [: missing `]' in the file test.sh
I tried using brackets and other options such as -a or by checking the size of the file p1 but the error is always there an..
I need to debug JavaScript in Internet Explorer 7.
Unfortunately, its default debugger doesn't provide me with much information. It tells me the page that the error showed up on (not the specific scri..
I have used spline interpolation to smooth a time series and would also like to add a horizontal line to the plot. But there seems to be an issue that is out of my grips. Any assistance would be reall..
This is a really simple question, but I didnt find the answer.
How to call an element in an numpy array?
import numpy as np
arr = np.array([[1,2,3,4,5],[6,7,8,9,10]])
print arr(0,0)
The code abov..
I already created a txt file using python with a few lines of text that will be read by a simple program. However, I am having some trouble reopening the file and writing additional lines in the file ..
This is a programming question asked during a written test for an interview.
"You have two singly linked lists that are already sorted, you have to merge them and return a the head of the new list wi..
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..
I read many threads about getting only the first row of a left join, but, for some reason, this does not work for me.
Here is my structure (simplified of course)
Feeds
id | title | content
-------..
I am new to HTML5 and I have done some research and found out that the use of <frameset> is outdated and from what I read <iframes> are not. So can someone help me, I want to obtain the sa..
What's the difference between these three terms? My university provides the following definitions:
Continuous Integration basically just means that the developer's working copies are synchronized wit..
I'm trying to create a new row in a table. There are two constraints on the table -- one is on the key field (DB_ID), the other constrains a value to be one of several the the field ENV. When I do a..
I want to add javascript array values into JSON values object. The other element is also replaced my element like recipients, subject, message. I got Json like:
Below is my code.
var BODY = {
..
Because of a plug-in architecture, I'm trying to add a bean programmatically to my webapp. I have a Spring bean created through the @Component annotation, and i am implementing the ApplicationContext..
I have a query that returns avg(price)
select avg(price)
from(
select *, cume_dist() OVER (ORDER BY price desc) from web_price_scan
where listing_Type='AARM'
and u_kbalikepart..
I have an image that I made in photoshop on my computer and I was wondering if there is a way to add the image to my website with CSS or HTML without having to image on a website. Thanks...
Is there a way in jQuery to create and submit a form on the fly.
Something like below.
<html>
<head>
<title> Title Text Goes Here </title>
<script src="http://..
I want to write a program that checks for the existence of a directory; if that directory does not exist then it creates the directory and a log file inside of it, but if the directory already exists,..
How do I enumerate the properties of a JavaScript object?
I actually want to list all the defined variables and their values, but I've learned that defining a variable actually creates a property of ..
I'm still fairly new at React, but I've been grinding along slowly and I've encountered something I'm stuck on.
I am trying to build a "timer" component in React, and to be honest I don't know if I'..
I have a mvc 5 project with a angular frontend . I wanted to add routing as described in this tutorial https://angular.io/guide/router. So in my _Layout.cshtml I added a
<base href="/">
and ..
I've recently discovered the awesome iOS5 custom Settings URL Scheme, which can be explained in detail at this great website.
I've found this to work, directing the user to the Settings app from my a..
I was wondering if it's possible to make a pointer not a pointer..
The problem is I have a function that accepts a pointer for an paramater for me to easily get a value to that pointer. It's a simple..
I've used the newer NotificationCompat builder and I can't get the notification to make a sound. It will vibrate and flash the light. The android documentation says to set a style which I've done with..
can you give me a simple example of an application with background service which uses bind/unbind methods to start and stop it? I was googling for it for a half-hour, but those examples use startServi..
I have a LocalDate which needs to get the first and last day of the month.
How do I do that?
eg. 13/2/2014
I need to get 1/2/2014 and 28/2/2014 in LocalDate formats.
Using threeten LocalDate class...
While importing the database in mysql, I have got following error:
1418 (HY000) at line 10185: This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging..
On the Angular 2 documentation page for using the Http service, there is an example.
getHeroes (): Observable<Stuff[]> {
return this.http.get(this.url)
.map(this.extractData..
Either I do not understand the documentation on MSDN or the documentation is incorrect.
if($user_sam -ne "" -and $user_case -ne "")
{
Write-Host "Waaay! Both vars have values!"
}
else
{
Write..
I have a class and an interface, and when I try to instantiate the interface, I get an error:
Cannot create an instance of the abstract class or interface
My code is below:
namespace MyNamespac..
I need a way to clear all the fields within a form when a user uses the browser back button. Right now, the browser remembers all the last values and displays them when you go back.
More clarificatio..
I need to add the following line to the end of a config file:
include "/configs/projectname.conf"
to a file called lighttpd.conf
I am looking into using sed to do this, but I can't work out how.
..
I have a vbscript that is used to rename files. What I need to implement into the script is something that deletes the "new file" if it already exists.
For example: I have a batch of files that are ..
I want to select 2 elements from my database table using LINQ query and I saw an example which use UNION I don't have much experience but I think that maybe this is what I need but I get an error whic..
I use VNC to connect to a Linux workstation at work. At work I have a 20" monitor that runs at 1600x1200, while at home I use my laptop with its resolution of 1440x900.
If I set the vncserver to run ..
I have a drop down that has an 'ID, Name' Pair.
Example
Jon Miller
Jim Smith
Jen Morsin
Jon MIller has ID of 101
Jim Smith has ID of 102
Jen Morsin has ID of 103
When I do the followng:
var arNam..
In Java, we can use System.currentTimeMillis() to get the current timestamp in Milliseconds since epoch time which is -
the difference, measured in milliseconds, between the current time and
mid..
I'm trying to simulate a keyboard event in Safari using JavaScript.
I have tried this:
var event = document.createEvent("KeyboardEvent");
event.initKeyboardEvent("keypress", true, true, null, false,..
I started to write a terminal text editor, something like the first text editors for UNIX, such as vi. My only goal is to have a good time, but I want to be able to show text in color, so I can have s..
I have a 3rd party C++ DLL that I call from C#.
The methods are static.
I want to abstract it out to do some unit testing so I created an interface with the static methods in it but now my program e..
I'm using the jQuery DatePicker control for the first time. I've got it working on my form, but it's about twice as big as I would like, and about 1.5 times as big as the demo on the jQuery UI page. I..
I have these things:
the file http://api.odtu.lu/composer.phar
http://api.odtu.lu/phpinfo.php
ftp access
cPanel
Cron jobs on FreeBSD
PHP, Perl, CGI-BIN, Python, Curl.
How can I install Composer? (..
I'm getting a datetime string in a format like "2009-05-28T16:15:00" (this is ISO 8601, I believe). One hackish option seems to be to parse the string using time.strptime and passing the first six ele..
I have intalled phpmyadmin recently in my system. Now I lost its username and password. I tried the below methods for login.
in etc/phpmyadmin/config.inc.php I activated the AllowNoPassword
$cfg[..
Is there any way to remove "Server" response header from IIS7? There are some articles showing that using HttpModules we can achieve the same thing. This will be helpful if we don't have admin right t..
Somehow I've managed to completely bugger the install of postgresql on Ubuntu karmic. I want to start over from scratch, but when I "purge" the package with apt-get it still leaves traces behind such..
I understand that in Razor, @Html does a bunch of neat things, like generate HTML for links, inputs, etc.
But I don't get the DisplayFor function...
Why would I write:
@Html.DisplayFor(model => ..
Just started out in my XML class and having a bit of trouble finding a solution to my error. I get this error: "The markup in the document following the root element must be well-formed.
Start locatio..