w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
What charset encoding for an API
The C# client should send all parameters encoded in UTF8. You cannot run way from Unicode - UTF8 in JSON since the definition of JSON states: JSON text SHALL be encoded in Unicode. The default encoding is UTF-8. It could also be UTF-16 (BE or LE) or UTF-32 (BE or LE). If you generate JSON from the data and then get the hmac there should be a difference, right? Since at the least JSON has two more symbols? { or } so should the hash be different than the one sent by the C# Client? Either have the client send you the data in JSON or get the hmac before converting the data.

Categories : C#

declares encoding of own file?
Until this element is read, the document is interpreted with the default encoding of the user agent. If the encoding is different from the default, then the document is re-interpreted according to the meta element. That's why you should place it as early as possible, or preferably use an HTTP header (see below). The hope with the <meta> element is that the preceding characters are all in the ASCII character set, which are interpreted correctly in just about all character sets. In general, however, and if it is possible, this information should be sent in an HTTP response header: Content-Type: text/html; charset=utf-8 This ensures that the document is interpreted correctly from the start.

Categories : HTML

Charset encoding problems with JSP, JQuery and Javascript
In the servlet behind the URL TarefaUpdateStatus, perform the following call before you grab the very first request parameter: request.setCharacterEncoding("UTF-8"); Better yet, do the job in a servlet filter which is mapped on an URL pattern of /*, so that you don't need to copypaste this line over all servlets. If you happen to use Spring, it has such one filter in its library. This line will tell the servletcontainer to use UTF-8 to decode the URL-encoded POST request parameters. Otherwise it will use container's default charset for this which is usually ISO-8859-1, which would only cause those parameter values to end up in Mojibake. Note that this does not cover GET request parameters. This needs to be configured in servletcontainer's side. See also: Unicode - How to get the ch

Categories : Javascript

How can I change the encoding/charset of a string on Javascript?
From https://developer.mozilla.org/en-US/docs/Web/API/element.innerHTML Note: If a , , or node has a child text node that includes the characters (&), (<), or (>), innerHTML returns these characters as &amp, &lt and &gt respectively. Use Node.textContent to get a correct copy of these text nodes' contents. document.getElementsByTagName("pre")[0].textContent; See: https://developer.mozilla.org/en-US/docs/Web/API/Node.textContent

Categories : Javascript

maven file.encoding and Charset.defaultCharset()
The editor must set the same encoding too. Evidently you saved the file in Cp1252. Use JEdit or NotePad++ to check that. getBytes("UTF-8"); // 2 getBytes("Cp1252"); // 1 getBytes(); // Depending on platform, System.getProperty("file.encoding") What maven does with those properties, I am not entirely sure in case of file.encoding.

Categories : Maven

Escape HTML tags. Any isue possible with charset encoding?
No, JavaScript lives in the Unicode world so encoding issues are generally invisible to it. escapeHtml in the linked question is fine. The only place I can think of where JavaScript gets to see bytes would be data: URLs (typically hidden beneath base64). So this: var markup = '<p>Hello, '+escapeHtml(user_supplied_data); var url = 'data:text/html;base64,'+btoa(markup); iframe.src = url; is in principle a bad thing. Although I don't know of any browsers that will guess UTF-7 in this situation, a charset=... parameter should be supplied to ensure that the browser uses the appropriate encoding for the data. (btoa uses ISO-8859-1, for what it's worth.)

Categories : Javascript

MySQL collation and Glassfish default-charset encoding
Ok, I had to add these lines to my.cnf I guess MySQL Win version and Linux version come with different default configuration [client] default-character-set = utf8 [mysqld] character-set-server = utf8 collation-server = utf8_turkish_ci [mysql] default-character-set=utf8

Categories : Java

Charset/Encoding error while Inserting to Google Datastore
If you say decode, it will translate binary in the coding you provide. And if you use encode it is the other way around. content = content.encode("utf-8") # translates utf-8 in binary The datastore uses utf-8. Look at this great blog post from Nick Johnson : http://blog.notdot.net/2010/07/Getting-unicode-right-in-Python

Categories : Python

String.getBytes(charset) has errors for EBCDIC-charset
When you call data.getBytes(ebcdic) You are encoding the text in data into EBCDIC bytes. Then you create a string from these bytes as if they stood for some string in the default character encoding for your system: this causes breakage because the bytes don't have to encode valid text in any other encoding than EBCDIC. To fix this, keep bytes as bytes: byte[] result= data.getBytes(ebcdic); System.out.printf("EBCDIC: %s ",asHex(result));

Categories : Java

Does JasperServer support URL encoding?
Here is the link to the JasperReports Server Web Services Guide: http://community.jaspersoft.com/documentation/jasperreports-server-web-service-guide On page 21: Arguments are passed in the URL with the conventional syntax: http://:/jasperserver[-pro]/rest//path/to/object?=&=&... You're not actually passing a question mark, you're telling the web service to get ready to accept your arguments. See http://www.w3schools.com/tags/ref_httpmethods.asp for more information on GET requests.

Categories : Web Services

Cross Browser support for CSS Flexbox
CSS Flexbox model optimised for UI Design It developed primarily to avoid overflowing parent element. It will shrink children when ancestor element size constrict. It fill up the space with expanding children size when ancestor element size extends Flex container shrink and expand behaviour can be break with min and max width / height property CSS FlexBox versions by version W3 2009 : display: box; box-align start | end | center | baseline | stretch box-direction normal | reverse | inherit box-flex <number> 0.0 box-flex-group <integer> 1 box-lines single | multiple box-ordinal-group <integer> 1 visual box-orient horizontal | vertical | inlin

Categories : Misc

Cross-Screen support for navbar
By multiple screens, you mean screen resolutions/dimensions, right? Or are you referring to browsers? You are going to want to check out media queries, these are used to target different screen sizes.. These are the media queries I use for my site, I followed the twitter bootstrap setup seen here: CSS /* Large desktop */ @media (min-width: 1200px) { ... } /* Portrait tablet to landscape and desktop */ @media (min-width: 768px) and (max-width: 979px) { ... } /* Landscape phone to portrait tablet */ @media (max-width: 767px) { ... } /* Landscape phones and down */ @media (max-width: 480px) { ... } Just place your CSS into each query, and you it should work well.. Be sure to place this in your head though, this will eliminate problems with retina display: <meta name="viewport" c

