w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
How to install openssl.so and libssl.so in an android project?
What you need to do is use the PREBUILT_SHARED_LIBRARY directive. In your Android.mk, add the following sections: # Prebuilt libssl include $(CLEAR_VARS) LOCAL_MODULE := ssl LOCAL_SRC_FILES := precompiled/libssl.so include $(PREBUILT_SHARED_LIBRARY) # Prebuilt libcrypto include $(CLEAR_VARS) LOCAL_MODULE := crypto LOCAL_SRC_FILES := precompiled/libcrypto.so include $(PREBUILT_SHARED_LIBRARY) As part the LOCAL_MODULE := security section, add the following: LOCAL_MODULE := security ... LOCAL_SHARED_LIBRARIES= ssl crypto This LOCAL_SHARED_LIBRARIES line will replace the following lines: LOCAL_LDLIBS += $(LOCAL_PATH)/precompiled/libssl.so LOCAL_LDLIBS += $(LOCAL_PATH)/precompiled/libcrypto.so Please take a look at the question Calling inner Android.mk file to build prebuilt librarie

Categories : Android

Amazon S3 - hostname does not match the server certificate (OpenSSL::SSL::SSLError) + rails
Problem is with naming of bucket, in this case : myproject.de, which is format that Amazon S3 services do not consider as valid.(no dot in the name). I have changed the name of bucket from myproject.de into myprojectde and it works now. Rules for Bucket Naming In all regions except for the US Standard region a bucket name must comply with the following rules. These result in a DNS compliant bucket name. Bucket names must be at least 3 and no more than 63 characters long Bucket name must be a series of one or more labels separated by a period (.), where each label: Must start with a lowercase letter or a number Must end with a lowercase letter or a number Can contain lowercase letters, numbers and dashes Bucket names must not be formatted as an IP

Categories : Ruby On Rails

Configure errror -- Library 'crypto' is required for OpenSSL
For cryptography, PostgreSQL use Zlib, so, you need to install Zlib headers in your Mac, to be able to compile it with crypto support. You can see an example but is for Ubuntu. You need to figure out how to install zlib in Mac: To read more about the pgcrypto module, visit this link.

Categories : Osx

64 bit Linux/Ubuntu and openssl issue (could not read symbols: Bad value)
Okay, sorry for not search properly in SO itself. One of the related topics had an answer to this problem. relocation R_X86_64_32 against a local symbol' error All I had to do was do a fresh install of openssl this time with enable-shared option during configure ./config enable-shared Then I had to do a fresh install of cURL ./configure --with-ssl=/usr/local/ssl --with-zlib Then I had to do a fresh install of PHP ./configure .... --with-openssl --with-curl .... ..and that did it. The PHP cURL extension has SSL support.

Categories : PHP

Authorization header is invalid -- one and only one ' ' (space) required - Amazon S3
Check where your setting the aws_access_key_id to use with your asset syncer. This should be something that looks like AKIAINSIQYCZLWYSROWQ, whereas it looks like you've set it to a 2 element array of both your access key id and the secret access key. Furthermore, given that you've now placed those credentials in the public domain you should revoke them immediately.

Categories : Ruby On Rails

Asset Precompile on Amazon Linux
Seems like you do not have imagemagick installed. Depending on your distro, it should be either sudo yum install ImageMagick ImageMagick-devel or sudo apt-get install imagemagick. You can test it whether it installed successfully by issuing the commands convert or identify. However, the documentation recommends that your precompile on your own local machine, not on the remote server. Meaning, you issue bundle exec rake assets:precompile on your own machine first. That would avoid having to precompile on the remote server.

Categories : Ruby On Rails

Which directories should in put in new volume in Linux server Amazon EC2
The idea of being stateless is that the instance stores no persistent data (database, user files, etc). That way you could duplicate the instance, put it behind a load balancer and scale horizontally to more traffic without duplicating persistent data. Using multiple volumes on a stateless machine is optional. It can help if you need to increase io throughput, but outside of that it doesn't provide many advantages. It can make it more difficult if you are trying to build stateless instances since an AMI will only include the root volume.

