w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Facebook like button https issue: protocol mismatch from http and https
Reviewing the js code on Facebook there are multiple urls containing hard coded strings for http://static .../rsrc.php it's possible those are the files triggering the error. This may be something Facebook needs to update. On a side note, it may be possible to download that js file from Facebook and store it on your server and remove the hard coded http string. I would test this further but I am on my phone at the moment.

Categories : Facebook

Once https page is visited, all subsequent pages are served from https
ok I think I found the reason. The links I am visiting are relative, so "/forum" for example. Once https is in the browser it seems like visiting a relative address is leaving the root as https:// and appending the relative path. I believe the fix here will be to use the full path for the link instead of relative.

Categories : Htaccess

when using https, https can't find codeigniter controllers. Running Centos
Change this line : RewriteRule ^(.*)$ index.php?/$1 [L] to : RewriteRule ^(.*)$ /index.php?/$1 [L] The .htaccess would otherwise be redirected relatively to a index.php in the join folder, which off course is not there.

Categories : PHP

How do you enable https and http->https redirects in ring / compojure
It's possible to serve HTTPS with clojure, but it's much more popular to put nginx or something like that in front of your ring server. If you can figure out how to configure jetty, though, run-jetty clearly supports SSL.

Categories : Http

Redirect all http AND https non-www URLS to https://www.xyz.com via htaccess
In case anyone from the future (HELLO PEOPLE OF THE FUTURE) stumble across this, I asked the same question and had it answered over at Server Fault. Short version: impossible. Long version: http://serverfault.com/questions/523199/redirect-all-http-and-https-non-www-urls-to-https-www-example-com-via-htaccess

Categories : Htaccess

Can https fallback to http and security level of https
No, HTTPS never falls back to HTTP automatically. It would take deliberate action by the user. If you're just going to a web page by putting its URL into the address bar, this is easy; for form submission it's harder. Yes, sending plain text over SSL is fine. In fact, sending a hashed password doesn't really increase security much at all -- if someone manages to sniff the connection and gets the hashed password, that's all they need to be able to login to the site. It has one small advantage: if the user uses the same password at multiple sites, learning the hashed password for one site doesn't help them get into another site that uses a different (or no) hash. And it's not likely to be feasible to send salted hashes, since the client doesn't know the salt. A cnonce adds an extra level

Categories : Asp Net

How can i convert links to https when server providing https?
If you remove the http:// portion and use instead: <script type="text/javascript" src="//static.monstermmorpg.com/js_files/jquery-1.9.1.min.js"></script> It should request based on the current scheme being used.

Categories : C#

HTTPS GET request to https://www.googleapis.com/plus/v1/people/me
Create a Google_Oauth2Service object (put it under the $plus initialization), like: $client = new Google_Client(); $plus = new Google_PlusService($client); $oauth2 = new Google_Oauth2Service($client); and after succesfully authenticating the client use: $userInfo = $oauth2->userinfo->get(); $email = $userInfo['email'];

Categories : PHP

IHttpHandler to redirect "https://example.com" to "https://www.example.com"?
If you use IIS7, you might want to try URL Rewrite Module. http://www.4guysfromrolla.com/articles/072810-1.aspx http://www.jppinto.com/2010/03/automatically-redirect-http-requests-to-https-on-iis7-using-url-rewrite-2-0/

Categories : Asp Net

is this C++ example portable?
Nothing in the standard requires the comparator to be callable with two objects from the range. So that is a bug in the standard library used by VS 2010. Here are all the relevant requirements (quoting C++11): [lower.bound]§1+2: 1 Requires: The elements e of [first,last) shall be partitioned with respect to the expression ... comp(e, value). 2 Returns: The furthermost iterator i in the range [first,last] such that for any iterator j in the range [first,i) the following corresponding conditions hold: ... comp(*j, value) != false. [upper.bound]§1+2: 1 Requires: The elements e of [first,last) shall be partitioned with respect to the expression ... !comp(value, e). 2 Returns: The furthermost iterator i in the range [first,last] such that for any iterator j in the range

Categories : C++

shiny with portable R?
That should work fine, assuming you can get your R-Portable setup to have a portable package library. Shiny doesn't launch R, you run R and then from there load and launch your Shiny app (using shiny::runApp()), and then the browser and R process communicate using TCP. If your apps don't need to be private you could also apply for an account on RStudio's own Shiny hosting. It's free while in beta. https://rstudio.wufoo.com/forms/shiny-server-beta-program/

Categories : R

Portable gcc for linux
Probably you can take a look on that: Portable C Compiler, with some How-to