Categories : HTML

Cross browser & IE 8 support event Listener
The problem is when you're calling the fn: FormEnum(). More than likely, you're trying to assign event handlers to forms that don't exist in your DOM. Try putting FormEnum() inside a tag instead. Also, what Vitor said: make sure you're using the declared variable "form" instead of "forms".

Categories : Javascript

cross store support spring - lazy fetch
I had a similar requirement and looked at the MongoDB Cross-Store module documentation and source code around Apr-2013. I did not find anything that would suggest that lazy loading is supported with any of the Spring Data Cross-Store modules. Looking at the source code (at that time), I saw that cross-store entities are loaded by hooking into the JPA PostLoad lifecycle event and persisted by hooking into the JPA PostPersist event. I could not come up with a simple way to implement lazy loading because cross-store persistence is really a Spring Data functionality whereas lazy loading is implemented by the JPA provider, which is completely ignorant of any other persistence managers in use. Unless the cross-store modules have been changed since Apr-2013, I doubt that lazy loading is suppo

Categories : Spring

Does Android support cross application file access
This is possible, even multiple manners. If both applications are from the same developer they could use the same shared user id. This is an attribute in the AndroidManifest.xml, android:sharedUserId. When different applications/apks have the same userid they are able to read each others files. When using this technique, files are still prive to the rest of the OS, but are readable/writable by other apks from the same developer. Another posibility is using the sdcard to share data. That storage is publicly available. Android has built-in support for sharing data with other applications through the use of ContentResolvers. This does not work for files, but is probably the preferred way to shared data between applications.

Categories : Android

The remote server returned an error" (400) Bad Request. ContentType = "text/xml; charset=utf-8"
I don't think it is to do with SOAP version problems because webHttpBinding is a REST binding, not a SOAP binding Setting the ContentType header on the request tells the service that the client must respond with the requested content type. What content type do you actually respond with? If it is not text/xml; charset=utf-8, then that could explain the error. According to the documentation, the default response ContentType for webHttpBinding is application/xml or application/octet-stream for streamed responses. And if you do not specify any contentType on the HttpWebRequest, fiddler tells me that the ContentType header is set to text/html, application/xhtml+xml, */* The wildcard means that any response type is OK - including the application/octet-stream that your server is responding wi

