I want to add twitter oauth just like facebook connect in my site like this site http://mytweeple.com/default.aspx. Need help on this how i can do this.
Regards,
I just starting reading about SEO and realized that I should change my "GET" queries to / separated keywords for SEO purposes.
Here's my question:
I have a multi-select checkbox on my form, so my query string would be:
http://www.domainname.com/searchitem.html?cat[]=A&cat[]=B&cat[]=C¶m1=p1¶m2=p2
Whats the convention for handling this kind of queries? changing it to search/catA/catB/catC/p1/p2 doesn't seem right to me but i don't know what else to do
Thanks
Anyone know how I can use httponly cookies for sessions and cookies on the app engine?
In the javadoc for the Cookie class, http://java.sun.com/javaee/6/docs/api/javax/servlet/http/Cookie.html#setHttpOnly(boolean) ,
there is a setHttpOnly method.
I get a compiler error when trying to use it when developing for app engine though.
The method was introduced in the Servlet 3.0 spec, so its pretty new.
I'm trying to find a list of TLD's to their corresponding whois server, for example
.com americanWhoisServer
.net someOtherWhoisServer
.au australianWhoisServer
In the end i'm aiming for something like a Dictionary where the key is the TLD and the value is the whois server address (eg whois.apnic.net).
Ah snap, i just realised that i am given the IP addresses and not domain names but a list could still come in handy.
How can i determine which whois server to use given a IP address? Guess and check?
I have seen samples of closure from - http://stackoverflow.com/questions/36636/what-is-a-closure
Can anyone provide simple example of when to use closure?
Specifically, scenarios in which closure makes sense?
Lets assume that the language doesn't have closure support, how would one still achieve similar thing?
Not to offend anyone, please post code samples in a language like c#, python, javascript, ruby etc. I am sorry, I do not understand functional languages yet.
I am using following text editor for my windows forms application
http://www.codeproject.com/KB/edit/editor_in_windows_forms.aspx
This works great and a wonderful control, however I am trying to accomplish one task i.e. I wanted to insert a custom tag to the underlying html for eg if user clicks on a button on form I want to insert a tag <myTag>value</myTag>" at the cursor's position of text editor.
Can anyone guide me how to achieve this?
I have a string and I need to find out whether it is a unix timestamp or not, how can I do that effectively?
I found this thread via Google, but it doesn't come up with a very solid answer, I'm afraid. (And yes, I cribbed the question from the original poster on the aforementioned thread).
http://www.sitepoint.com/forums/showthread.php?t=585963
Hello
I have just set up the Eclipse Android SDK environment. I tried creating a basic HelloWorld app by following this page http://developer.android.com/guide/tutorials/hello-world.html
As soon as i set up the project i get get this error in the console
[2010-06-09 23:12:22 - Helloworld] dyld: Symbol not found: _open$UNIX2003
[2010-06-09 23:12:22 - Helloworld] Referenced from: /usr/lib/android-sdk-mac_86/platforms/android-3/tools/aapt
[2010-06-09 23:12:22 - Helloworld] Expected in: /usr/lib/libSystem.B.dylib
[2010-06-09 23:12:22 - Helloworld]
Is it something to do do with my MacOS version ?
plz hlp ! :S
Hi! My simple donation form submits properly except for Internet Explorer. I'm sure it has to do with issues with change() and focus() or blur(), but all my hundreds of attempts so far have failed me. I tried using .click() instead of change() as mentioned in this post:http://stackoverflow.com/questions/208471/getting-jquery-to-recognise-change-in-ie (and elsewhere), but I could not get it to work! ... so I am overlooking something simple perhaps. Any help is greatly appreciated!!
Here is the link to the page: http://www.wsda.org/donate
HTML FORM:
<form id="donationForm" method="post" action="https://wsda.foxycart.com/cart.php" class="foxycart">
<input type="hidden" id="name" name="name" value="Donation" />
<input type="hidden" id="price" name="price" value="10" />
<div class="row">
<label for="price_select">How much would you like to donate?</label>
<select id="price_select" name="price_select">
<option value="10">$10</option>
<option value="20">$20</option>
<option value="50">$50</option>
<option value="100">$100</option>
<option value="300">$300</option>
<option value="0">Other</option>
</select>
</div>
<div class="row" id="custom_amount">
<label for="price_input">Please enter an amount: $</label>
<input type="text" id="price_input" name="price_select" value="" />
</div>
<input type="submit" id="DonateBtn" value="Submit Donation »" />
</form>
JQUERY:
// donation form
$("#custom_amount").hide();
$("#price_select").change(function(){
if ($("#price_select").val() == "0") {
$("#custom_amount").show();
} else {
$("#custom_amount").hide();
}
$("#price").val($("#price_select").val());
});
$("#price_input").change(function(){
$("#price").val($("#price_input").val());
});
Hello,
I am parsing a XML file against a XSD containing some regex patterns used for checking input data, but only this regex generates an error, even if it passes into the Eclipse XSD plugin:
InvalidRegex: Pattern value
'(((com|it|org)\.)+(\b[a-z]+[.]{1}\b)+)?[A-Z]{1}[A-Za-z]+'
is not a valid regular expression. The reported error was:
'This expression is not supported in the current option setting.'.
So, with SAX validator where can I find the fatal "current option setting"?
I'm looking for a single command that effectively does the following:
git clone git://github.com/rails/rails.git --depth=1
rm -rf rails/.git
Is there a command that does this?
I've read in the MSDN MSBuild Task Reference about XmlPeek task at http://msdn.microsoft.com/en-us/library/ff598684(v=VS.100).aspx
but I cannot use it in my MSBuild script. If you have used this before, please show me how!
Could anybody tell me with the pseudo class :active from css only works in IE7?
You can check my code on the following web page.
www.ercesar.com
Thnaks in advance.
Cesar.
So I have a URL that I need my Flash movie to extract variables from:
example link:
http://www.example.com/example_xml.php?aID=1234&bID=5678
I need to get the aID and the bID numbers.
I'm able to get the full URL into a String via ExternalInterface
var url:String = ExternalInterface.call("window.location.href.toString");
if (url) testField.text = url;
Just unsure as how to manipulate the String to just get the 1234 and 5678 numbers.
Appreciate any tips, links or help with this!
I'm alreadu using jquery library on site.
What are pros and cons to use jQuery SWFObject plugin over origional swfobject
jQuery SWFObject plugin
http://jquery.thewikies.com/swfobject/
Can anyone explain why I'm getting this compile error?
Duplicate 'Rad.Core.Aop.MethodArgumentValidation' attribute E:\Scripting\Rad.Core\Properties\AssemblyInfo.cs
This is the code:
[assembly: Rad.Core.Aop.MethodArgumentValidation(AttributeTargetTypes="Rad.*", AttributePriority=1)]
[assembly: Rad.Core.Aop.MethodArgumentValidation(AttributeTargetTypes = "Rad.Core.Aop.*", AttributePriority = 2, AttributeExclude=true)]
Here is the declaration of the aspect:
[Serializable]
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Property)]
[MulticastAttributeUsage(MulticastTargets.Method, AllowMultiple=true)]
public class MethodArgumentValidationAttribute : OnMethodInvocationAspect
{ ... }
It looks like I'm following this example: http://www.sharpcrafters.com/blog/post/multicasting-of-custom-attributes.aspx
Can anyone help?
I'm trying to use XPath to select the items which have a facet with Location values, but currently my attempts even to just select all items fail: The system happily reports that it found 0 items, then returns (instead the nodes should be processed by a foreach loop). I'd appreciate help either making my original query or just getting XPath to work at all.
XML
<?xml version="1.0" encoding="UTF-8" ?>
<Collection Name="My Collection" SchemaVersion="1.0" xmlns="http://schemas.microsoft.com/collection/metadata/2009" xmlns:p="http://schemas.microsoft.com/livelabs/pivot/collection/2009" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<FacetCategories>
<FacetCategory Name="Current Address" Type="Location"/>
<FacetCategory Name="Previous Addresses" Type="Location" />
</FacetCategories>
<Items>
<Item Id="1" Name="John Doe">
<Facets>
<Facet Name="Current Address">
<Location Value="101 America Rd, A Dorm Rm 000, Chapel Hill, NC 27514" />
</Facet>
<Facet Name="Previous Addresses">
<Location Value="123 Anywhere Ln, Darien, CT 06820" />
<Location Value="000 Foobar Rd, Cary, NC 27519" />
</Facet>
</Facets>
</Item>
</Items>
</Collection>
C#
public void countItems(string fileName)
{
XmlDocument document = new XmlDocument();
document.Load(fileName);
XmlNode root = document.DocumentElement;
XmlNodeList xnl = root.SelectNodes("//Item");
Console.WriteLine(String.Format("Found {0} items" , xnl.Count));
}
There's more to the method than this, but since this is all that gets run I'm assuming the problem lies here. Calling root.ChildNodes accurately returns FacetCategories and Items, so I am completely at a loss.
Thanks for your help!
I'm trying to pull a report down using the following:
https://user:[email protected]/ReportServer?%2fFolder+1%2fReportName&rs:Format=CSV&rs:Command=Render
And it just pulls an html page and not the csv file. Any ideas?
Hello,
I am trying to generate C# code from an XML schema with xsd.exe with Visual Studio RC1 (version 10.0.30128.1) but get the follwoing error:
C:\Developmentxsd CR2008Schema.xsd /classes
Microsoft (R) Xml Schemas/DataTypes support utility
[Microsoft (R) .NET Framework, Version 4.0.30128.1]
Copyright (C) Microsoft Corporation. All rights reser
Process is terminated due to StackOverflowException.
The xsd is http://www.businessobjects.com/products/xml/CR2008Schema.xsd
Any help appreciated.
Thanks,
Staffan
I recently changed some of my pages to be displayed via ajax and I am having some confusion as to why the utf8 encoding is now displaying a question mark inside of a box, whereas before it wasn't.
Fore example. The oringal page was index.php. charset was explicitly set to utf8 and is in the <head>. I then used php to query the database
Heres is the original index.php page:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Title here</title>
</head>
<body class='body_bgcolor' >
<div id="main_container">
<?php
Data displayed via php was simply a select statement that output the HTML.
?>
</div>
However, when I made the change to add a menu that populated the "main_container" via ajax all the utf8 encoding stopped working. Here's the new code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Title here</title>
</head>
<body class='body_bgcolor' >
<a href="#" onclick="display_html('about_us');"> About Us </a>
<div id="main_container"></div>
The "display_html()" function calls the javascript page which uses jquery ajax call to retrieve the html stored inside a php page, then places the html inside the div with an id of "main_container". I'm setting the charset in jquery to be utf8 like:
$.ajax({
async: false,
type: "GET",
url: url,
contentType: "charset=utf-8",
success: function(data)
{
$("#main_container").html(data);
}
});
What am I doing wrong?
Hey guys
I am looking for a good solid introduction book to the fundementals of network programming in C#. For example is have looked at this one
http://www.amazon.com/C-Network-Programming-Richard-Blum/dp/0782141765/ref=pd_sim_b_5
but it is quite old now. Anyone used one recently, i would greatly appriciate it
thanks
dan
Hello,
I have implemented successfully this code:
http://stackoverflow.com/questions/1020762/does-anyone-know-how-to-write-an-apple-push-notification-provider-in-c
It works great. But I have a question, can anybody help me how to send non english messages like Hebrew Or Arabic?
If the string contains any non english characters, it is not sent.
Thank you
*UPDATE: The problem probably involves the tour-template as I've discovered that it thinks the 'name' attribute is undefined. This leads me to think that it's not an array being passed on to the ToursView, but for some reason a string. *
After studying similar questions on StackOverflow:
How to handle nested CompositeView using Backbone.Marionette?
How do you properly display a Backbone marionette collection view based on a model javascript array property?
Nested collections with Backbone.Marionette
... and Derick Bailey's excellent blog's on this subject:
http://lostechies.com/derickbailey/2012/04/05/composite-views-tree-structures-tables-and-more/
... including the JSFiddle's:
http://jsfiddle.net/derickbailey/AdWjU/
I'm still having trouble with a displaying the last node of a nested CollectionView of CompositeViews. It is the final CollectionView within each CompositeView that is causing the problem.
CollectionView {
CompositeView{
CollectionView {} //**<-- This is the troublemaker!**
}
}
NOTE: I have already made a point of creating a valid Backbone.Collection given that the collection passed on to the final, child CollectionView is just a simple array.
Data returned from the api to ToursList:
[
{ "id": "1",
"name": "Venice",
"theTours": "[
{'name': u'test venice'},
{'name': u'test venice 2'}
]"
},
{ "id": "2",
"name": "Rome",
"theTours": "[
{'name': u'Test rome'}
]"
},
{ "id": "3",
"name": "Dublin",
"theTours": "[
{'name': u'test dublin'},
{'name': u'test dublin 2'}
]"
}
]
I'm trying to nest these in a dropdown where the nav header is the 'name' (i.e. Dublin), and the subsequent li 's are the individual tour names (i.e. 'test dublin', 'test dublin2', etc.)
Tour Models and Collections
ToursByLoc = TastypieModel.extend({});
ToursList = TastypieCollection.extend({
model: ToursByLoc,
url:'/api/v1/location/',
});
Tour Views
ToursView = Backbone.Marionette.ItemView.extend({
template: '#tour-template',
tagName: 'li',
});
ToursByLocView = Backbone.Marionette.CompositeView.extend({
template: '#toursByLoc-template',
itemView: ToursView,
initialize: function(){
//As per Derick Bailey's comments regarding the need to pass on a
//valid Backbone.Collection to the child CollectionView
//REFERENCE: http://stackoverflow.com/questions/12163118/nested-collections-with-backbone-marionette
var theTours = this.model.get('theTours');
this.collection = new Backbone.Collection(theTours);
},
appendHtml: function(collectionView, itemView){
collectionView.$('div').append(itemView.el);
}
});
ToursListView = Backbone.Marionette.CollectionView.extend({
itemView: ToursByLocView,
});
Templates
<script id="tour-template" type="text/template">
<%= name %>
</script>
<script id="toursByLoc-template" type="text/template">
<li class="nav-header"><%= name %></li>
<div class="indTours"></div>
<li class="divider"></li>
</script>
What is the easiest way to have an application launch at startup? This is a java application (java com.run.run.Run) etc.
How would I have it launch as a user and possibly have access to write to some log file where the user has permissions to write?
And if I don't end up doing that, how would I launch the application as the root user at startup.