Categories : Linux

Portable way to get user name
You are right - there is no portable way to do it. There are two solutions for that: use proper set of ifdef's to use one code on window, and another on linux. the other way is to do it with factory which would return you an abstract object or pointer to function which would be system specific. Factory should detect system and return proper function/class

Categories : C++

Is there a portable way to define INT_MAX?
Well, one can try #define INT_MAX (int) ((unsigned) -1 / 2) which "should" work across platforms with different word size and even with different representations of signed integer values. (unsigned) -1 will portably produce the UINT_MAX value, which is the all-bits-one pattern. Divided it by 2 it should become the expected max value for the corresponding signed integer type, which spends on bit for representing the sign. But why? The standard header files and definitions made in them are not supposed to be portable. BTW, the definition of INT_MIN you quoted above is not portable. It is specific to 2's complement representation of signed integers.

Categories : C

Use Selenium with Python Portable
Based on answer found Importing modules on portable python and How to install external libraries with Portable Python? Check for what import sys; print sys.path says? It displays the list of directories and zipfiles where portable python looks for modules to import. Just copy your modules into one of those directories or zipfiles, or sys.path.append('/whatever/dir') if you have your modules in /whatever/dir and want to keep them there (the latter approach will last only for the current session, be it interactive or a script's execution). Also on their FAQs You don’t have package I need, can I add it? For simpler packages you can use easy install or even extract them in site-packages folder of the Portable Python distribution. However some packages are installing additional depe

Categories : Python

Portable JDK for Minecraft modding
I have done this myself because I was in the same position. I tried copying the JDK as well, but that didn't work, could be a mistake on my part. I am using OpneJDK now, and that works perfectly with intelij-idea, I'm sure it works with Eclipse as well. http://openjdk.java.net/

Categories : Java

How to store password in portable way?
Try this: If there is communication happening between your server and the client, you can use session keys to encrypt/decrypt the secret data. OR Create a key pair (RSA) or get in touch with Certificate Authority Encrypt the secret keys Send them via n/w Let the client get access to your key Client will decrypt the secret data

Categories : C#

Portable replacement for ECMAScript 6 Set?
off the top of my head, this can be accomplished with an object and a bit of code. an object is a hash and thus gives you 80% of the functionality you want. the problem with js objects is that their keys are always strings. This is where you write a bit of code. I would create 2 objects: one where your keys are strings and one where your keys start out as numbers but become strings. if thing thing you are inserting is number, check in the numbers object, if string, check in the other object. psudocode: numObj = {} strObj = {} add = (val) -> if _.isNumber(val) numObj[val] = true else strObj[val] = true contains = (val) -> if _.isNumber(val) return !!numObj[val] else return !!strObj[val]

Categories : Javascript

self-contained portable emacs
If you can compile emacs in a machine, you can run from there without installing it. Just execute the binary that the compilation creates for you (you may need to change your path, since a emacsclient from different versions may not work well together). I know this is not what you were looking (since the emacs is not portable and you might lack a compilation environment in that machine), but the trick might work for you. Of course the TRAMP over ssh approach that assem suggested is a better solution (and what I personally use)

Categories : Emacs

Portable Area disadvantages
Let's start with the Definition: A Portable Area is a dll that contains items that would normally be part of your solution. Portable Areas contain Views, Controllers, Models, even JS Scripts, CSS files and images. Ideally, the items in your Portable Area work together to create cohesive functionality. If not, you are probably not benefiting from having a Portable Area. Benefit I compare Portable Areas to Web-Forms Web Parts because they are both an attempt to answer the question: How do I create re-usable functionality? You will benefit from Portable Areas if you want to create functionality to be used in multiple projects, or distributed as functionality to be consumed by 3rd parties. Disadvantage Every time you make a change to any View, JS File, CSS File, or image within you

Categories : Asp Net

Portable equivalent of __debugbreak
I can confirm that __builtin_trap() does not give you the right type of breakpoint to continue in gcc. It gives an illegal opcode trap, which doesn't allow the code to continue at all - if you do next in gdb, it just exits with a SIGILL, which isn't particularly beneficial if you actually wanted to be able to continue. As far as I can see, the only solution is to use inline assembler. I tried using an int 3 in a "hello, world" program, and although gdb didn't recognise the breakpoint, it did stop at the instruction, and I was able to continue after the break. #include <stdio.h> #define BREAKPOINT asm("int $3") int main() { BREAKPOINT; printf("Hello, world! "); return 0; } (Compiled with both gcc and clang on Linux x86_64, both 32 and 64 bit mode) I did find

Categories : C++

php - How to create path in a portable way using PHP API
There is a constant available, it is called DIRECTORY_SEPARATOR. $path_to_file = $directory . DIRECTORY_SEPARATOR . $file It‘s documented here: http://php.net/manual/en/dir.constants.php#constant.directory-separator Be advised that PHP handles this internally, so on Windows you may get a forward slash, but they will work just fine inside PHP!

Categories : PHP

StreamReader and Portable Class Library
found the answer over here (by Rob Caplan): http://social.msdn.microsoft.com/Forums/windowsapps/en-US/386eb3b2-e98e-4bbc-985f-fc143db6ee36/read-local-file-in-portable-library#386eb3b2-e98e-4bbc-985f-fc143db6ee36 File access cannot be done portably between Windows Store apps and Windows Phone 8 apps. You will have to use platform specific code, to open the file and acquire a stream. You can then pass the stream into the PCL. Since both Windows Store apps and Windows Phone 8 apps use the essentially the same Windows (Phone) Runtime classes from Windows.Storage to open files you can share the code (but not the binary) by linking a code file between the two projects. See Share code with Add as Link . See Maximize code reuse between Windows Phone 8 and Windows 8 for

Categories : C#

Windows handle to portable device
Based on the comments to my question, the answer to my question is NO. You can't get a handle to the portable devices. At least not how and for what I want it. Unless the driver(s) expose the internal memory and/or drive(s) via drive letter(s), but even then you can't be sure that you get true raw access to the device, since the drivers might be faking the data to make one file system look like another.

Categories : C++

How to use TypeForwardedTo in Portable Class Libraries?
The principle idea of type forwarding is very well explained in this question and this article and I'm not repeating the details here. In summary, however, the idea is to be able to reuse a library A without recompiling, even though it references a library B that is being replaced by library C. To that end, library B has to be modified such that it forwards the reference to library C, which is exactly what the TypeForwardedTo attribute does. How does this help you? Well, you could create your ShimLib such that it is referenced by all your projects, but uses conditional compilation and type forwarding to link it to the framework libraries if they exist. Fortunately, someone already did that for you :) Edit in response to Matt's comment: You're right, I overlooked that Theraot doesn't fall

Categories : C#

How to check if file exists in C++ in a portable way?
Because C++ is also tagged, I would use boost::filesystem: #include <boost/filesystem.hpp> bool FileExist( const std::string& Name ) { return boost::filesystem::exists(Name); } Behind the scenes Apparently, boost is using stat on POSIX and DWORD attr(::GetFileAttributesW(FileName)); on Windows (Note: I've extracted the relevant parts of code here, it could be that I did something wrong, but this should be it). Basically, besides return value, boost is checking errno value in order to check if file really does not exist, or your stat failed for a different reason. #ifdef BOOST_POSIX_API struct stat path_stat; if (::stat(p.c_str(), &path_stat)!= 0) { if (ec != 0) // always report errno, even though some ec->assign(errno, system_c

Categories : C++

Non-portable Excel VBA macro behavior
If you want a toolbar/button to travel with a file (ie. not always link back to the original version) then you need to add it to the file itself, not to the QAT. The QAT only "knows" about the actual file you linked the button to. It might be better to add the macro to your Personal Macro Workbook and then just have it operate on the ActiveWorkbook. However, if you want to distribute it to other users, you can keep the macro in the "database" workbook and add a custom ribbon part. See: http://www.rondebruin.nl/win/s2/win001.htm

Categories : Excel

move stdout out of the console, in portable C
On a POSIX (e.g. Linux and OSX) system you can use the isatty function to check if stdout goes to a console or to something else: if (isatty(STDOUT_FILENO)) printf("Going to a console "); else printf("Standard output is redirected or piped "); Unfortunately there is no portable way to do this that works on both POSIX systems and Windows.

Categories : C

WiX Selective Installation (full and portable)
Your third option (a zip file) is good. A similar option would be to package with a PortableApps.com installer. It is not possible to use Windows Installer to "simply copy the source files to the destination directory." Windows Installer manages installations and provides repair and uninstall support--those features are not optional (though you could hack around them). A successful installation would do more than copy files and a proper failed installation would undo everything it had done.

Categories : Wix

HttpClient Portable returns 404 notfound on WP8
I reproduced the problem using fiddler to simulate modem speeds. The problem is happening because Phone's HTTPWebRequest implementation will timeout the request whenever it exceeds around 60s. In the debugger I see them getting back ERROR_INTERNET_TIMEOUT from their native layer. The only workaround I can think of at the moment would be to send the file in smaller POSTs, assuming the server supports that.

Categories : Windows Phone 8

simple and portable malloc library
Basically, you need two memory management routines: One that stores its internal working in one part of RAM while managing another (in this case, VRAM), and the other could be any normal malloc routine. For VRAM, do you need it to handle both 16 and 256 color palettes or just 256? If a single size, then a "Unit Allocator" type algorithm would suit you just fine. For your main RAM, a linked list style algorithm would probably be sufficient. An implementation is done here, but with just a little bit of leg work, you can find MANY, MANY implementations on the internet. I haven't looked at the Saturn myself in 16 years, so this was a fun thing to read and edit for you :)

Categories : C

Portable Class Library Testing
It's usually best to test on all platforms. Right now I'm not aware of any test framework/runner that supports this. I'm hoping to help xUnit do so. I've done a very simple implementation of a test framework for my PCL Storage library. So you could use that to get you started running tests on all the platforms.

Categories : Dotnet

How to manage files on an MTP Portable Device?
Very nice tutorial for C# is on this link wpd-transferring-content Some inspiration can also be found in this project PodcastUtilities

Categories : C#

Can't use fixup_bundle() to create a portable bundle with Qt
I added this line at the top of my CMakeLists.txt set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}) And that was it. By default, apparently, CMAKE_INSTALL_PREFIX is set to /usr/local on my machine. If changing it to my current working directory solved the issue, that means CMake was trying to perform some operations on /usr/local (which it is not allowed to do). So why the error message does not mention such a right access error? I don't know if I haven't read enough documentation, or if the documentation needs some precisions...