Categories : Linux

Compile Openssl with MinGW on Windows - fatal error: openssl/md4.h: No such file or directory
Find the directory where the included file, openssl/md4.h, is installed and include that directory in the command. For example, if the full path of openssl/md4.h is c:opensslincludeopensslmd4.h, your command would become: g++ -Ic:opensslinclude tst.cpp -lcrypto

Categories : C

Hosting Java Webservice on Amazon Linux AMI 2013.03
The likeliest problem is that the security group for this EC2 machine does not allow access on port 8080. Have a look here for more details: Create and Configure Your Amazon EC2 Security Group Once you modify the security group, the change is applied immediately so you do not need to start a new EC2 machine.

Categories : Java

Celery not automatically starting on Amazon Linux AMI 2013.03.1
You need to write a simple startup script: Create a file called celeryd.sh vim /etc/init.d/celeryd.sh Inside that file: #!/bin/sh ##Starts the celery on boot up### /etc/init.d/celeryd start Change permission: chmod +x celeryd.sh Done. You can do init 6 and test, if it works or not. More on : http://www.cyberciti.biz/tips/linux-how-to-run-a-command-when-boots-up.html

Categories : Apache

Amazon S3 HTTPS not loading with Chrome and wget on Linux
works here in Ubutnu Linux with Chromium and with wget. It only works in wget if you put " " around the URL, which contains special characters. Otherwise I do get 403 forbidden. I receive a jpeg file, 5.1k. It looks like the same drawing I get on chromium. The URL produces a picture of some kind of rough drawing with black lines. wget version is 1.13.4 chromium about: Chromium 25.0.1364.160 (Developer Build 25.0.1364.160-0ubuntu0.12.10.1) Ubuntu 12.10 OS Linux WebKit 537.22 (trunk@137939) JavaScript V8 3.15.11.16 Flash 11.2 r202 User Agent Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Ubuntu Chromium/25.0.1364.160 Chrome/25.0.1364.160 Safari/537.22 Command Line /usr/lib/chromium-browser/chromium-browser --flag-switches-begin --sync-keystore-e

Categories : Linux

Installing libssl-dev on ubuntu for ruby 2.0
Your /var/lib/dpkg/available file got corrupted. You can fix it with the following: Backup your existing /var/lib/dpkg/available via: sudo cp /var/lib/dpkg/available /var/lib/dpkg/available.backup Then run the following, this will clear the file: sudo dpkg --clear-avail You should be able to install packages again as usual: sudo apt-get update && sudo install libssl-dev Source: Ubuntu dpkg manpage If none of the above helps, try asking on AskUbuntu

Categories : Ruby

Update openssl version in the guardianproject/openssl-android
First I don't have any idea of the meaning of the message Reversed (or previously applied) patch detected! Assume -R? and what to answer except y or n. Yeah, that's one of those patch-isms that rates high on the usability scale. When its asking you if you want to reverse it, its asking if you want to remove a previously applied patch from a source file. In my opinion, it should (1) add it if not present, or (2) move on if present. There is no (3) torture the user. If I supply a switch (perhaps -prompt) or run unpatch, then I should be asked 20 questions. Otherwise, just apply the damn patch. Reversed (or previously applied) patch detected! Assume -R? [n] y I believe you should have answered NO here by typing n. It was asking you to remove a previously applied patch.

Categories : Android

cURL with SSL dependency error libssl.so libcrypto.so needed in Ubuntu 32bit
I found out the problem, it was so silly of me to overlook cURL's website documentation. All I had to do was pass in the environment variable for the run time linker to use the shared libraries before configure. env LDFLAGS=-R/usr/local/ssl/lib ./configure --with-ssl --with-zlib ..and it worked without any issues. I now have https support in even Ubuntu 32bit. Here's the documentation link http://curl.haxx.se/docs/install.html

Categories : PHP

OpenSSL + Self Signed Cert = OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
Extracted from here So basically all you have to do is this ENV['SSL_CERT_FILE'] = "your certificate path" and I guess all will work You might find this Reference useful : http://mislav.uniqpath.com/2013/07/ruby-openssl/ Who reads the value of ENV['SSL_CERT_FILE']? Hope this help

