converter

WPF: how to use 2 converters in 1 binding?

丶灬走出姿态 提交于 2019-12-02 15:45:55
I have a control that I want to show/hide, depending on the value of a boolean. I have a NegatedBooleanConverter (switches true to false and vice versa) and I need to run this converter first. I have a BooleanToVisibilityConverter and I need to run this converter after the NegatedBoolConverter. How can I fix this problem? I want to do this in XAML. edit: this is a possible solution. That doesn't seem to work. It first converts the value with the seperate converters and then does something with the converted values. What I need is: Convert the value with the first converter (this gives

How can doc/docx files be converted to markdown or structured text?

一个人想着一个人 提交于 2019-12-02 14:21:44
Is there a program or workflow to convert .doc or .docx files to Markdown or similar text? PS: Ideally, I would welcome the option that a specific font (e.g. consolas ) in the MS Word document will be rendered to text-code: ```....``` . massives Pandoc supports conversion from docx to markdown directly: pandoc -f docx -t markdown foo.docx -o foo.markdown Several markdown formats are supported: -t gfm (GitHub-Flavored Markdown) -t markdown_mmd (MultiMarkdown) -t markdown (pandoc’s extended Markdown) -t markdown_strict (original unextended Markdown) -t markdown_phpextra (PHP Markdown Extra) -t

Can't play mp4 converted file - JavaFX 2.1

纵饮孤独 提交于 2019-12-02 13:48:29
问题 I have converted my .mov video to .mp4 , but when I play the video in my javafx application, it doesn't work, I can hear the audio of the video file but without pictures ! maybe the .mp4 is not in the right codec! any idea or solution? UPDATE With the same code I have played another mp4 video, in the same conditions (plateforme, JFX Version, ...), so I'm concluding that I have problem with this mp4 converted file, ie the software that I'm using to convert the mov file doesn't generate the

Python convert JSON to CSV

本小妞迷上赌 提交于 2019-12-02 13:43:49
问题 i have a JSON file which contains: { "leaderboard": { "$": [ { "userId": 1432024286216, "userName": "Joe Bloggs", "score": 111111, "gameType": "standard", "dateCreated": 1432024397833, "_id": 1432024397833 }, { "userId": 1432024626556, "userName": "Jane Bloggs", "score": 222222, "gameType": "demo", "dateCreated": 1432024730861, "_id": 1432024730861 } ] }, "users": { "$": [ { "userId_U": 1432024286000, "userName_U": "Paul Bloggs", "score_U": 333333, "gameType_U": "standard", "dateCreated_U":

Getting value from object dictionary C#

倾然丶 夕夏残阳落幕 提交于 2019-12-02 12:34:46
问题 I am using the LiveConnect sdk to get some user info. After doing whatever is necessary for that, this is the result I'm getting: { "id": "123456789", "name": "a b", "first_name": "a", "last_name": "b", "link": "https://profile.live.com/", "work": [], "gender": null, "emails": { "preferred": "a@live.com", "account": "a@live.com", "personal": null, "business": null }, "addresses": { "personal": { "street": null, "street_2": null, "city": null, "state": null, "postal_code": null, "region": null

Need <f:convertNumber> to throw error when fractions or separator characters are used

谁都会走 提交于 2019-12-02 12:00:18
问题 I have an InputText component wired to a Bean property of int type. However, I'm forced to use NumberConverter only Even when I specify integerOnly = true , it accepts doubles by removing the fractional part and no error is thrown in Validation phase My question is, is there a way for NumberConverter to throw conversion exception and error message (preferably client side, I mean, when I tab out of the field) We are using JSF 1.2 (Actually, NumberConverter's getAsObject() has this code which

How do you replace a label in Tkinter python?

心不动则不痛 提交于 2019-12-02 11:55:37
I am a newbie programmer and I am making a currency converter....It is still in progress, but could anyone help me to try to replace the label made in 'def convert()'...To be clear, right now everytime I convert, a new label pops up underneath, but what I want to happen is that my label gets replaced everytime I click convert... import sys from Tkinter import * root = Tk() root.title("CURRENCY CONVERTER") root.geometry('600x300+30+100') root.config(bg="#000000") #*************************************GBP*************************************# def rate(): rate = 1 if var.get() =='GBP' and var2

Expression Error: Named Object: javax.faces.convert.IntegerConverter not found

帅比萌擦擦* 提交于 2019-12-02 11:19:20
问题 Following is my code <rich:select id="cycle_group" value="#{menuCycleBean.menuCycleDetailTO.menuCycleGroupId}" defaultLabel="#{msg['gobal.select.default.label']}" converter="javax.faces.convert.IntegerConverter"> <f:selectItems value="#{menuCycleBean.cycleGroupList}" var="n" itemLabel="#{n.label}" itemValue="#{n.id}" /> </rich:select> "menuCycleGroupId" is "Integer" Value and "n.id" is "String" value. I need to convert String to Integer. I am using following attribute converter="javax.faces

Encode video from any format to .flv format in AS3

别来无恙 提交于 2019-12-02 10:54:35
Is there any library in Action Script that be able to convert any video format to .FLV? I've been looking for it with no success. I thought that as3 had functions for that purposes but not found. I want to give the possibility that in my site, users can upload any video, so I need to convert it to a standard and compress it to a fixed resolution. Thanks in advance. There's a FLV encoder AS3 library . As far as I remember it requires image bytes and audio bytes for a frame. But you will have to get image data and sound data somewhere. You could either play the video in flash and grab

DecimalFormat is being overridden by server settings

做~自己de王妃 提交于 2019-12-02 10:44:20
Currently I'm having a problem displaying formatted decimals. In my local machine I have a decimal value: 0.002100000000 stored in database. <h:outputText value="0.002100000000" converter="#{bigDecimal4DigitsConverter}" /> @FacesConverter("bigDecimal4DigitsConverter") public class BigDecimal4DigitsConverter extends BigDecimalConverter { private DecimalFormat format = new DecimalFormat("#,##0.0000"); @Override protected DecimalFormat getDecimalFormat() { return format; } } My problem is on my local machine it displays: 0.0021 - US Settings But in another server 0,0021 - French Settings Why is