Categories : C++

Getting PyScripter Portable to work with IPython
I don't think that this is possible as PyScripter does this based on a specified Python engine. For portable installation these settings are used and this is also what Portable Python shortcut PyScripter-Portable.exe does to set up the environment and configure Python engine to be used.

Categories : Python

Portable newline transformation in Java
Use the line.separator system property String separator = System.getProperty("line.separator") + "#"; // concatenate the character you want String myPortableString = "#aaa" + separator + "ccc"; These properties are described in more detail here. If you open the source code for PrintWriter, you'll notice the following constructor: public PrintWriter(Writer out, boolean autoFlush) { super(out); this.out = out; this.autoFlush = autoFlush; lineSeparator = java.security.AccessController.doPrivileged( new sun.security.action.GetPropertyAction("line.separator")); } It's getting (and using) the system specific separator to write to an OutputStream. You can always set it at the property level System.out.println("ahaha: " + System.getProperty("line

Categories : Java

sublime text 2 portable update not sure how?
Assume that your old version is installed in Sublime.old, and the new version in Sublime.new. Make sure Sublime Text 2 is closed, then move the Sublime.newData folder to someplace else (like your Desktop, for now), just in case anything breaks. Then, copy (don't move) the Sublime.oldData folder to Sublime.new. Fire up the program and check to see that everything is there, and works properly. Please note that this method will not work when upgrading from ST2 to ST3, as there are major differences in the way plugins are run.

Categories : Windows

how to install libraries in portable Python 3.2.1.1
All efforts to make this work with PortablePython 3.2.5.1 failed. But this is the Portable Python 2.7.5.1 version of it. I did it on Windows 7! Screenshot I downloaded PyPDF2 from https://github.com/mstamy2/PyPDF2 and extracted the folder. I found the folder PyPDF2-master and went into it to reveal PyPDF2. I copied the folder PyPDF2 into the path "Python 2.7.5.1AppLib" I went back to Portable "Python 2.7.5.1App" and started python.exe I've also attached a screenshot. I hope this will also work for you.

Categories : Python

How to redirect from url: https://myfavourite.test.com/Account/LogOn?ReturnUrl=/ to url: https://myfavourite.test.com/ using IIS7.5
I followed the steps mentioned in the below mentioned article and it helped me. http://www.trainsignal.com/blog/iis7-url-rewrite-extension-on-windows-server-2008 I used the Redirect option and then added a Blank rule with the following regular expression: account$|account/(?!LogOff) and that helped me to resolve the redirection issue.

Categories : Asp Net Mvc

Fail to get nuget package zlib.portable
It looks by the output you mentioned that you actually have a different problem: Access to the path 'C:UsersSwejopedocumentsvisual studio 2012ProjectsJoBeGAPPSAdmpackagesMicrosoft.Bcl.Build.1.0.7 oolsMicrosoft.Bcl.Build.Tasks.dll' is denied. Check this one first, solve it (maybe run VS as admin?), and then try again.

Categories : C#



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