Search Results

Search found 37183 results on 1488 pages for 'string conversion'.

Page 162/1488 | < Previous Page | 158 159 160 161 162 163 164 165 166 167 168 169  | Next Page >

  • Trouble with wstringstream

    - by Rosarch
    I have a wstringstream: wstringstream sstream; AlterSstream(sstream); sstream << "foo"; MessageBoxW( NULL, sstream.str().c_str(), L"subject", MB_OK ); This outputs a long string that looks nothing like what I put in it in AlterSstream(): 00000000002CEC58foo AlterSstream: void AlterSstream(wstringstream& outStream) { outStream << "odp"; } Why is this happening?

    Read the article

  • Why won't this piece of my code write to file

    - by user2934783
    I am developing a c++ banking system. I am able to get the float, newbal, values correctly and when I try to write to file, there is no data in the file. else { file>>firstname>>lastname; cout<<endl<<firstname<<" "<<lastname<<endl; cout<<"-----------------------------------\n"; string line; while (getline(file, line)) { //stringstream the getline for line string in file istringstream iss(line); if (iss >> date >> amount) { cout<<date<<"\t\t$"<<showpoint<<fixed<<setprecision(2)<<amount<<endl; famount+=amount; } } cout<<"Your balance is $"<<famount<<endl; cout<<"How much would you like to deposit today: $"; cin>>amountinput; float newbal=0; newbal=(famount+=amountinput); cout<<"\nYour new balance is: $"<<newbal<<".\n"; file<<date<<"\t\t"<<newbal; //***This should be writing to file but it doesn't. file.close(); The text file looks like this: Tony Gaddis 05/24/12 100 05/30/12 300 07/01/12 -300 //Console Output looks like this Tony Gaddis 05/24/12 100 05/30/12 300 07/01/12 -300 Your balance is: #1 How much wuld you like to deposit: #2 Your new balance is: #1 + #2 write to file close file. //exits to main loop:::: How can I make it write to file and save it, and why is this happening. I tried doing it with ostringstream as well considering how I used istringstream for the input. But it didn't work either :\ float newbal=0; newbal=(famount+=amountinput); ostringstream oss(newbal); oss<<date<<"\t\t"<<newbal; I am trying to self teach c++ so any relevant information would be kindly appreciated.

    Read the article

  • Is it possible to slice off the end of a URL with XSLT 1.0?

    - by Eric
    Title says it all really. Using only XSLT 1.0's string functions, how would I go about slicing off the end of a url? So from http://stackoverflow.com/questions/2981175/is-it-possible-to-slice-the-end-of-a-url-with-xslt-1-0 I would like to extract is-it-possible-to-slice-the-end-of-a-url-with-xslt-1-0 Is this possible?

    Read the article

  • Replace umlaute (äüö) for SEO link in rails - best way

    - by ole_berlin
    Hi, I'm using the permalink_fu plugin to create permalinks from titles. My problem is: If the title contains german characters, they are just replaced with '_'. What I need is something that replaces ä with ae ü with ue ö with oe I fount String.tr but the problem here is that it replaces 1 character with 1 replacement, so it would work for replacing é with e ø with o etc. Does anyone have a nice and clean solution for that? Thanks

    Read the article

  • Python 3.2: How to pass a dictionary into str.format()

    - by Robert Dailey
    I've been reading the Python 3.2 docs about string formatting but it hasn't really helped me with this particular problem. Here is what I'm trying to do: stats = { 'copied': 5, 'skipped': 14 } print( 'Copied: {copied}, Skipped: {skipped}'.format( stats ) ) The above code will not work because the format() call is not reading the dictionary values and using those in place of my format placeholders. How can I modify my code to work with my dictionary?

    Read the article

  • How to change the language of driver interface for Canon Pixma printers?

    - by Sammy
    Is there a way to change the language of the driver interface for Canon Pixma printers? Which language is used seems to be determined by the language of the OS or the Windows localization settings. I really don't want that, I want to be able to set the language manually to my own liking, either during the driver installation or afterwards. I have found a workaround for Pixma IP2770 where you edit the setup.ini file by replacing the language names and the DLL search paths with <SELECT> under the LANGUAGES section. So instead of... 0000=<SELECT> 0001=Arabic,RES\STRING\IJInstAR.ini,RES\DLL\IJInstAR.dll 0804=Simplified Chinese,RES\STRING\IJInstCN.ini,RES\DLL\IJInstCN.dll 0404=Traditional Chinese,RES\STRING\IJInstTW.ini,RES\DLL\IJInstTW.dll 0005=Czech,RES\STRING\IJInstCZ.ini,RES\DLL\IJInstCZ.dll 0006=Danish,RES\STRING\IJInstDK.ini,RES\DLL\IJInstDK.dll 0007=German,RES\STRING\IJInstDE.ini,RES\DLL\IJInstDE.dll 0008=Greek,RES\STRING\IJInstGR.ini,RES\DLL\IJInstGR.dll 0009=English,RES\STRING\IJInstUS.ini,RES\DLL\IJInstUS.dll 000A=Spanish,RES\STRING\IJInstES.ini,RES\DLL\IJInstES.dll 000B=Finnish,RES\STRING\IJInstFI.ini,RES\DLL\IJInstFI.dll 000C=French,RES\STRING\IJInstFR.ini,RES\DLL\IJInstFR.dll 000E=Hungarian,RES\STRING\IJInstHU.ini,RES\DLL\IJInstHU.dll 0010=Italian,RES\STRING\IJInstIT.ini,RES\DLL\IJInstIT.dll 0011=Japanese,RES\STRING\IJInstJP.ini,RES\DLL\IJInstJP.dll 0012=Korean,RES\STRING\IJInstKR.ini,RES\DLL\IJInstKR.dll 0013=Dutch,RES\STRING\IJInstNL.ini,RES\DLL\IJInstNL.dll 0014=Norwegian,RES\STRING\IJInstNO.ini,RES\DLL\IJInstNO.dll 0015=Polish,RES\STRING\IJInstPL.ini,RES\DLL\IJInstPL.dll 0016=Portuguese,RES\STRING\IJInstPT.ini,RES\DLL\IJInstPT.dll 0019=Russian,RES\STRING\IJInstRU.ini,RES\DLL\IJInstRU.dll 001D=Swedish,RES\STRING\IJInstSE.ini,RES\DLL\IJInstSE.dll 001E=Thai,RES\STRING\IJInstTH.ini,RES\DLL\IJInstTH.dll 001F=Turkish,RES\STRING\IJInstTR.ini,RES\DLL\IJInstTR.dll 0021=Indonesian,RES\STRING\IJInstID.ini,RES\DLL\IJInstID.dll You get.... 0000=<SELECT> 0001=<SELECT> 0804=<SELECT> 0404=<SELECT> 0005=<SELECT> 0006=<SELECT> 0007=<SELECT> 0008=<SELECT> 0009=English,RES\STRING\IJInstUS.ini,RES\DLL\IJInstUS.dll 000A=<SELECT> 000B=<SELECT> 000C=<SELECT> 000E=<SELECT> 0010=<SELECT> 0011=<SELECT> 0012=<SELECT> 0013=<SELECT> 0014=<SELECT> 0015=<SELECT> 0016=<SELECT> 0019=<SELECT> 001D=<SELECT> 001E=<SELECT> 001F=<SELECT> 0021=<SELECT> .... in case English is the preferred language. It's a way to force the installation program to only install the English language support. IP2770 is a model for the Asian market, so if you want to check this out you need to go to the Canon India download page (for instance) to get the driver. Unfortunately this method is not possible with my IP4000. There is no driver even available for it to download for Windows Vista. But is there really no way of changing the language of the UI in any normal way, you know... without having to hack it? Besides, the driver for my printer comes with Windows Vista, so I don't even have to install any drivers. And little do I get the chance to set the language, knowing that the installation never happens. Any ideas?...

    Read the article

  • How get <body> element from the html which one have as a string

    - by Oleg
    Hello! I have a stupid problem. An jQuery.ajax request return me a full HTML text as a string. I receive such response in an case of error on the server. The server give me an error description which I want to place inside of the corresponding place of my current page. So now the question: I have a string contains full HTML document (which is not an XML!!! see <hr> element inside). I need to have for example only BODY part as a jQuery object. Then I could append it to the corresponding part of my page. Here is an example of the string which I need to parse: <html> <head> <title>The resource cannot be found.</title> <style> body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px} // ... </style> </head> <body bgcolor="white"> <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1> <h2> <i>The resource cannot be found.</i> </h2></span> <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "> <b> Description: </b>HTTP 404. The resource you are looking for ...bla bla.... <br><br> <b> Requested URL: </b>/ImportBPImagesInfos/Repository.svc/GetFullProfilimageSw<br><br> <hr width=100% size=1 color=silver> <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1 </font> </body> </html> <!-- [HttpException]: A public action method &#39;.... at System.Web.Mvc.Controller.HandleUnknownAction(String actionName) at System.Web.Mvc.Controller.ExecuteCore() at System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) at System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) at System.Web.Mvc.MvcHandler.<>c__DisplayClass8.<BeginProcessRequest>b__4() at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass1.<MakeVoidDelegate>b__0() at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End() at System.Web.Mvc.Async.AsyncResultWrapper.End[TResult](IAsyncResult asyncResult, Object tag) at System.Web.Mvc.Async.AsyncResultWrapper.End(IAsyncResult asyncResult, Object tag) at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) -->

    Read the article

  • map with string is broken?[solved]

    - by teritriano
    Yes. I can't see what im doing wrong the map is string, int Here the method bange::function::Add(lua_State *vm){ //userdata, function if (!lua_isfunction(vm, 2)){ cout << "bange: AddFunction: First argument isn't a function." << endl; return false;} void *pfunction = const_cast<void *>(lua_topointer(vm, 2)); char key[32] = {0}; snprintf(key, 32, "%p", pfunction); cout << "Key: " << key << endl; string strkey = key; if (this->functions.find(strkey) != this->functions.end()){ luaL_unref(vm, LUA_REGISTRYINDEX, this->functions[strkey]);} this->functions[strkey] = luaL_ref(vm, LUA_REGISTRYINDEX); return true; Ok, when the code is executed... Program received signal SIGSEGV, Segmentation fault. 0x00007ffff6e6caa9 in std::basic_string<char, std::char_traits<char>, std::allocator<char> > ::compare(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const () from /usr/lib/libstdc++.so.6 Seriously, what's wrong with my code. Thanks for help. Edit 1: Ok, I've done the solution and still fails. I've tried directly insert a string but gives the same error. Let's see, the object is a bange::scene inherited from bange::function. I create the object with lua_newuserdata: bange::scene *scene = static_cast<bange::scene *>(lua_newuserdata(vm, sizeof(bange::scene))); (...) scene = new (scene) bange::scene(width, height, nlayers, vm); I need this for LUA garbage collection. Now the access to bange::function::Add from Lua: static int bangefunction_Add(lua_State *vm){ //userdata, function bange::function *function = reinterpret_cast<bange::function *>(lua_touserdata(vm, 1)); cout &lt&lt "object with bange::function: " &lt&lt function << endl; bool added = function->bange::function::Add(vm); lua_pushboolean(vm, static_cast<int>(added)); return 1; } Userdata is bange::scene stored in Lua. Knowing that userdata is scene, in fact, the object's direction is the same when I've created the scene before. I need the reinterpret_cast, and then call the method. The pointer "this" is still the same direction inside the method. solved I did a small test in the bange::function constructor which works without problems. bange::function::function(){ string test("test"); this->functions["test"] = 2; } I finally noticed that the problem is bange::function *function = reinterpret_cast<bange::function *>(lua_touserdata(vm, 1)); because the object is bange::scene and no bange::function (i admit it, a pointer corruption) and this seems more a code design issue. So this, in a way, is solved. Thanks everybody.

    Read the article

  • What may be wrong with String::ToIdentifier::EN tests?

    - by wk01
    I try to install Perl module String::ToIdentifier::EN (as depndency of DBIx::Class::Schema::Loader) but it fails on tests. I googled those errors but get no picture, where is problem: Building and testing String-ToIdentifier-EN-0.07 cp lib/String/ToIdentifier/EN.pm blib/lib/String/ToIdentifier/EN.pm cp lib/String/ToIdentifier/EN/Unicode.pm blib/lib/String/ToIdentifier/EN/Unicode.pm Manifying blib/man3/String::ToIdentifier::EN.3pm Manifying blib/man3/String::ToIdentifier::EN::Unicode.3pm PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/00_basic.t t/10_ascii.t t/20_capitalization.t Byte order is not compatible at ../../lib/Storable.pm (autosplit into ../../lib/auto/Storable/_retrieve.al) line 380, at /home/wanradt/perl5/lib/perl5/Lingua/EN/Tagger.pm line 167 # Looks like you planned 25 tests but ran 4. # Looks like your test exited with 25 just after 4. t/00_basic.t ........... Dubious, test returned 25 (wstat 6400, 0x1900) Failed 21/25 subtests Byte order is not compatible at ../../lib/Storable.pm (autosplit into ../../lib/auto/Storable/_retrieve.al) line 380, at /home/wanradt/perl5/lib/perl5/Lingua/EN/Tagger.pm line 167 # Looks like you planned 768 tests but ran 512. # Looks like your test exited with 25 just after 512. t/10_ascii.t ........... Dubious, test returned 25 (wstat 6400, 0x1900) Failed 256/768 subtests t/20_capitalization.t .. ok Test Summary Report ------------------- t/00_basic.t (Wstat: 6400 Tests: 4 Failed: 0) Non-zero exit status: 25 Parse errors: Bad plan. You planned 25 tests but ran 4. t/10_ascii.t (Wstat: 6400 Tests: 512 Failed: 0) Non-zero exit status: 25 Parse errors: Bad plan. You planned 768 tests but ran 512. Files=3, Tests=528, 1 wallclock secs ( 0.07 usr 0.02 sys + 0.42 cusr 0.04 csys = 0.55 CPU) Result: FAIL Failed 2/3 test programs. 0/528 subtests failed. make: *** [test_dynamic] Error 255 -> FAIL Installing String::ToIdentifier::EN failed. See /home/wanradt/.cpanm/build.log for details. Byte order is not compatible at... seems a key, but to where?

    Read the article

  • HttpClient POST fails to submit the form + resulting string is cut-off (incomplete)

    - by Jayomat
    Hi, I'm writing an app to check for the bus timetable's. Therefor I need to post some data to a html page, submit it, and parse the resulting page with htmlparser. Though it may be asked a lot, can some one help me identify if 1) this page does support post/get (I think it does) 2) which fields I need to use? 3) How to make the actual request? this is my code so far: String url = "http://busspur02.aseag.de/bs.exe?Cmd=RV&Karten=true&DatumT=30&DatumM=4&DatumJ=2010&ZeitH=&ZeitM=&Suchen=%28S%29uchen&GT0=&HT0=&GT1=&HT1="; String charset = "CP1252"; System.out.println("startFrom: "+start_from); System.out.println("goTo: "+destination); //String tag.v List<NameValuePair> params = new ArrayList<NameValuePair>(); params.add(new BasicNameValuePair("HTO", start_from)); params.add(new BasicNameValuePair("HT1", destination)); params.add(new BasicNameValuePair("GTO", "Aachen")); params.add(new BasicNameValuePair("GT1", "Aachen")); params.add(new BasicNameValuePair("DatumT", day)); params.add(new BasicNameValuePair("DatumM", month)); params.add(new BasicNameValuePair("DatumJ", year)); params.add(new BasicNameValuePair("ZeitH", hour)); params.add(new BasicNameValuePair("ZeitM", min)); UrlEncodedFormEntity query = new UrlEncodedFormEntity(params, charset); HttpPost post = new HttpPost(url); post.setEntity(query); InputStream response = new DefaultHttpClient().execute(post).getEntity().getContent(); // Now do your thing with the facebook response. String source = readText(response,"CP1252"); Log.d(TAG_AVV,response.toString()); System.out.println("STREAM "+source); EDIT: This is my new code: try { HttpClient client = new DefaultHttpClient(); String getURL = "http://busspur02.aseag.de/bs.exe?SID=5FC39&ScreenX=1440&ScreenY=900&CMD=CR&Karten=true&DatumT="+day+"&DatumM="+month+"&DatumJ="+year+"&ZeitH="+hour+"&ZeitM="+min+"&Intervall=60&Suchen=(S)uchen&GT0=Aachen&T0=H&HT0="+start_from+"&GT1=Aachen&T0=H&HT1="+destination+""; HttpGet get = new HttpGet(getURL); HttpResponse responseGet = client.execute(get); HttpEntity resEntityGet = responseGet.getEntity(); if (resEntityGet != null) { //do something with the response Log.i("GET RESPONSE",EntityUtils.toString(resEntityGet)); } } catch (Exception e) { e.printStackTrace(); } But the output file is cut-off. If I do the same request in a browser I get like 14 different routes. Now the file suddenly stops and I only get 3 routes.... what's wrong? 04-30 12:19:12.362: INFO/GET RESPONSE(256): <!-- Ausgabebereich (automatisch erzeugt) --> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <div align="center"> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <p></p> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <p>Ihr Fahrplan für die Verbindung von Aachen, Kaiserplatz nach Aachen, Karlsgraben am Freitag, den 30.04.2010 (Koniginnedag), Abfahrten ab 12:19 Uhr</p> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <table class="Result"> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <tr> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <th class="fussnote">Fussnote</th> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <th class="fahrzeug">Fahrzeug</th> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <th class="abfahrt">Abfahrt</th> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <th class="haltestellean">Haltestelle</th> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <th class="linie">Linie</th> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <th class="haltestelleab">Haltestelle</th> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <th class="ankunft">Ankunft</th> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <th class="fahrzeit">Fahrzeit/Tarif</th> 04-30 12:19:12.362: INFO/GET RESPONSE(256): </tr> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <tr> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <td>&nbsp;</td><td>&nbsp;<img src="http://www.busspur.de/logos/efa-bus.gif" title="Niederflurbus"></td><td>12:23</td><td title="lc0">Aachen, Kaiserplatz [Heinrichsalle Ri. Hansemannplatz]&nbsp;<a href="http://download.avv.de/Umgebungsplaene/hlp_ac_kaiserplatz.pdf">Umgebungsplan</a></td><td>45</td><td title="lc0">Aachen, Karlsgraben&nbsp;<a href="http://download.avv.de/Umgebungsplaene/hlp_ac_karlsgraben.pdf">Umgebungsplan</a></td><td>12:34</td><td>00:11 /  1,00</td><td>&nbsp;</td> 04-30 12:19:12.362: INFO/GET RESPONSE(256): </tr> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <tr><td colspan="9"><a href="/bs.exe?RI=0&amp;SID=5FC39">Fahrtbegleiter</a>&nbsp;&nbsp;</td></tr> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <tr><td colspan="9"><hr></td></tr> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <tr> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <td>&nbsp;</td><td>&nbsp;<img src="http://www.busspur.de/logos/efa-bus.gif" title="Niederflurbus"></td><td>12:26</td><td title="lc0">Aachen, Kaiserplatz [Heinrichsalle Ri. Hansemannplatz]&nbsp;<a href="http://download.avv.de/Umgebungsplaene/hlp_ac_kaiserplatz.pdf">Umgebungsplan</a></td><td>22</td><td title="lc0">Aachen, Karlsgraben&nbsp;<a href="http://download.avv.de/Umgebungsplaene/hlp_ac_karlsgraben.pdf">Umgebungsplan</a></td><td>12:37</td><td>00:11 /  1,00</td><td>&nbsp;</td> 04-30 12:19:12.362: INFO/GET RESPONSE(256): </tr> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <tr><td colspan="9"><a href="/bs.exe?RI=1&amp;SID=5FC39">Fahrtbegleiter</a>&nbsp;&nbsp;</td></tr> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <tr><td colspan="9"><hr></td></tr> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <tr> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <td>&nbsp;</td><td>&nbsp;<img src="http://www.busspur.de/logos/efa-bus.gif" title="Niederflurbus"></td><td>12:28</td><td title="lc0">Aachen, Kaiserplatz [Heinrichsalle Ri. Hansemannplatz]&nbsp;<a href="http://download.avv.de/Umgebungsplaene/hlp_ac_kaiserplatz.pdf">Umgebungsplan</a></td><td>25</td><td title="lc0">Aachen, Karlsgraben&nbsp;<a href="http://download.avv.de/Umgebungsplaene/hlp_ac_karlsgraben.pdf">Umgebungsplan</a></td><td>12:39</td><td>00:11 /  1,00</td><td>&nbsp;</td> 04-30 12:19:12.362: INFO/GET RESPONSE(256): </tr> 04-30 12:19:12.362: INFO/GET RESPONSE(256): <tr><td colspan="9"><a href="/bs.exe?RI=2&amp;SID=5FC39">Fahrtbegl

    Read the article

  • JSON serialization of c# enum as string

    - by ob
    I have a class that contains an enum property, and upon serializing the object using JavaScriptSerializer, my json result contains the integer value of the enumeration rather than its string "name". Is there a way to get the enum as a string in my json without having to create a custom JavaScriptConverter? Perhaps there's an attribute that I could decorate the enum definition, or object property, with? As an example: enum Gender { Male, Female } class Person { int Age { get; set; } Gender Gender { get; set; } } desired json result: { "Age": 35, "Gender": "Male" }

    Read the article

  • PHP SOAP Error: maximum string content length quota (8192) has been exceeded while reading XML data

    - by Sadi
    I am trying to use bing with PHP SOAP. It works fine for short strings. But for larger string I get following error: Fatal error: Uncaught SoapFault exception: [a:DeserializationFailed] The formatter threw an exception while trying to deserialize the message: Error in deserializing body of request message for operation 'Translate'. The maximum string content length quota (8192) has been exceeded while reading XML data. This quota may be increased by changing the MaxStringContentLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader. Line 9, position 227. in ........ I am using XAMPP in windows 7. All the solution I found are for .net not the PHP. PHP has no web.config file as far as I concern. Any idea how can I solve it. Thank you Sadi

    Read the article

  • ASP.NET MVC input is not a valid Base-64 string Error

    - by Cas Sakal
    Hello all, I am trying to post a from in an asp.net mvc page which contains files(user uploads) and a few string fields. However, when I click on the submit I get the following error; The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or a non-white space character among the padding characters. does anyone have an idea what is this about? I cannot debug it since it gives the error at the time of the binding of the page. Any help would be appreciated, cas

    Read the article

  • Telerik RadEditor filestream/string save to RTF

    - by hoombar
    Hi, The required functionality I am aiming for is to pull out RTF content from a database, edit it through a web interface (with a WYSIWYG editor) and then place the modified text back in to the database (in RTF format). The control that I am using to do this is Telerik RadEditor (we have a license already for these controls). In the most recent version there appears to be functionality to load in RTF content from a string or a stream, but the only method I can see that is exposed for getting RTF back out is exportToRTF(); this method modified the headers and allows you to save a RTF version of the content you have just edited as a file. The functionality to convert from HTML to RTF must exist somewhere within their library as you can export a RTF file, but I can not find any publicly exposed methods to pass this in to a stream or a string. Does anybody know of a way that I can convert the HTML back to RTF using the Telerik libraries without saving out to a file? Thanks

    Read the article

  • String length difference between ruby 1.8 and 1.9

    - by Raghu
    I have a website thats running on ruby 1.8.7 . I have a validation on an incoming post that checks to make sure that we allow upto max of 12000 characters. The spaces are counted as characters and tab and carriage returns are stripped off before the post is subjected to the validation. Here is the post that is subjected to validation http://pastie.org/5047582 In ruby 1.9 the string length shows up as 11909 which is correct. But when I check the length on ruby 1.8.7 is turns out to be 12044. I used codepad.org to run this ruby code which gives me http://codepad.org/OxgSuKGZ ( which outputs the length as 12044 which is wrong) but when i run this same code in the console at codeacademy.org the string length is 11909. Can anybody explain me why this is happening ??? Thanks

    Read the article

  • Silverlight 4 HttpWebRequest user agent string is null

    - by Dan B
    The problem I have a page with a silverlight object. It attempts to retrieve XML from the page. But I am struggling with a security exception. I have this code working brilliantly in WPF. When using a website hosting a silverlight application with the same code, the user agent string of the HttpRequest object is null (and seemingly cannot be set). In fact there is no header information at all - this causes a security exception when attempting to make my asynchronous call. The question Why is the user-agent string (and header information) null in my silverlight 4 application when making an asynchronous call using HttpWebRequest? Thanks in advance!

    Read the article

  • CVSROOT problem because of username string

    - by jatanp
    Hi, I have always been SVN user but currently I have to use CVS as the source repository. I am quite new to CVS and really got confused many a times (reason being I always tried to access CVS like SVN !) However now I am really stuck in one problem wherein I am not able to do any cvs operations through cygwin. Actually I have checked out the code using WinCVS and while doing that it created the CVSROOT as following, :pserver;username=<user_name>;password=<pwd>:<serverip>:/cvs/repository However whenever I try to use cvs command in cygwin (after setting CVSROOT variable using export) it fails with following error: cvs update: Unknown option (`username') in CVSROOT. cvs update: in directory .: cvs update: ignoring CVS/Root because it does not contain a valid root. cvs update: Unknown option (`username') in CVSROOT. cvs [update aborted]: Bad CVSROOT: `:pserver;username=<user_name>;password=<pwd>:<serverip>:/cvs/repository'. However the command works fine, if invoked through dos command prompt. I got to know that on DOS prompt, cvs command is provided by CVSNT whereas in cygwin it's some different package. Please let me know where I have made a mistake and how it can be corrected ! I need cvs to work inside cygwin for some scripting purpose.

    Read the article

  • Active directory select and display with asp.net (oledb) (error code: DB_E_ERRORSINCOMMAND(0x80040E1

    - by Phil
    I am trying to make a page which displays some user information returned from active directory. Here is my code so far: Dim oConnection As OleDbConnection Dim oCmd As OleDbCommand Dim strADOQuery As String Dim oleReader As OleDbDataReader oConnection = New OleDbConnection() oCmd = New OleDbCommand() oConnection.ConnectionString = "Provider=ADsDSOObject;" oConnection.Open() oCmd.Connection = oConnection strADOQuery = "select distinguishedName, cn, givenname, sn, mail, middleName, displayName, description, telephonenumber, physicalDeliveryOfficeName, employeeID from 'LDAP://dc=foo,dc=ac,dc=uk' WHERE objectCategory='Person' AND objectClass='user' AND sAMAccountName='" & Uname & "'""" oCmd.CommandText = strADOQuery oCmd.CommandTimeout = 600 oCmd.ExecuteReader() While oleReader.Read ADDN = r("distinguishedName") ADCommonName = r("cn") ADFirstName = r("givenname") ADLastName = r("sn") ADEmail = r("mail") ADFirstandLast = r("displayName") ADDescription = r("description") ADTelephone = r("telephonenumber") ADOffice = r("physicalDeliveryOfficeName") ADStaffnum = r("employeeID") End While oConnection.Close() oleReader.Close() I'm finding it hard to see exactly what is wrong with the code. The error message presented is vague: 'ADsDSOObject' failed with no error message available, result code: DB_E_ERRORSINCOMMAND(0x80040E14). Any assistance would be greatly appreciated Thanks.

    Read the article

  • split currency and amount from a string

    - by webber
    I am importing a file which has amount with different currency signs £12.10 $26.13 €12.50 I need to import and convert this into single currency. I am splitting the string as follows $parts = split(' ', preg_replace("/([0-9])/", ' ${1}', $amount, 1)); Couldn't make preg_split work with PREG_SPLIT_DELIM_CAPTURE $parts = preg_split("/\d/", $amount, 2, PREG_SPLIT_DELIM_CAPTURE); I have an array of currency sign to currency code $currencySymbols = array('£'=>'GBP', '$'=>'USD','€'=>'EUR') I need to 1. split the string into currency sign and value - if there is a better way then what i am doing 2. map the currency sign to currency code. Not able to map with $currencySymbols[$parts[0]] Any help will be appreciated. (PHP 5.2.6) using charset=utf-8 Many thanks

    Read the article

  • Infragistics Webgrid (Datagrid) dynamic adjusting columns

    - by mattgcon
    I want to explain this as best as I can. I have a Webgrid with a certain amount of columns. What I want is for the columns to adjust to the size of the largest string within each column, where the total of all width of columns does not exceed the width of the webgrid. At the same time however if the width of all columns is less than the width of the webgrid I want each column to adjust proportionately so that the total of columns widths equal the width of the webgrid. Can anyone help me with this logic?

    Read the article

  • JavaScript - string regex backreferences

    - by quano
    You can backreference like this in JavaScript: var str = "123 $test 123"; str = str.replace(/(\$)([a-z]+)/gi, "$2"); This would (quite silly) replace "$test" with "test". But imagine I'd like to pass the resulting string of $2 into a function, which returns another value. I tried doing this, but instead of getting the string "test", I get "$2". Is there a way to achieve this? // Instead of getting "$2" passed into somefunc, I want "test" // (i.e. the result of the regex) str = str.replace(/(\$)([a-z]+)/gi, somefunc("$2"));

    Read the article

< Previous Page | 158 159 160 161 162 163 164 165 166 167 168 169  | Next Page >