Categories : Dotnet

How to send cross-domain request to google places api (seems it does'nt support jsonp)?
Please try following code to get response from the Google Place API $.ajax({ type: 'GET', url: 'https://maps.googleapis.com/maps/api/place/autocomplete/json?&input=Houston&sensor=true&types=(cities)&key=<Your Key>', async: false, jsonpCallback: 'jsonCallback', contentType: "application/json", dataType: 'jsonp', success: function (json) { console.dir(json.sites); }, error: function (e) { console.log(e.message); } }); Google responds in form of Jsonp Callback in Place API.kindly replace your key in URL

Categories : Json

the content type 'application/json; charset=utf-8' was not the expected type 'text/xml; charset=utf-8'
You need to use the WebServiceHostFactory, instead of the regular ServiceHostFactory in your code. That will configure the endpoint with the appropriate binding (webHttpBinding) and behavior (webHttp) to honor the [WebInvoke] attribute. <serviceHostingEnvironment > <serviceActivations> <add factory="System.ServiceModel.Activation.WebServiceHostFactory" relativeAddress="./wsccc1/wscccService.svc" service="service.wservice"/> </serviceActivations> </serviceHostingEnvironment>

Categories : Json

does new versions of xcode support cross-project references for adding static library for linking?
Let me first explain roughly what are .a files and frameworks. In Cocoa you write your classes in into .m files, more or less on class per file. When you compile your project the compiler processes each of your .m files one by one and generates the binary representation (machine code) of your source code together with some header information like the list and offset of the methods of the object. The result is one .o object file for each .m source code file. Now if you are linking for a static library, all of these object files are packed into an .a archive file for a given platform: i386 for simulator, armv7 and armv7s for device. To use these archives you also need to public header files of the SDK (even if it is possible to extract the same information from the archives). A .framework b

Categories : Iphone

SQL Server Cross Database View
I definitely wouldn't make a view. The joins will be insane and it won't scale as you add new clients. I'm not sure I would use triggers either. It could work, but really aren't you just duplicating replication at that point? I would use replication and just replicate those tables to the reporting server. Then you can mold the replicated tables to be whatever you need them to be. Replication can be a bit of a pain to get working right, but when it works it's really amazing.

Categories : Sql Server

Cross platform backend/server
You need a database and some server-side code to handle the users. You need some way of opening up the database to the other platforms, e.g. a RESTful API. What you're asking for can't really be answered in a few paragraphs, it's a big job with lots of different aspects. Here are some things for your to read, but I strongly recommend that you spend time learning rather than diving into a project which is likely to be pretty big in scope. PHP users tutorial http://forum.codecall.net/topic/69771-creating-a-simple-yet-secured-loginregistration-with-php5/ REST server in PHP http://net.tutsplus.com/tutorials/php/working-with-restful-services-in-codeigniter-2/

Categories : Android

Server sent events - cross domain safari
WebKit doesn't support CORS in SSE yet. Solutions: Fetch from the same origin, new EventSource("/app.php"); Use CORS-aware polyfill for Safari. https://github.com/Yaffle/EventSource Create iframe at same origin that your SSE stream (http://mydomain.org/iframe.html), read same-origin stream in the iframe, and use postMessage() to send events to other origins.

Categories : PHP

Cross server MySQL connection and requests
Keep in mind, when running a CPU intensive operation in Node the whole application blocks as it runs in a single thread. If you're going to run a CPU intensive operation in Node, make sure you spawn it off into a child process who's only job is to run the calculation and then return to the primary application. This will ensure your Node app is able to continue responding to income requests as the data is being processed. Now, onto your question. Having the database on a different server is extremely common and typically is a good practice to have. Where you can run into performance problems is if your database is in a different data center entirely. The further (physically) your database server is from your application server, the more latency there will be per request. If these request

Categories : PHP

Is there a wsgi server that will do progressive Transfer-Encoding: chunked
Thanks to the tips from Jon, I got it working in waitress: import time def app(environ, start_response): start_response('200 OK', [('Content-Type', 'text/plain')]) def content(): yield ''.join(('First bit of content', '.' * 18000, ' ')) time.sleep(5) yield 'Second bit of content' return content() import waitress waitress.serve(app, host='0.0.0.0', port=8080) waitress will send the data when it reaches 18000 bytes (which is also configurable when you create the server.)

Categories : Python

cross-browser server side web app logging library
Webug for Chrome implements the FirePHP protocol, so FirePHP can be used cross-browser now.

Categories : Debugging

Cross Domain GET request, hitting server but not getting response
if this is through different domains simple ajax will not work. you can try jQuery.ajax({ url: BotMind.messagingUrl+"send", crossDomain: true, dataType: "jsonp", type: "GET", complete: function(){ //alert('complete message'); }, success: function(data, textStatus, jqXHR){ $('div.invitation').html("<br><p>Thank you for submitting! Check your inbox every Friday for the newsletter!</p>") .hide() .fadeIn(750); }, error: function () { alert("An Error Occurred. Try Again :( "); }, statusCode: { 404: function() { //alert("page not found")

Categories : Jquery

Setting up cross-domain calls on Rails server
It seems that adding the data-type as JSONP avoids the cross browser problems: var req = $.ajax({ url: url, type: "GET", crossDomain: true, dataType: "JSONP", ... See this question for more info - Can anyone explain what JSONP is, in layman terms?

Categories : Javascript

Authentication / login issue on cross applications on same web server | IIS 7.5 install
There was a difference between IIS 7 & 7.5 that default identity of the application pool was changed from Network Service to an automatically generated AppPool identity. Also, the two application pools were running under different users. Since, the autogenkey are stored on a per user basis,, and the two processes are running under different users they will have different autogen keys, which finally explains why we are seeing issues here. Going through the DEV'S Blog, finally proved a lot helpful. Finally, taking into account our requirements, we changed the identity of the application pool to the same user for each app pools. Also,this blog post by Kev describes how are autogenkey stored in the registry.

Categories : Asp Net

SQL Server Management Studio 2012 Pivot/Cross Tab Query
Without seeing your query I am guessing but if you are trying to PIVOT the data with a CASE expression my suggestion would be to add an aggregate function around the CASE. select name, max(case when [group] = 'A' then status end) grp_A, max(case when [group] = 'A' then date end) A_day, max(case when [group] = 'A' then [count] end) A_ct, max(case when [group] = 'B' then status end) grp_B, max(case when [group] = 'B' then date end) B_day, max(case when [group] = 'B' then [count] end) B_ct, max(case when [group] = 'C' then status end) grp_C, max(case when [group] = 'C' then date end) C_day, max(case when [group] = 'C' then [count] end) C_ct, max(case when [group] = 'D' then status end) grp_D, max(case when [group] = 'D' then date end) D_day, max(case when [group] =

Categories : Sql Server

How to config WAMP apache server to allow cross domain requests of ajax?
You were on the right track. The only thing left to do now is to enable the headers module. This can be done as follows: click on the wamp icon in your systray go to Apache > Apache modules check the option 'headers_module' After you do this, wamp will restart and the configuration you put in your post will work

Categories : Apache

CORS - Cross-Domain AJAX Without JSONP By Allowing Origin On Server
There is no need to use JSONP if you enable CORS. Access-Control-Allow-Origin: http://www.example.com if this header is set in the response, then normal XmlHttpRequest will be able to access the response as if it is like same domain. Check whether this header is set correctly. I hope that this link will help you if you are using jquery A CORS POST request works from plain javascript, but why not with jQuery? Update: Example var xmlhttp= new XMLHttpRequest(); var url="https://developer.mozilla.org/en-US/docs/HTTP/Access_control_CORS?redirectlocale=en-US&redirectslug=HTTP_access_control"; xmlhttp.open("GET",url,false); xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8"); xmlhttp.send(); Try this in any domain, you will get response. Upd

Categories : Javascript

Websocket and browser,Server Support?
Apache Tomcat has an experimental websocket implementation. According to caniuse.com, Internet Explorer only supports WebSockets in version 10 and above. Internet Explorer 10 is unavailable for Windows versions prior to Windows 7, so when your application requires websockets, it won't work for anyone using IE on Windows XP or Vista, which is still a considerable market share. Another important platform which has no Websocket support is the Android browser. Whether or not to use Websockets under the current circumstances is an opinion-based question.

Categories : Internet Explorer

PHP support for Mssql on windows server
php do support almost all database including mssql. All you need to do is to just enable it by removing the semicolon from php.ini Regards Alok sportsafter

Categories : PHP

When changing encoding in Maven project (CP-1252 to UTF-8), how shall i handle XML-files with encoding iso-8859-1
It doesn't apply to XML files: Currently, the character encoding for source files needs to be configured individually for each and every plugin that processes source files. In this context, source file refers to some plain text file that - unlike an XML file - lacks intrinsic means to specify the employed file encoding. The Java source files are the most promiment example of such text files. Velocity templates, BeanShell scripts and APT documents are further examples. This proposal does not apply to XML files as their encoding can be determined from the file itself, see XML encoding for further information.

Categories : Java

Page with UTF-8 encoding sends data to MySQL with UTF-8 encoding but entry is scrambled
Do you get this hex string in phpMyAdmin? I suppose when you SELECT the inserted value by e.g. PHP or the MySQL console client, you would be given the expected cyrillic UTF8 string. If so, it's a configuration issue with phpMyAdmin, see e.g. here: http://theyouri.blogspot.ch/2010/12/phpmyadmin-collated-db-in-utf8bin-shows.html phpMyAdmin collated db in utf8_bin shows hex data instead of UTF8 text $cfg['DisplayBinaryAsHex'] = false; Moreover, please don't use mysql_query that way, since you're totally open to SQL injections. I'm also not sure if you really want to use utf8_bin, see e.g. this discussion: utf8_bin vs. utf_unicode_ci or this: UTF-8: General? Bin? Unicode? EDIT There's something weird going on. If you translate the given hex string to UTF8 characters, you get this:

Categories : PHP

Rails 4 Server Not Starting (Active Support)
The gsub where the syntax error is being produced includes Regexp syntax which isn't supported in < Ruby 1.9.3, and would produce this identical error in those versions, it seems. However, your paths show Ruby 2.0.0, which is odd, so I'm not entirely sure what's up. Hopefully that gives you something to go on though, look at your Ruby install perhaps.

Categories : Ruby On Rails

Chrome web apps - server side support
The platform supports server-side technologies the same way a C++ or Java application would support them: through HTTP (probably RESTful) interfaces that the server side of your app (if any) exposes. For example, your app might make a request to http://example.com/api/foo/bar/baz?param1=123&param2=456, and might get back a JSON response that your app would then parse. It doesn't really matter which server-side technology you're using, because the API looks the same from the app's perspective. If you're asking about PHP, Ruby, Python, Go, node.js, etc., running on the user's machine as a client-side app, no, that's not how Chrome packaged apps work (though in theory one could get one of those environments running as a NaCl module that then generates client-side code). Instead, you writ

Categories : PHP

Does Poco c++ libraries support sql server transactions
I debugged the poco library, in the poco->ODBC->SessionImpl class the begin function which marks the start of a transaction has no implementation, where as in poco->MySQL->SessionImpl class the begin function has implementation that's why transaction works for MySQL not for SQL Server

Categories : Sql Server

Oracle Service Bus - Application Server & JMS Support
OSB runs on Weblogic and it is the only suppoorted application server. Some other fussion Middleware products can run on WebShpere. Details can be found in http://www.oracle.com/technetwork/middleware/downloads/fmw-11gr1certmatrix.xls OSB don't have its own JMS implementation. It can use any standard JMS (e.g. one shipped with Weblogic). It has also adapters for IBM WebSphere MQ.

Categories : Oracle

Is it support Application cache in multiple server in asp.net(C#)?
If you are running Windows Server 2008 or later, then I would look into Windows Server AppFabric Caching. Windows Server AppFabric extends Windows Server to provide enhanced hosting, management, and caching capabilities for Web applications and middle-tier services. The AppFabric hosting features add service management extensions to Internet Information Services (IIS), Windows Process Activation Service (WAS), and the .NET Framework 4. This includes Hosting Services and Hosting Administration tools that make it easier to deploy, configure, and manage Windows Communication Foundation (WCF) and Windows Workflow Foundation (WF) based services. The AppFabric caching features add a distributed, in-memory object cache to Windows Server that makes it easier to scale out high-performance .NET

Categories : C#



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.