When you modify existing code, how do you comment the code?
i.e.
// changed code to ...
// by: blankman
// modified: 20081204
Looking for a nice format ...
I'm trying to pull a report down using the following:
https://user:[email protected]/ReportServer?%2fFolder+1%2fReportName&rs:Format=CSV&rs:Command=Render
And it just pulls an html page and not the csv file. Any ideas?
What should be the regex for matching date of any format like
26FEB2009
30 Jul 2009
27 Mar 2008
29/05/2008
27 Aug 2009
What should be the regular expression for that ?
Edit I have regex that matches with 26-Feb-2009 and 26 FEB 2009 with but not with 26FEB2009. So if any one know then please update it.
(?:^|[^\d\w:])(?'day'\d{1,2})(?:-?st\s+|-?th\s+|-?rd\s+|-?nd\s+|-|\s+)(?'month'Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[uarychilestmbro]*(?:\s*,?\s*|-)(?:'?(?'year'\d{2})|(?'year'\d{4}))(?=$|[^\d\w])
Hi.
Extending methods to any instance is really easy:
public static string LeaveJustNumbers(this string text)
{
return Regex.Replace(text, @"[\D]", "");
}
...
string JustNumbers = "A5gfb343j4".LeaveJustNumber();
But what if i want to extend methods to a sealed class like string, to
work like:
string.Format("Hi:{0}","Fraga");
Is there any way to do it?
I get back a JSON response from a social networks site. There are certain accented characters that I would like to be removed.
An example is : L\u00e1szl\u00f3 M\u00e1rton, that reads "László Márton" and I would like to be transformed into Laszlo Marton.
I would like to keep the JSON format intact, as I will send it towards.
How can I do this?
Hi,
In the application I am developing, I would like to send messages in the form of JSON objects to a Django Server and parse the JSON response from the server and populate a custom listview.
From the little JSON knowledge I have, I thought this format for the response from server
{
"post": {
"username": "someusername",
"message": "this is a sweet message",
"image": "http://localhost/someimage.jpg",
"time": "present time"
},
}
How much knowledge of JSON should I have to accomplish this purpose? Also it would be great if someone could provide me links of some tutorials for sending and parsing JSON Objects.
In org-mode's daily/weekly agenda view, is there a way to display the full context of the entries?
My reading of the code is that it finds the first heading above the timestamp and displays that. However, in my case, that heading is often 3-4 levels deep and doesn't make sense without the bullets above it. It also doesn't seem like there are hooks to easily change that. Filtering is trivial, but not changing the fundamental presentation format.
parsec-3.1.0 ( http://hackage.haskell.org/package/parsec-3.1.0 )
works with any token type. However there are combinators like Text.Parsec.Char.satisfy that are only defined for Char datatype. There doesn't seem to be any more general counterpart available.
Should I define my own versions or did I miss something?
Perhaps there are different parser libraries in Haskell that allows:
custom token types
custom parser state (I need to parse stateful format - Wavefront OBJ)
Hi, I'm trying to use the SDL_Image library and I've added the .so to the link libraries list for my project (I'm using Code::Blocks, by the way).
After doing this, when I go to compile, I get this error:
Linking console executable: bin/Debug/ttfx
/usr/lib32/libSDL_image-1.2.so: could not read symbols: File in wrong format
What does this mean and how can I get it working?
Thanks!
In WPF it is easy to use a ValueConverter to format values etc, (in our case convert some numbers into a different unit, e.g km to miles)
I know it can be done in Winforms, but all my Googleing just brings up results for WPF and Silverlight.
Hi I'm looking at the following API
http://wiki.github.com/soundcloud/api/oembed-api
the example they give
Call:
http://soundcloud.com/oembed?url=http%3A//soundcloud.com/forss/flickermood&format=json
Response:
{
"html":"<object height=\"81\" ... ",
"user":"Forss",
"permalink":"http:\/\/soundcloud.com\/forss\/flickermood",
"title":"Flickermood",
"type":"rich",
"provider_url":"http:\/\/soundcloud.com",
"description":"From the Soulhack album...",
"version":1.0,
"user_permalink_url":"http:\/\/soundcloud.com\/forss",
"height":81,
"provider_name":"Soundcloud",
"width":0
}
What do i have to do to get this json object from just a url?!!?
I'm trying to format an UITextField as user types text, for instance to show separator for thousands.
I found this web page : http://www.iphonedevsdk.com/forum/iphone-sdk-development/16512-trying-add-commas.html
It seems that shouldChangeCharactersInRange: is not a good solution. I thought of a custom UIView where the view would be updated as the user types digits, yet it would require recreating the wheel...
Hi,
I want to clone a WPF Control (XamDataGrid)
I know these ways:
Clone
Problem: Control is not Cloneable
Serialize & Deserialize in binary format
Problem: Control is not serializable
Serialize as XML
Problem: control contains images and Images are not serializable in xml serialization
Do you have any valid workarounds ?
-- I don't want to start any religious wars, but a quick google search indicates that Apache Lucene is the preferred open source tool for indexing and searching. Are there others?
-- What file format does Lucene use to store its index file(s)?
Thank is advance.
Doug
Hi,
I am working on C#.Net windows application. Here i create report using Infragistics.Documents.Report and export to .pdf & .xps format. Here i want to bringthose 2 files(.pdf & .xps) into WinForms and display. How to bring saved .pdf & .xps file into win forms.
Thanks,
I want to use FBML as a canvas and would like to display a rich text editor like fckeditor or other. Can anybody out there help me out on this? e.g. to format text mainly bold,italics. Is it possible? how? I'm eager to learn more from the responder.
Hello everybody,
I'm working on amr speech codec (porting/optimization)
I have an arm (for WinCE) optimized version from voiceage and I use it as a reference in performance testing. So far, binary produced with my lib beats the other one by around 20-30%! I use Vs2008 and I have limited access to ARM instruction set I can generate with Microsoft compiler. So I tried to look for alternative compiler to see what would be performance difference.
I have RVCT compiler, but it produces elf binaries/object files. However, I run my test on a wince mobile phone (TyTn 2) so I need to find a way to run code compiled with RVCT on WinCE.
Some of the options are
1) to produce assembly listing (-S option of armcc), and try to assemble with some other assembler that can create COFF (MS assembler for arm)
2) compile and convert generated ELF object file to COFF object (seems like objcopy of gnu binutils could help me with that)
3) using fromelf utility supplied by RVCT create BIN file and somehow try to mangle the bits so I can execute them ;)
My first attempt is to create a simple c++ file with one exported function, compile it with RVCT and then try to run that function on the smartphone.
The emitted assembly cannot be assembled by the ms assembler (not only they are not compatible, but also ms assembler rejects some of the instructions generated with RVCT compiler; ASR opcode in my case)
Then I tried to convert ELF object to coff format and I can't find any information on that. There is a gcc port for ce and objcopy from that toolset is supposed to be able to do the task. However, I can't get it working. I tried different switches, but I have no idea what exactly I need to specify as bfdname for input and output format. So, I couldn't get it working either.
Dumping with fromelf and using generated bin file seems to be overkill, so I decided to ask you guys if there is anything I should try to do or maybe someone has already done similar task and could help me.
Basically, all I want to do is to compile my code with RVCT compiler and see what's the performance difference. My code has zero dependencies on any c runtime functions.
thanks!
Hi,
I was wondering how to return plain XML from ADO.net data services
I have exposed an ADO.net data service to different DEPARTMENTS in our company who are not so technical. The data returned is ATOM FEED which is kind a hard to read / interpret with its format, too much information is returned
people from various departments would execute different queries ( HTTP Request) and i wanted them to display simple XML or atleast something more user friendly like HTML
I have tried ACCEPT attribute of the request to be plain XML and it still returns ATOM
Thanks
-- Khalil
Hi,
I'm using Mercurial repository and I have a patch in 'git' format and I wanted to know how I can apply that patch to my current repository which is Local.
Thanks
Hello,
Is there a way to tell if when a download has finished? That is, we allow users to download a report in PDF format. It takes about 3 - 5 seconds to start downloading and in this time, from click to end of download, show a wait state icon so that the user doesn't click multiple times.
Thanks!
Eric
Hello,
Is there any SQL editor that supports syntax highlighting, automatic code formatting and code folding? I found this, but it's an Eclipse plugin (I'm a NetBeans user), and cannot automatically format code, which is the most important feature I'm after.
Autocompletion is not important, nor is the possibility of running the code (like the SQL editor in NetBeans).
Edit: I'm sorry for not specifying, I'm looking for Linux or even web-based software.
Does anyone know of a good dictionary API or ruby library to lookup the definitions of words?
I'm thinking it should work something like:
I call get_definition(word)
It returns the definition for that word (ideally in some way to easily format the definition for display.
Thanks