Categories : Ruby On Rails

Which Linux platfrom required for Installation of ingres database version 9.2 and openROAD version 4.0
If you want answers don't use Stackoverflow as its ridiculous policies prevent me supplying the four links that would have been helpful to you. Google for the Actian community, which you will find far more helpful with fewer egos struggling to rule the world.

Categories : Misc

How to install/configure new software in newly created amazon instances using Amazon SDK in java?
The Amazon API primarily controls infrastructure. It does not have any control as to what happens inside the instance. There are a couple of ways you can bootstrap your instance and install software. You can use user-data to pass a script that will run on first launch. You could use a provisioning system like chef or puppet. You could roll your own if it works better for you.

Categories : Amazon

Amazon Flexible Payments Service (Amazon FPS) IPN Verification PHP IPNVerificationSampleCode.php
Put correct define('AWS_ACCESS_KEY_ID', 'XXXXXXXXXXXXXXXXXX'); define('AWS_SECRET_ACCESS_KEY', 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX); it will word correct also change Introduction: Amazon FPS sends you outbound notifications in the form of GET and POST on your ReturnURL and IPN endpoints respectively. When you handle these notifications, we recommend you to validate the signature to ensure that the notification actually originated from us. You can validate the signature using signature version 2 with a server-side call to the VerifySignature API. In this call, you send the entire URL including the HTTP parameters received to FPS VerifySignature API and it will return a Boolean that indicates whether the signature was validated. Samples using this API to validate the signature are in

Categories : Amazon

Host static web site in Amazon S3 without using Amazon route 53
You can, but it wont work very well. You would need to create a CNAME record to map to the endpoint, which you can't use for apex records. You would need some other way of forwarding traffic from the apex to presumably www.domain.com. S3, Cloudfront either a set of IPs or Geo-DNS to determine which IP address will serve a given request. This is not something you can efficiently replicate in your own DNS. The cost of Route53 is pretty low, depending on traffic, it could hit be a $1 or less per month.

Categories : Amazon

Creating amazon ec2 windows AMIs using amazon sdk in java
I don't completely understand what you are trying to achieve. Do you want to start an instance in EC2 or with OpsWorks because your second link points to the OpsWorks documentation. OpsWorks dosen't support Windows right now.

Categories : Amazon

is it possible to generate Amazon SES credentials from existing amazon ec2 account?
What do you mean by generate credentials?? AWS comes with a feature called IAM, identity and access management, just have a look, I hope you are looking for the similar service,one can access the ses account using ses api or smtp settings.

Categories : Amazon

