if I add an item to the $_COOKIE array as such:
setcookie("favorites[]", "value", time()+3600);
I can delete any item from the $_COOKIE[favorites] array like this:
setcookie("favorites[$deletekey]", "", time()+3600);
EXCEPT the first one added so this does not work:
setcookie("favorites[0]", "", time()+3600*24);
How can I…
I am maintaining this servlet that has a HttpServletResponse response that replies back to the client an XML message. I want to take the XML message and convert it to JSON, then send the JSON back.
I want to avoid writing my own JSON converter if possible. Does anyone have a good method of doing this?
I googled for this:…
I'm looking for a good jQuery plugin that allows HTML5 video playback, with graceful fallback to Flash (and potentially further, to default system player, etc). I've googled, but nothing I've found has been quite what I'm looking for. Any suggestions?
I'm converting an array of integers into a char by iterating through the whole array, and then I'm adding the resulting string to ncurses's method new_item. For some reason I'm doing something wrong the way I reallocate memory, thus I get the the first column as:
-4 Choice 1 0 Choice 1
4 Choice 2 …
I have inherited some code from a guy whose favorite past time was to shorten every line to its absolute minimum (and sometimes only to make it look cool). His code is hard to understand but I managed to understand (and rewrite) most of it.
Now I have stumbled on a piece of code which, no matter how hard I try, I cannot…
Does anybody know if there is a .net equivalent of htmlunit or similar library?
I've heard that people have used IKVM to convert the htmlunit library. But I have also heard that the converted code is slow.
Requirements:
Headless browser
Support javascript
Handle cookies
.Net
I have two views within one .xib (one view for landscape, another for portrait). How can I use the same IBOutlet I've defined in @interface section for both labels if they have the same functionality. (ctrl+dragging to both of them does'n help-each time I drag to second, the first one loses its outlet).
What i have is four comboboxes and two files. If the column matches the combobox i need to write it out to a file but it has to appened with the second combobox. So for example
Combobox1: Apple | Orange
Combobox2: Pineapple | Plum
I have selected Apple Plum
I need to search threw a text file and find whatever…
I'd like to change the color of a standard Android button slightly in order to better match a client's branding. For example, see the "Find a Table" button for the OpenTable application:
The best way I've found to do this so far is to change the Button's drawable to the following drawable located in…
I am inside a class on a view-based app, one that was creating with one view controller.
WHen I am inside the view controller I can access its view using self.view, but how do I access the same view if I am inside a class?
[[UIApplication sharedApplication] delegate]... //??? what do I put here?
…
I am using a combination of the Enterprise library and the original Fill method of ADO. This is because I need to open and close the command connection myself as I am capture the event Info Message
Here is my code so far
// Set Up Command
SqlDatabase db = new…
I'm trying to write an XPath that will select certain nodes that contain a specific word.
In this case the word is, "Lockwood". The correct answer is 3. Both of these paths give me 3.
count(//*[contains(./*,'Lockwood')])
count(BusinessLetter/*[contains(../*,'Lockwood')])
But…
I'm tring to run build of C# solution on vs2008 and discovered that pre-build events for projects containing in the solution were not executed. What can be reason of such behavior ?
For my Social Networking Site, I would like to build a facebook, or twitter similar URL rewriting naming convention.
Using Twitter as an example, they have pages labeled twitter.com/about and another page labeled twitter.com/{$username}
However, how do you differentiate…
Does anyone have an XML style sheet that'll convert wiki-like markup to HTML? Or is that a bad idea? I only found one style sheet that'll convert HTML to wiki-like markup, view-source:http://mozile.mozdev.org/0.8/demos/html2wiki.xsl . Or is this a bad idea? Basically,…
i have a 2.2.3 app which i upgraded to 2.3.2
it's a multi-site (using subdomain) that creates one top level session for all sites.
this is how i change the domain in production.rb:
ActionController::Base.session_options[:domain] = "xxx.com"
# in rails 2.2.2, this…
I'm trying to write a program that needs smooth orientation sensor samples as the phone is rotated all around. Every time the orientation of the phone is changed, it interrupts the data and freezes the program while the layout changes. How can I lock it in one…
Problem Statement
I'm writing a very basic WPF application to alter the contents of a configuration file. The data format is an XML file with a schema. I want to use it as a learning project for MVVM, so I have duly divided the code into
Model: C#…
I am looking for an encrypted version control system . Basically I would like to
-have all files encrypted locally before sending to the server. the server should never receive any file or data unencrypted.
-Every other feature should work pretty…
I currently have a database structure with two important tables.
1) Food Types (Fruit, Vegetables, Meat)
2) Specific Foods (Apple, Oranges, Carrots, Lettuce, Steak, Pork)
I am currently trying to build a SQL statement such that I can have the…
I have a message class that I use like so:
RedirectMsg::go('somepage.php', MessageType::ERROR, 'Your message here.');
Would it be better to use a regular function? Or is this a personal preference issue?
redirectMsg('somepage.php',…
I'm using Json to retrieve data from a database, construct some html, and put it to the page, but I'm getting a syntax error after my tag, which is the last tag in the string from my php file.
PHP
if($QString == ""){
$query =…
As you can see in the pic, the buttons from the toolbar on the right align perfectly with the segmented control on the left. They are displayed on the navigation bar. For some reason though, the background of the toolbar seems…
Hello,
With a jQuery UI dialog, I need to be able to set tooltips on buttons... I have the following code:
buttons: {
'My Button' : function(e) {
$(e.target).mouseover(function() {
alert('test');
});
}
…