I put the RichTextBox in my Silverlight App. Do I have to create my own set of buttons to use it? I want to have a standard set of editing buttons for the text box.
I have this simple Select box that is suppose to store the selected value in a hidden input, which can then be used for POST (I am doing it this way to use data from disabled drop down menus)
<body>
<?php
$Z = $_POST[hdn];
?>
<form id="form1" name="form1" method="post" action="test.php">
<select name="whatever" id="whatever" onchange="document.getElementById('hdn').value = this.value">
<option value="1">1Value</option>
<option value="2">2Value</option>
<option value="3">3Value</option>
<option value="4">4Value</option>
</select>
<input type="hidden" name ='hdn' id="hdn" />
<input type="submit" id='submit' />
<?php
echo "<p>".$Z."</p>";
?>
</form>
</body>
The echo call works for the last 3 options (2,3,4) but if I select the first one it doesnt output anything, and even if i change first one it still doesnt output anything.
Can someone explain to me whats going on, I think it might be a syntax issue.
I have two servlet: first servlet is similar to a client and creates an HttpURLConnection to call the second servlet.
I would like send a special error, formatted like a JSON object, so I call sendError method in this way: response.sendError(code, "{json-object}")
But in the first servlet when I read error with getResponseMessage method I just get standard HTTP message and not my json object as a string.
How I can get my json string?
I want to build a simple application that looks up words against Wiktionary to see if they exist. Is there a standard API supported by the Wiktionary software that would let me do this? Alternatively, is there any way I can pull down the dictionary data that backs a Wiktionary? There are many international variants who's data I would love to put a different front-end around.
I want to display to my user how many (percent wise) of their forms are compliant with the new standard. The way I want to let them know visually is the percent amount will be colored. It will be 0xFF0000 (pure red) for 0% and 0x00FF00 (pure green) at 100%. What is the best way to calculate the color for each step along the way?
Possible Duplicate:
Any ideas for C++1y ?
What features would you like to see in the next version of the C++ standard? Try to include a detailed description, and if possible an example of the syntax.
Please list only one feature per answer.
Hi, I'm making a plugin and one of the options is a standard callback. I want the user to be able to re-run the jQuery plugin's this.each() which basically re-runs the plugin, for example;
callback: function(){
// some code to rerun the plugin here after 10 seconds
}
I know I can do this like so: $(this).plugin_name(); but it won't contain any of the options I've specified.
Any help would be appreciated.
Hi,
I'm using godaddy shared hosting, with IIS7, Integrated mode, and published up a bog standard MVC2 app to dev.lazygekko.com created with Visual Web Developer 2010.
It all works, however when any of the links are clicked, they point to dev.lazygekko.com/dev/..., dev being the folder it is pointing at.
Can anyone shed some light on what I may be doing wrong?
Many thanks.
It starts to bore me that I always have to ask questions about trifles.
I simply need a list of all plugged in USB devices and have the user select one to let the console application receive any data the USB device sends.
I can then start playing around with the data in my program.
I don't want to use library's, only standard C++ functions, and the program should work in Windows 98.
There is a python module called "_Qt". PyQt is not what I want. I was wondering if there was any documentation for the _Qt module installed with python as a standard module. I have a mac.
Hi,
I want to create a script that checks an URL and perform an action (download + unzip) when the "Last-Modified" header of the remote file changed. I thought about fetching the header with curl but then I have to store it somewhere for each file and perform a date comparison.
Does anyone have a different idea using (mostly) standard unix tools?
thanks
I'm an object oriented programmer and am looking for a good JavaScript online reference manual.
The ideal reference manual should contain:
compendious, I'm not
looking for ECMA
standard reference.
type specific, even if JavaScript is not strongly typed, function arguments and
returns have a type.
browser specific, no matter the standards every browser is different.
contain examples
be available online.
What is your favorite online JavaScript reference manual?
I have created activex control in vb6. It has standard label with its backstyle property set as transperant. Also activex control form itself has property backstyle set as transperant. In Vc++ I placed this activex control in property sheet page. But i am not getting this activex control displayed in running mode. If we change backstyle property to opaque then it is working fine. How to resolve this issue
I want to create an MXML container component that has some of its own chrome -- a standard query display, et al -- and that supports the addition of child components to it. Something a lot like the existing mx:Panel class, which includes a title label, but acts like a plain mx:Box with regards to adding children.
What's the easiest way to do this?
Edit:
To be clear, I want to be able to extend the container using MXML, so the "Multiple visual children" problem is relevant.
Essentially, I wanted to run a piece of demo code from W3c Offline Webapps page. It looks like that:
var db = window.openDatabase("notes", "", "The Example Notes App!", 1048576);
Firefox 3.5, IE8 and Chrome do not seem to get it. Is there anybody out there that actually wrote support for that? Or is this wishful thinking about 'the standard of the future'?
I am using System.out.println in my code to track the execution of a program and get some useful output. This creates results like this in the console:
Main function. Program starts.
Method getArea. Getting values
Method getSide. Side is 6
Method getArea. First value is 6
Method getSide. Side is 8
Method getArea. Second value is 8
Method getArea. Area is 48
Main function. The final area is 48
I would like to create tha method, which adds a space in front of the output every time the code goes deeper in the method call stack. For example, the same code but instead of using System.out.println, now with Misc.smartPrintln:
Main function. Program starts.
Method getArea. Getting values
Method getSide. Side is 6
Method getArea. First value is 6
Method getSide. Side is 8
Method getArea. Second value is 8
Method getArea. Area is 48
Main function. The final area is 48
The method would have this definition:
public static void smartPrintln(String string);
I don't know how to implement this functionality. Any ideas how to solve this? And, could the use of a logger offer this functionality?
If I use as below, I get no error, no output.
Why does p:panelGrid not work with ui:repeat?
Note : I don't want to use c:forEach because of the I already face a lot of JSF issue.
<p:panelGrid>
<ui:repeat value="#{MyBean.dataList}" var="data">
<p:row>
<p:column>
<h:outputText value="#{data.name}"/>
</p:column>
<p:column>
<h:outputText value="#{data.description}"/>
</p:column>
</p:row>
</ui:repeat>
</p:panelGrid>
MyBean.java
public List<Data> getDataList(){
List<Data> result = new ArrayList<Data>();
result.add(new Data("Name 1", "Description 1"));
result.add(new Data("Name 2", "Description 2"));
result.add(new Data("Name 3", "Description 3"));
result.add(new Data("Name 4", "Description 4"));
return result;
}
Expected output with primefaces
I need to work on C++ project on my windows machine. My project will consist of various classes(.h and .cpp) as well as the startup file to start the application. The preliminary design is simple but the application has the potential to gain complexity as time goes by. What I need here is ideas to set up the C++ project compiler/IDE/Makefile etc..etc. as well as some standard tools besides Visual C++ to compile/build/link projects such as these on a Windows OS.
Thanks
What are the advantages of using C++ based Classes/Objects over using legacy C Structures for managing standard Data Structures like Linked List, Stack, Tree, Queue ..etc? Let me know if the question is not clear.
Is it possible to clear a file preserving its timestamp, using standard Linux commands? For example:
echo "" file-name
converts the text file to empty, this is OK for me. But I need to keep the timestamp unchanged.
Outside the standard mouse/keyboard combination are there any other peripherals that you use to make you programming more efficient?
One option that I have considered is using AutoHotKey to script the buttons on a Logitech Wingman to run different functions/keystrokes that are not available on the keyboard.
I have a flat file source from Excel that has a structure like this:
**People** Day1 Day2 Day3 Day4
Person1 someValue ...
Person2
Person3
And i would like the package to put this information in a database with standard columns 'Person', 'Day', 'Value'. Does anybody know how to do this - at the moment because the days are going along the top, the package is assuming these are seperate data columns when they are not really and the mapping is not working.
Hi,
I am trying to use Python to read in an XML file containing some parameter names and values, e.g.
...
<parameter name='par1'>
<value>24</value>
</parameter>
<parameter name='par2'>
<value>Blue/Red/Green</value>
</parameter>
...
and then pass it a dictionary with the parameter names {'par1':'53','par2':'Yellow/Pink/Black',...} and corresponding new values to replace the old ones in the XML file. The output should then overwrite the original XML file.
At the moment I am converting the XML to a python dictionary and after some element comparison and regular expression handling, writing the output again in XML format.
I am not too happy with this and was wondering whether anyone can recommend a more efficient way of doing it?
Thanks.
I keep getting this error:
event_manager.rb:83:in': undefined method output_data' for #<EventManager:0x007fc5018320c0> (NoMethodError)
I am following the exercise on this website:
Here is my code (My error comes towards the end with DEF OUTPUT_DATA ...):
# Dependencies
require "csv"
# Class Definition
class EventManager
INVALID_PHONE_NUMBER = "0000000000"
INVALID_ZIPCODE = "00000"
def initialize
puts "EventManager Initialized."
filename = "event_attendees.csv"
@file = CSV.open(filename, {:headers => true, :header_converters => :symbol})
end
def print_names
@file.each do |line|
puts line.inspect
puts line[2] + " " + line[3]
end
end
#printing home phone number method
def print_numbers
@file.each do |line|
number = clean_number(line[:homephone])
puts number
end
end
#cleaning numbers method
def clean_number(number)
cleaner= number.delete('.' + ')' + '(' + '-')
if cleaner.length == 10
# Do Nothing
elsif cleaner.length == 11
if cleaner.start_with?("1")
cleaner = cleaner[1..-1]
else
cleaner = INVALID_PHONE_NUMBER
end
else
cleaner = INVALID_PHONE_NUMBER
end
return cleaner
end
def clean_zipcode(original)
if original.nil?
zipcode = INVALID_ZIPCODE
elsif original.length < 5
while original.length < 5
original = original.insert(0, "0")
end
else
return original
end
return zipcode
end
def print_zipcodes
@file.each do |line|
zipcode = clean_zipcode(line[:zipcode])
puts zipcode
end
def output_data
output = CSV.open("event_attendees_clean.csv", "w")
@file.each do |line|
output << line
end
end
end
end
# Script
manager = EventManager.new
#manager.print_numbers
#manager.print_zipcodes
manager.output_data
I've tried several things, checked all through the internet and I just can't figure it out myself.
I will really appreciate any help.
Thank you in advance!
I started with the standard scriptaculous drag and drop tree, and that all works fine.
Then started implementing this:
http://www.artweb-design.de/2008/5/30/scriptaculous-sortabletree
which gives a good drag and drop tree
Where I am stuck is how to get serialize the tree (unordered list)? It's not in a form, and I can't find a way to serialize it to move onto setting up the AJAX update.