Configuring Amazon SES Feedback Notifications via Amazon SNS in ASP.NET MVC (C#)
You are on the right track - for the missing part 4 you need to implement receiving of a message from the Amazon SQS message queue you created in step 1. See my answer to Example of .net application using Amazon SQS for where to find a respective example - it boils down to the following code: // receive a message ReceiveMessageRequest receiveMessageRequest = new ReceiveMessageRequest(); receiveMessageRequest.QueueUrl = myQueueUrl; ReceiveMessageResponse receiveMessageResponse = sqs. ReceiveMessage(receiveMessageRequest); if (receiveMessageResponse.IsSetReceiveMessageResult()) { Console.WriteLine("Printing received message. "); ReceiveMessageResult receiveMessageResult = receiveMessageResponse. ReceiveMessageResult; foreach (Message message in receiveMessageResult.Me

Categories : C#

Amazon MWS - How can we update the inventory on Amazon instantly?
The answer is astonishingly simple: If you're running out of stock, don't wait for the next update cycle (the wall clock hitting *:05 again), but send an inventory update right away. Since you're posting the inventory, it is your choice when to do it. Just a side note: You probably will need to limit those updates in some way so that you don't send inventory updates more often than about every 5 minutes, otherwise they'll queue up (in my testing at least). Queued inventory updates won't do you any good.

Categories : Amazon

MVC data model Drop down list validation says id is required, how do I change to say name is required?
Add: [DisplayName("Name")] to the declaration of TypeID in your view model or change your label to: @Html.LabelFor(model => model.TypeID, "Name")

Categories : Asp Net Mvc

Is it possible to check required input with the HTML required attribute without actually submitting the form?
The OnClick event handler needs to run script code that checks the individual form fields for data, and then returns true only if the data is acceptable, otherwise returns false to abort the submission. Update: rather than using an OnClick event handler on the submit button, you should instead use an OnSubmit event handler on the form itself. That way, having the validation script return true/false has more meaning.

Categories : HTML

HTML input required attribute or ASP.NET MVC Data Annotations required decorator
Old browsers do not support HTML input require attribute. http://caniuse.com/#search=required http://www.w3schools.com/tags/att_input_required.asp

Categories : HTML

Why class required default constructor but structure dont required?
Because the default constructor of a class (reference type) is only exposed if an explicit one is not implemented (that is, it doesn't exist). A struct (value type) doesn't even need to be new'd, so to speak. You can use a variable that represents a struct without it - i.e. it won't be null, anyway (that is, it needn't exist at all).

Categories : C#

Using functions inside scripts required by NodeJS's required()
If it is not a part of module.exports then you can't. For example: web-notification.js function getURL(host, path) { ... } module.exports = exports = { getURL: getURL }; main-js.js var webnotis = require('./modules/web-notification.js'); webnotis.getURL(...);

Categories : Javascript

How to extract price from Amazon Url without Amazon API
I had same problem and this is my fix: I run script again if image is not parsed. image is parsed first in my php script so I check if it works and amazon gives information. I hope it helps. if($html->find('#main-image')) { foreach($html->find('#main-image') as $e) { echo '<span href="'. $e->src . '" class="imgblock parseimg"> <img src="'. $e->src . '" class="resultimg" alt="'.$name.'" title="'.$name.'"> </span> <input type="hidden" name="my-item-img" value="'. $e->src . '" />'; } } else { gethtml($url,$domain); die; }

Categories : PHP

Is HTTP status code 426 Upgrade Required only meant signal an upgrade to a secure channel is required?
Quoting one of my previous answers: HTTP Upgrade is used to indicate a preference or requirement to switch to a different version of HTTP or to another protocol, if possible: The Upgrade general-header allows the client to specify what additional communication protocols it supports and would like to use if the server finds it appropriate to switch protocols. The server MUST use the Upgrade header field within a 101 (Switching Protocols) response to indicate which protocol(s) are being switched. Upgrade = "Upgrade" ":" 1#product For example, Upgrade: HTTP/2.0, SHTTP/1.3, IRC/6.9, RTA/x11 The Upgrade header field is intended to provide a simple mechanism for transition from HTTP/1.1 to some other, incompatible protocol. According to the IANA regist

Categories : Http

for loop required and dynamic css required through PHP
You can get rid of the ifs by using an array: $styles = array('12,23' => 'r16', '34,45' => 'r17', ... '1516,1617' => 'r29' ); if (isset($styles["$string,$string1"])) { $style = $styles["$string,$string1"]; } You could also use this array to generate the CSS. Make the values associative arrays containing the class name and CSS, e.g. $styles = array('12,23' => array('class' => 'r16', 'css' => 'text-align: left;padding-left: 100px; border: solid 1px #CCCCCC; margin: 10px 490px 0px 285px;'), ...

Categories : PHP

paperclip with amazon s3 working in development but not working in production (amazon ec2)?
Had same issue with image_magic that was breaking our paperclip functionality in production, but not in development (weird, I know). Yet even after removing imagemagick from our gemfile and Gemfile.lock locally (running bundle install and all that stuff) and then deploying back to production on heroku, the error persisted in production! (weird, I know). What ended up doing the trick was running: $ heroku repo:purge_cache -a myAppName (Taken from: https://github.com/heroku/heroku-repo#purge_cache) When you deploy your app, Heroku caches some things like your assets and installed gems in order to speed up deployment. Although this is a great feature, it can have side-effects sometimes, and in this case, it seems that something about the imagemagick gem got "stuck" in production's cache,

Categories : Ruby On Rails

C# Amazon SQS to Java Amazon SQS
It should be equivalent to: Amazon.SQS.Model.Attribute sentTimestampx = null; for (Amazon.SQS.Model.Attribute a : x.getAttributes()) { if (a.Name == "SentTimestamp") { if (sentTimestampx == null) { sentTimestampx = a; } else { throw new Exception("Boooooh! there is more than one matching elements!"); } } } I think that a good approximation is to remove the check for more than one matching element and break the loop when you've found one, unless the original intent was really to throw an exception.

Categories : C#

C++ AES OpenSSL
AES is a block cypher. It takes blocks of 16 bytes, and encrypt them into a block of 16 byets. If you try to use it with data whose length is not a multiple of 16, padding (usually random data) is added to round it up to a multiple of 16 bytes. You need to manage the length of the data yourself. Example: int encryptHelper(const string& msg, ...) { uint32_t msgSize = msg.length(); newMsg.push_back((msgSize >> 0) & 0xFF); newMsg.push_back((msgSize >> 8) & 0xFF); newMsg.push_back((msgSize >> 16) & 0xFF); newMsg.push_back((msgSize >> 24) & 0xFF); string newMsg(reinterpret_cast<const char*>(&msgSize), sizeof(msgSize)); newMsg += msg; return __aesEncrypt(newMsg.c_str(), newMsg.length(), ...); } int decrypt

Categories : C++

Linux users', specifically Apache, permissions settings, [Linux noob :]
usually any daemon will need to access a number of ressources. it is therefore good practice to run each daemon under a special user:group, rather than nobody:nogroup. traditionally (e.g. on Debian systems) apache runs as www-data:www-data. finally, user permissions take precedence over group permissions (which in turn take precedence over other permissions). this means that a directory where the user does not have write perms but the user's group can write is effectively r/o for that user (but not for other members of the group)

Categories : Linux

Exec(Linux). How it functions internally? Linux executable attributes(rlimit)
The RLIMIT_CORE is used to place a limit on the amount of info that coredump is allowed to produce, before it is aborted. Once this limit is hit, no more info is logged and the message Aborting Core is logged to the console. From the man page of core : A process can set its soft RLIMIT_CORE resource limit to place an upper limit on the size of the core dump file that will be produced if it receives a "core dump" signal. Use setrlimit() to configure RLIMIT_CORE to a larger value to obtain complete coredumps. The most common format of executables/shared-objects is ELF. On Linux, the dynamic loading and linking of these shared-objects is performed by ld.so ld.so is loaded in the address space of a newly created process (by exec in this case) and executed first. This is possible as

Categories : Android

Purpose of Curly Brace Usage of C Code found in Linux (include/linux/list.h)?
This is a GNU language extension known as a statement expression; it's not standard C.

Categories : C

Write C++ on Windows but use Linux System calls through a Linux emulator
You've already tagged your question with Cygwin. That seems like the best solution for what you want. Cygwin is basically a collection of programs which emulate a GNU/LInux environment through the use of a DLL (cygwin1.dll) which acts as a Linux API layer providing substantial Linux API functionality. Here's the link to the documentation for its API Edit: Most of the Cygwin source code that I've looked at is written in C++ and makes system calls using MS Windows API to do provide the *nix emulation. The source is well written and very readable (even to to a non-C++ programmer such as myself). I think using Cygwin would be a good transition from programming on Windows to a GNU/Linux environment.

Categories : C++

What's a good way to set up Closure Compiler on Linux? Or, where should Java .jar's live on a Linux?
If you using the java command directly, then you'll have to provide a path to the jar in question. It's probably easier to place the jar in one place and create a shell script that handles the invocation and jar path.

Categories : Java

How to turn a Linux application in C/C++ into a Desktop Enviroment for a Linux distro?
You either want to create a boot loader, or you want to replace the 'shell'. This would be governed by per-user or global xinit and Xsession files.

Categories : C



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