When creating a flex Chart, the list of colors is always the same, something like (orange, green, blue, ... ) I imagine that the Flex Charts use any array of default colors, Is there a way to get this array ?
i am developing an app for windows phone 8 and i stuck on this code which visual studio showing invalid xaml. But Code compiles and works well. Invalid xaml Code is :
<DataTemplate x:Key="AddrBookItemTemplate">
<StackPanel Margin="0,0,0,2" Orientation="Horizontal">
<StackPanel Width="80" Orientation="Horizontal" Height="80">
<Ellipse Margin="0" Height="70" Width="70" HorizontalAlignment="Left" Stroke="{x:Null}">
<Ellipse.Fill>
<ImageBrush Stretch="Fill" ImageSource="{Binding imageBytes, Converter={StaticResource BytesToImageConverter}}"/>
</Ellipse.Fill>
</Ellipse>
</StackPanel>
<StackPanel Height="80" Margin="0" Width="380" HorizontalAlignment="Left">
<TextBlock FontWeight="Bold" Text="{Binding FirstName}" FontFamily="Segoe WP Semibold" FontSize="30" VerticalAlignment="Top" Margin="5,0,0,0" HorizontalAlignment="Left" />
<TextBlock Text="{Binding Phone}" FontFamily="Segoe WP" FontSize="24" Foreground="{StaticResource PhoneTextBoxReadOnlyBrush}" Margin="5,0,0,-12" Width="320" HorizontalAlignment="Left" VerticalAlignment="Top"/>
</StackPanel>
</StackPanel>
</DataTemplate>
I am serializing image by converting it to byte, it works fine but if image is null it gives an error.
code behind:
if (e.Results != null)
{
List<AddressBook> source = new List<AddressBook>();
foreach (var result in e.Results)
{
if (result.PhoneNumbers.FirstOrDefault() != null && result.GetPicture()!=null)
{
BitmapImage bmp = new BitmapImage();
BitmapImage nullbmp = new BitmapImage();
if (result.GetPicture() == null)
{
bmp.UriSource = new Uri(@"/Images/ci2.png", UriKind.RelativeOrAbsolute);
}
else
{
bmp.SetSource(result.GetPicture());
}
listobj.Add(new AddressBook()
{
FirstName = result.DisplayName != null ? result.DisplayName : "",
imageBytes = AddressBook.imageConvert(bmp),
EmailAddress = "",
LastName = "",
Phone = result.PhoneNumbers.FirstOrDefault() != null ? result.PhoneNumbers.FirstOrDefault().PhoneNumber : "",
});
}
}
Above code show an error "object reference not set to instance of an object". I want to show the default image (or color) in ellipse when image is null.What should I do?
Is it possible to create and manage custom permission types in Jetspeed. In addition to the default - folder, page, link, portlet I would like to add document as a type.
I want to then use the list of permissions of type "document" that a principal has to manage access to documents.
Thanks
We got attacked by some very-bored teenagers registering in our forums and posting very explicit material using anonymous proxy websites, like http://proxify.com/
Is there a way to check the registration IP against a black list database? Has anyone experienced this and had success?
I list products on my homepage and on a company details page.
I use the exact same HTML, but for some reason the product appears different:
The productname is "Artikel 1".
Here the product is displayed correctly: http://www.zorgbeurs.nl/
Notice how the green price area is right below the product.
But here: http://www.zorgbeurs.nl/bedrijven/76/mymedical
the green price area is all the way at the bottom of the page.
Why?
In Mercurial, how do you examine a single changeset? hg log -l 5 will give me a summary of the newest 5 changesets, but how do I get a list of the files changed in one changeset? I don't want to do a diff.
This shows how to have a static variable inside an object or context:
http://www.mail-archive.com/[email protected]/msg04764.html
But the scope is too large for some needs, is it possible to have a static variable inside an object function ?
Ok, here is the question.
Imagine I have a ModelForm which have only two fields. like this one:
class ColorForm(forms.Form):
color_by_name = forms.CharField()
color = forms.IntegerField(widget = forms.Select(choices=COLOR_CHOICES))
So a user can either input a color name, a choose it from a list. Color is required, but that doesn't mean, that user should enter it manually. There do I put validation, so that my code checks if user selected color in dropdownlist and if not then he should write it manually?
We use Xunit.net as our unit test framework for use on our .NET4 assemblies. We have it integrated into our TFS 2010 team builds quite successfully.
I now want to add code coverage to the nightly builds as well.
Does anyone have a list of coverage tools that work on 4.0 assemblies and could be integrated into our automated builds?
I've recently discovered, to my astonishment (having never really thought about it before), machine-sorting Japanese proper nouns is apparently not possible.
I work on an application that must allow the user to select a hospital from a 3-menu interface. The first menu is Prefecture, the second is City Name, and the third is Hospital. Each menu should be sorted, as you might expect, so the user can find what they want in the menu.
Let me outline what I have found, as preamble to my question:
The expected sort order for Japanese words is based on their pronunciation. Kanji do not have an inherent order (there are tens of thousands of Kanji in use), but the Japanese phonetic syllabaries do have an order: ???????????????????... and on for the fifty traditional distinct sounds (a few of which are obsolete in modern Japanese). This sort order is called ???? (gojuu on jun , or '50-sound order').
Therefore, Kanji words should be sorted in the same order as they would be if they were written in hiragana. (You can represent any kanji word in phonetic hiragana in Japanese.)
The kicker: there is no canonical way to determine the pronunciation of a given word written in kanji. You never know. Some kanji have ten or more different pronunciations, depending on the word. Many common words are in the dictionary, and I could probably hack together a way to look them up from one of the free dictionary databases, but proper nouns (e.g. hospital names) are not in the dictionary.
So, in my application, I have a list of every prefecture, city, and hospital in Japan. In order to sort these lists, which is a requirement, I need a matching list of each of these names in phonetic form (kana).
I can't come up with anything other than paying somebody fluent in Japanese (I'm only so-so) to manually transcribe them. Before I do so though:
Is it possible that I am totally high on fire, and there actually is some way to do this sorting without creating my own mappings of kanji words to phonetic readings, that I have somehow overlooked?
Is there a publicly available mapping of prefecture/city names, from the government or something? That would reduce the manual mapping I'd need to do to only hospital names.
Does anybody have any other advice on how to approach this problem? Any programming language is fine--I'm working with Ruby on Rails but I would be delighted if I could just write a program that would take the kanji input (say 40,000 proper nouns) and then output the phonetic representations as data that I could import into my Rails app.
??????????
I've just been handed a pile of Java source that, I suspect, is in ISO-8859-8. Eclipse's menu of charsets, here on my Mac, does not include that. Or any of a wide variety of other encodings supported by the JDK.
Is there a recipe for expanding the list of encodings that show up in the menu?
Is there a possibility to create any python object that will be not sortable? So that will be an exception when trying to sort a list of that objects?
I created a very simple class, didn't define any comparison methods, but still instances of this class are comparable and thus sortable. Maybe, my class inherits comparison methods from somewhere. But I don't want this behaviour.
I have an array containing a list of files. I want to sort it in a way that it will let me have .txt files in the beginning of the array and the rest of files after that.
This is what I'm doing now, which works fine.
@files = (grep(/\.txt$/,@files),grep(!/\.txt$/,@files));
Is there a better way to do it though?
I'm wondering whether anyone here has ever used a skip list. It looks to have roughly the same advantages as a balanced binary tree, but is simpler to implement. If you have, did you write your own, or use a pre-written library (and if so, what was its name)?
There is an email service ExactTarget with web service API.
There are samples (in php though) for sending email to whole list instantly, or to single subscriber by triggered action.
It's pretty hard to get in it's documentation, and I couldn't find explanation how to send email to a single subscriber instantly without having some triggering actions.
Any help or advice will be great.
I have an UL:
<ul id="news-feed">.....</ul>
I'd like to be able to append a LI to the top of the list and have that appended item slideDown into place.
$("#news-feed").append('<li">This is my item</li>').hide().slideDown();
Problem I'm having is the above code is sliding the news-feed item down, and not the appended item. Any ideas?
Hey Everyone,
I was wondering if any one had compiled a list of the most commonly used Android devices so I can get an idea of what I should test for. Even better would be suggested configurations for emulating each device.
Thanks,
Rob
As the title says, are there any sources (web pages etc) of summarised changes at each API level?
I have an app which I've put out to a small group of beta testers and I already fell foul of Environment.getExternalFilesDir(), which I hadn't noticed was introduced in API Level 8, when a couple of the guys tried it on Android v2.1 devices.
The majority of my code should be pretty generic but it would be useful if I could find a condensed/summarised list/table or similar that I can quickly glance over.
hi
I am going through my first lessons with spring 3.I created a dynamic web app in eclipse with the following structure.
spring3mvc \src\my.spring.HelloWorldController.java
\WebContent
|
|-----WEB-INF\jsp\hello.jsp
|-----index.jsp
|-----web.xml
|-----WEB-INF\spring-servlet.xml
|-----WEB-INF\lib\...*.jar files
I created the spring-servlet.xml as below
<context:component-scan base-package="my.spring" />
<bean id="viewResolver"
class="org.springframework.web.servlet.view.UrlBasedViewResolver">
<property name="viewClass"
value="org.springframework.web.servlet.view.JstlView" />
<property name="prefix" value="/WEB-INF/jsp/" />
<property name="suffix" value=".jsp" />
</bean>
and coded the controller
package my.spring;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
@Controller
public class HelloWorldController {
@RequestMapping("/hello")
public ModelAndView helloWorld() {
String message = "Hello World, Spring 3.0!";
return new ModelAndView("hello", "message", message);
}
}
index.jsp has a link to hello view
<html>
<body>
<a href="hello.html">Say Hello</a>
</body>
</html>
finally in hello.jsp I have put
<html>
<body>
${message}
</body>
</html>
My web.xml has
<display-name>Spring3MVC</display-name>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>spring</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>spring</servlet-name>
<url-pattern>*.html</url-pattern>
</servlet-mapping>
When I run the app on Tomcat6 server( thru eclipse),I can see the index page at
http://localhost:8080/Spring3MVC/ .It displays the link to hello page.When I click on it(http://localhost:8080/Spring3MVC/hello.html),I get a 404 error.
message /Spring3MVC/hello.html
description The requested resource (/Spring3MVC/hello.html) is not available.
Any idea how I can solve this?
thanks
mark.
I am looking for a service that can tell me if a given name is Male or Female. I have a list of names (possibly geo-tagged) and I want to filter out the Males/Females out of them. Any thoughts?
Hi
I have 4 tables: machines, categories, users and usersMAchines
machines is linked to categories and usersMachines.
Machines
--------
idMachine
machine
idCat
Categories
--------
idCat
category
Users
--------
idUser
nameUser
UsersMachines
--------
idUserMachine
idUser
IdMachine
To list machines, filtered for any field of 3 previous table, I have this query:
select distinct machines.*,categories.category from( (machines left join UsersMachines on machines.idMachine=UsersMachines.idMachine) left join categories on machines.idcat=categories.idcat)
Ok,runs fine.
But Using the same query, how I can do to filter the machines that only have linked users ?
Hello everyone. Does anyone know how to access webcam native controls such as the zoom, brightness level from the command line interface?
How does programs like messenger and skype list those options and are able to control those settings?
I am trying to do this to an AIR 2 app and know that we can access NativeProcesses etc now.
Anyone have any ideas?
Thanks for the help.
Hello everyone! I've been contemplating writing a simple "event log" that takes a paramater list and stores event messages in a log file, trouble is, I forsee this file growing to be rather large (assume 1M entries or more) the question is, how can I implement this system without pulling teeth, I know that SQL would be a possible way to go.
XML would be ideal but not really practical for scaleability if i'm not going nuts.
Example Log Entry
-----Time Date-------- ---------Sender----------------------- ---------Tags---------- --Message----------
12/24/2008 24:00:00 $DOMAIN\SYSTEM\Application$ :Trivial: :Notification: It's Christmas in 1s
Hi,
i jus friend reference function so i pass the user id through url like below
www.example.com?fid=22
i need to set this as a session or cookie which access to all modules in drupal 6.
if i set session it return for tht particular module . set cookie is not workin at all.
$user-new_property works only on particular page where set if i move to another page no new_property in $user variable object list .
Thanxs in advance,
Gobi