formatting

Can I display daily data in month buckets using only excel's chart formatting?

只愿长相守 提交于 2019-12-22 04:06:20
问题 I have daily sales figures that I'd like to plot on a simple linegraph. I would like them to be shown in monthly buckets (i.e. if I sold 5€ on Jan 01 and 10€ on Jan 24, I would like to see only one data point for January with 15€ in it). Please note that I don't want to use any supporting formula/VBA script, I want to do this using only chart formatting. I tried setting the chart's X-axis type to "date axis" and I chose "months" as the base unit. This almost works, but the line graph ends up

Iterate a format string over a list

不想你离开。 提交于 2019-12-22 03:53:19
问题 In Lisp, you can have something like this: (setf my-stuff '(1 2 "Foo" 34 42 "Ni" 12 14 "Blue")) (format t "~{~d ~r ~s~%~}" my-stuff) What would be the most Pythonic way to iterate over that same list? The first thing that comes to mind is: mystuff = [1, 2, "Foo", 34, 42, "Ni", 12, 14, "Blue"] for x in xrange(0, len(mystuff)-1, 3): print "%d %d %s" % tuple(mystuff[x:x+3]) But that just feels awkward to me. I'm sure there's a better way? Well, unless someone later provides a better example, I

Formatting a double in JSF

会有一股神秘感。 提交于 2019-12-22 03:25:26
问题 I have a problem similar to the one found here : JSF selectItem label formatting. What I want to do is to accept a double as a value for my and display it with two decimals. Can this be done in an easy way? I've tried using but that seems to be applied on the value from the inputText that is sent to the server and not on the initial value in the input field. My code so far: <h:inputText id="december" value="#{budgetMB.december}" onchange="setDirty()" styleClass="StandardBlack"> <f

Recording Mono on iPhone in IMA4 format

好久不见. 提交于 2019-12-22 00:33:36
问题 I'm using the SpeakHear sample app on Apple's developer site to create an audio recording app. I'm attempting to record directly to IMA4 format using the kAudioFormatAppleIMA4 system constant. This is listed as one of the usable formats, but every time I set up my audio format variable and pass and set it, I get a 'fmt?' error. Here is the code I use to set up the audio format variable: #define kAudioRecordingFormat kAudioFormatAppleIMA4 #define kAudioRecordingType kAudioFileCAFType #define

RegEx to modify urls in htmlText as3

房东的猫 提交于 2019-12-22 00:22:58
问题 I have some html text that I set into a TextField in flash. I want to highlight links ( either in a different colour, either just by using underline and make sure the link target is set to "_blank". I am really bad at RegEx. I found a handy expression on RegExr : </?\w+((\s+\w+(\s*=\s*(?:".*?"|'.*?'|[^'">\s]+))?)+\s*|\s*)/?> but I couldn't use it. What I will be dealing with is this: <a href="http://randomwebsite.web" /> I will need to do a String.replace() to get something like this: <u><a

Problem with Convert.ToDateTime in asp.net

心不动则不痛 提交于 2019-12-21 23:50:17
问题 I have an application that works without any problem in a spanish server. When i uploaded the application into the online server (an english windows), im getting exceptions (of type "input string is not a valid Datetime/Int32") with Convert.ToDateTime and Convert.ToInt32. Are any web.config line that could help me in this matter? I tried adding a globalization element with the Spanish culture, but didnt worked. Could you give me a hand? Thanks in advance. Josema. 回答1: You need: System

Crystal report with HTML content formatting

非 Y 不嫁゛ 提交于 2019-12-21 21:32:49
问题 Is anybody of you worked on HTML data populating into crystal reports? Am using Visual studio 2010. I had an XML data coming from DB. Which am able to convert into HTML using XSL. Now my next task is to get it into crystal report. Any hint will be greatful. Because all the online resources are simply giving me results related to creating dataset and executing stored procedures etc. I was able to pull my HTML content to crystal report. Now the embedded styling was not able to get applied. Any

How to highlight the differences between subsequent lines in a file?

隐身守侯 提交于 2019-12-21 21:32:41
问题 I do a lot of urgent analysis of large logfile analysis. Often this will require tailing a log and looking for changes. I'm keen to have a solution that will highlight these changes to make it easier for the eye to track. I have investigated tools and there doesn't appear to be anything out there that does what I am looking for. I've written some scripts in Perl that do it roughly, but I would like a more complete solution. Can anyone recommend a tool for this? 回答1: I wrote a Python script

Java: ResultSet getString() differs between environments

人盡茶涼 提交于 2019-12-21 20:47:42
问题 I have a SQL query that is returning an oracle Date object. e.g.: SELECT sysdate FROM DUAL There is code currently that does the following: String s = rs.getString("sysdate"); The problem is, this returns different date format on different environments (database is the same). One environment will return: 2011-01-31 12:59:59.0 The other will return something weirder: 2011-1-31 12.15.32.0 (the time is separated by decimals) Maybe this has something do with Locale... one machine is "English

Python: Print to one line with time delay between prints

这一生的挚爱 提交于 2019-12-21 20:38:58
问题 I want to make (for fun) python print out 'LOADING...' to console. The twist is that I want to print it out letter by letter with sleep time between them of 0.1 seconds (ish). So far I did this: from time import sleep print('L') ; sleep(0.1) print('O') ; sleep(0.1) print('A') ; sleep(0.1) etc... However that prints it to separate lines each. Also I cant just type print('LOADING...') since it will print instantaneously, not letter by letter with sleep(0.1) in between. The example is trivial