I am developing a Japanese mobile site using Datebox calendar. I managed to override most of the date format and labels, but I'm not sure how to modify the title which shows the Month and Year. Instead of showing 6月2013, I want it to show 2013年6月. The two characters basically represent year and month.
I'm using Datebox version 1, and I have overriden the dateFormat and headerFormat as listed below. What am I missing here?
http://dev.jtsage.com/jQM-DateBox1/demos/api/matrix.html#matrix&ui-page=0-0
It's been a long time since I played with v1. But...
Think about upgrading the v2. Language files stay the same, but v2 is way, way more stable.
You have a couple options for headerFormat -
a. you can either mess with it in the language file (which I assume you are loading, judging by the fact that english is the default).
b. Override options..headerFormat.
c. It looks like just setting options.headerFormat is supposed to override it too... ymmv. Like I said, it's been a while.
The bad news: It is possible that the calendar mode of v1 does not in fact use headerFormat - if that is the case, look for this line, around about 1421, which looks suspiciously hard-coded to me. Which means you'll need to edit the sources directly. Sorry about that.
self.controlsInput.empty().html(o.lang[o.useLang].monthsOfYear[self.theDate.getMonth()] + " " + self.theDate.getFullYear());
Finally, if you do decide to upgrade to v2, it looks like it is also hardcoded - line 160. I'll work on making this an option instead. Edit: the option you are looking for in v2 is overrideCalHeaderFormat / calHeaderFormat.
Related
Is there any way to embed custom parts into a google doc? I know you can do extensions and format the doc certain ways, but what about something more advanced. What I'm looking for is something closer to semantic media wiki, but with all the awesomeness that is google docs.
for instance to have data inline [[Property name::property value]] , but displayed as property value
inline queries like this , which are display/updated as a table
{{#ask:
[[Category:City]]
[[Located in::Germany]]
|?Population
|?Area#km² = Size in km²
}}
I know the first response, why not use ThisWiki or ThatWiki, and the problem is google docs is better (far better) at formatting, printing, etc which is where most people are comfortable, but several folks would like something more expressive and "computable". Also, we want one system.
I'm currently trying to work in bootstrap x-editable to my meteor application. I'm using the atmosphere package for this: https://github.com/nate-strauser/meteor-x-editable-bootstrap. I'm having a couple of issue so far which are:
When I select a date using the date data-type I get a javascript date object back that is 4 hours behind what I actually picked(assuming this is because I'm in -4 timezone).
When I edit a textarea, the line breaks are saved to the database, but when bring up the editable to edit it the line breaks are striped.
It looks like this might be the intended behavior. Its hard to be sure without more information.
With the date, javascript stores date in unixtime. This is because its very easy to switch timezones and not worry about having javascript itself having to keep track of DST and the other complications of keeping time.
If you use new Date(<the javascript timestamp>); you should get the time in your timezone.
With the textarea it looks like some kind of text-encoding conversion is taking place. You should check to see what the character codes of those stripes are and convert them to newlines like \n. One scenario this could occur is if you're copy-pasting stuff with a different encoding into the textarea.
The auto_complete_for dealio from script.aculo.us is great an all, but is there a way for me to selectively disable the fact that it always auto-selects the first item in the list?
The problem is that, if I want to type my own entry that is new, and novel, I don't want the first item in the list to be auto-selected. The reason is because when I TAB out of the field, it selects, and fills the text box with that first item.
I got around that, somewhat, by making the first item in the list the same as what I'm typing, but that's not perfect either, because the auto_complete list doesn't always update with every keystroke, depending on how fast I type. I've tried setting the list refresh rate to the lowest value (1 millisecond) but no go.
What I really want is an option in "auto_complete_for" that doesn't select that first item at all - the same way that Google Instant doesn't automatically select the first suggested search phrase - you have to arrow-down to select one.
Maybe I can do this via an HTML option that I'm missing?
Looking at the source, there doesn't appear to be an option for that, but I bet if you changed line 284 of controls.js to this.index = -1; it would do what you want.
Otherwise, it might be time to look for a different autocomplete widget.
If your requirements are too far away from the available plugin, then I guess there is no point in tinkering around. Its best to write your own JS code.
You might want to consider this: https://github.com/laktek/jQuery-Smart-Auto-Complete
or this : https://github.com/reinh/jquery-autocomplete
I'll add another alternative that works great with Rails 3:
http://github.com/crowdint/rails3-jquery-autocomplete
I recently implemented auto complete for more than a field for Rails 2.0.2.
The plugin I used is:- https://github.com/david-kerins/auto_complete . Not sure if it supports Rails 3.
I have also encountered issues on implementing the above scenario and have posted questions( Implementing auto complete for more than one field in Rails ; Implementing a OnClick kind of functionality and formatting wrt Rails Partial-Views ) on stackoverflow for the same, I have been lucky on getting things working for me based on my requirement.
Kindly refer to these questions, they might have relevance to your requirement.
I got a pdf like this one :
81 11005589 THING MAXIME 4 PC2I TR1 - MERCREDI DE 07H45 A 09H45 4A7
71 11007079 STUFF QUENTIN 1 PC2I TR1 - LUNDI DE 10H00 A 12H00 1B4
74 10506940 HAHA YEZHOU 2 PC2I TR1 - LUNDI DE 13H30 A 15H30 2D5
http://i.stack.imgur.com/hbXg2.png
And I need to parse it. What I mean by that is take the 4th column, add the 3rd column and make an email adress out of it. For example with the first line : maxime.thing#something.com
I tried to c/p it to Google docs but it just c/p it in one cell instead of multiple cells.
I really don't know what to do here. I guess regex would help me but with what ?
If it is Java iText, if it is C# iTextSharp, both are free for non commercial use.
I've used Aspose before for parsing PDFs/Word docs/Excel docs/and some other docs before. I'm not sure what their capabilities are when it comes to parsing tables in a PDF but it wouldn't surprise me if they had something.
I'd start by looking at them but be warned: they have an unapologetically piss poor method for updating their libraries. I have had to rewrite code because they flat out DROP functionality when they release new versions. Not deprecated, just GONE. That said their support is alright and the tool-set is quite powerful.
I know they have libraries for .NET and Java. Beyond that I can't say.
If in PHP, you can use
exec('pdftotext '.$filepath, $outputAsArray); //execute the command pdftotext. Proabably installed if you're on linux, if not you can install it /// to transform the pdf to text,
then
$text = implode($outputAsArray,"\n"); //to have the output as text
then preg_replace is your friend.
You can't just use a regular expression to parse PDF. You need to extract the text. There are many libraries that can do this for different languages.
My company, Atalasoft, has a text extraction add-on for .NET -- http://www.atalasoft.com/products/dotimage/pdf-reader
For Java, take a look at PDFTextStream from Snowtide. http://www.snowtide.com.
You cannot be sure there is any structure in the PDF of that the text is visible. You really need to use an extraction tool. I wrote an article explaining what formatting is actually in a PDF file at http://www.jpedal.org/PDFblog/?p=228
i need to localize a Reporting Services-report (.rdlc) and i would like to do it using a ressource-file (.resx).
I found pages like this and that and they use custom code to achieve their target.
But pages like Setting the Report Language Parameter in a URL give me the impression that localization in reports is possible without custom code.
So, it is possible to localize a Reporting Services-report without custom code ?
If so, is there a tutorial that explains how it's done?
What in the report do you want to localize?
values from the database? Those should be retrieved from the database in the appropriate language already
fixed labels and textboxes on the report? I have not yet seen any compelling way to doing this - you can either have
one report "skeleton" / template per language (and pick the one you need)
if the number of elements is manageable, define report parameters which you can set from the calling code, to set the labels and texts
use some custom .NET extension for handling localization
It's not really an awfully pretty picture, indeed - I'd be most interested in better solutions myself! (I typically need to support 3-4 languages for any report - and I'm using only server-based .RDL files, no .RDLC, so any localization that depends on client-side resource files is not usable in my case)
I would add one method when it comes to labels and textboxes:
Create a placeholder element within the textbox and use Expression field to
use a Switch clause , switching on the Language parameter.
It's not superpretty, but also works pretty well for 3-4 languages
I am passing parameters to the report for labels etc, and after adding the parameters to the report (using the menu option Report -> Parameters in VS2008) you can then use the values of these parameters to localise the labels. This is workiiing well enough, although it would be nicer to be abkle to refer to resource keys immediately from your form labels etc.