on-internet

What is the final version of the ADT Bundle?

What is the final version of the ADT Bundle that was released by Google? Since "Android Studio" was announced as official IDE for the development of Android apps, the ADT Bundle (Eclipse with ADT Plugin & Android SDK) cannot be downloaded from developer.android.com any longer. I also could not find a version history for the ADT Bundle. I need the final version number in the form "YYYYMMDD", so I can determine the URL for downloading according to the following pattern (see also this answer): http://dl.google.com/android/adt/adt-bundle-windows-x86_64-<YYYYMMDD>.zip For example, the following dow

Join the discussion →

Hibernate SQL Error: 17002, SQLState: null Io exception: Connection reset

We're using hibernate 3 and c3p0-0.9.1. We have a Hibernate criteria based query to check the keyed in username and password from database tables as well as other queries. During execution of first query i.e the login page, we're facing the connecion reset issue with SQLState as null. If we provide the details again in the page, everything is working fine for some time. If we try after some time, again the same problem from the first time happens and when we re-enter the user name and password, it is working fine for some time. Please find the below error messages for reference. 00:12:42 WARN

Join the discussion →

Unable to locate package google-chrome-stable ubuntu12 on openstack

I'm running a script on my ubuntu on openstack (env bash) which is trying to install the latest stable chrome browser: sudo apt-get update sudo apt-get -y install openjdk-7-jre google-chrome-stable But I'm getting --> Unable to locate package google-chrome-stable ubuntu I tried the following additions but they didn't help: # trying universe repo sudo apt-get -y install libgconf2-4 libnss3-1d libxss1 sudo apt-get update # trying something for openstack sudo apt-get install ubuntu-cloud-keyring sudo apt-get update Will be happy to hear more suggestions.

Join the discussion →

Jboss errors while starting

I am working on Spring mvc app using Jboss 7.1.1. When I start my server, following error appears: 13:23:34,569 ERROR [org.jboss.as] (MSC service thread 1-3) JBAS015875: JBoss AS 7.1.1.Final "Brontes" started (with errors) in 8667ms - Started 377 of 456 s ervices (2 services failed or missing dependencies, 76 services are passive or on-demand) Following is the complete console while starting jboss: Calling "F:\jboss-as-7.1.1.Final\bin\standalone.conf.bat" =============================================================================== JBoss Bootstrap Environment JBOSS_HOME: F:\jboss-as-7.1.1.Fi

Join the discussion →

Detect style sheet load

What are good ways to detect whether a style sheet has loaded using vanilla JavaScript? I understand they do not have the same load event that images and scripts fire. Loading as packed into a .js file (like with WebPack 'loaders') is not an option. 2022 update: All major browsers have now supported onload= on <link rel=stylesheet> tags for years, so that would be the obvious way to detect when CSS has loaded. Note also that external stylesheets in the head are blocking during page load, but can be added later with JS to make them asynchronous. It’s that scenario in which my question is releva

Join the discussion →

POST request to Spring server returns 403 forbidden

I have set up my spring server to respond to a POST request containing a Message object as: @RequestMapping(value = "/signup", method = RequestMethod.POST, consumes = "application/json") public @ResponseBody Message signUp(@RequestBody Message message) { logger.info("Accessing protected resource"); return new Message(100, "Congratulations!", "You have signed up. msg:"+message.toString()); } The Android client is set up to send the request as: @Override protected Message doInBackground(Void... params) { // TODO Auto-generated method stub final String url = "http://10.0.2.2:8080/signup"; HttpHea

Join the discussion →

hibernate.cfg.xml not found (eclipse)

I started using Hibernate today and tested a simple example but I'm getting the error: hibernate.cfg.xml not found. I putted the hibernate.cfg.xml file in the src folder and here is its content: <?xml version='1.0' encoding='utf-8'?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd" > <hibernate-configuration> <session-factory> <!-- Database connection settings --> <property name="connection.driver_class">com.mysql.jdbc.Driver</property> <property name="connection.url">jdbc:mysql://loca

Join the discussion →

DOS assembly: combination of MOV AH, 09h and INT 21h doesn't print anything

I'm writing a DOS commandline arguments parser on TASM assembly language. Here's my code: .model tiny .386 .code org 100h start: mov ax, ax mov bp, 80h mov si, 81h mov ch, 0 mov cl, ds:[bp] push 0 cmp cx, 0 je FINISH CYCLE_BEGIN: lodsb cmp al, 2Fh je SLASH cmp al, 31h je ONE cmp al, 32h je TWO cmp al, 33h je THREE cmp al, 68h je HELP cmp al, 20h je SPACE mov bx, 6 jmp CHANGE_STATE SLASH: mov bx, 0 jmp CHANGE_STATE ONE: mov bx, 1 jmp CHANGE_STATE TWO: mov bx, 2 jmp CHANGE_STATE THREE: mov bx, 3 jmp CHANGE_STATE HELP: mov bx, 4 jmp CHANGE_STATE SPACE: mov bx, 5 CHANGE_STATE: mov ax, 7 mul dx add

Join the discussion →

Oriented Bounding Box is Misshapen and the Wrong Size in OpenGL

I'm writing a program in OpenGL to load a mesh and draw an oriented bounding box around said mesh. The mesh loads correctly, but when I draw the bounding box the box is the wrong shape and far too small. The process I used to calculate this box was to use principal component analysis to find a covariance matrix. I then got the eigenvectors of that matrix and used those as a local coordinate system to find the eight vertices of the cube. Then I calculated a transformation to move the cube from the local coordinate system to the global coordinate system. The code for calculating the covariance i

Join the discussion →

how to find a prime number function in python

I started getting back to python coding and realized I couldn't quite figure this out. I'm trying to code a prime number function. Could someone help with this? Here is my code: def is_prime(x): a = True for n in range(2, x-1): while n < x: n+=1 if x % n == 0: a = False elif n < 2: a = False else: a = True break break return a If anyone has an idea on what I'm doing wrong, please let me know. A month ago I tried this and couldn't get the logic down. I think I was stumped and didn't ever ask for help... Also, how long do you think I should try to do this for before I ask for help on average?

Join the discussion →

How to resolve internal error - server connection terminated while posting content to URL

I am trying to POST content to URL using CURL. My code snippet is as follows curl_easy_setopt(curl_handle, CURLOPT_PROXY, "proxy.xyz.com:8080"); curl_easy_setopt(curl_handle, CURLOPT_PROXYUSERPWD, "uname:password"); curl_easy_setopt(curl_handle,CURLOPT_POSTFIELDS, jsonResult.c_str()); curl_easy_setopt(curl_handle, CURLOPT_CUSTOMREQUEST, "POST"); curl_easy_setopt(curl_handle, CURLOPT_URL, "url"); curl_easy_setopt(curl_handle, CURLOPT_VERBOSE, 1L); /* provide a buffer to store errors in */ curl_easy_setopt(curl_handle, CURLOPT_ERRORBUFFER, error); res = curl_easy_perform(curl_handle); if(res !=

Join the discussion →

Driving from El Calafate to Torres del Paine National Park and back?

I will be traveling to Patagonia in January with few friends and wanted to know if I could drive to Torres del Paine. Specifically, we were thinking of: Renting a car in El Calafate Driving to Torres del Paine Parking in Torres del Paine while we hike the 'W' trail Driving back to El Calafate. Any advice would be appreciated. Though I guess, I am most concerned about whether it is possible (or safe) to park somewhere in Torres del Paine, and whether we will run into trouble crossing the Argentina-Chile border.

Join the discussion →

If you can decode JWT, how are they secure?

If I get a JWT and I can decode the payload, how is that secure? Couldn't I just grab the token out of the header, decode and change the user information in the payload, and send it back with the same correct encoded secret? I know they must be secure, but I just would really like to understand the technologies. What am I missing?

Join the discussion →

How to find out the exact threshold value for the correct recognition of person

I am novice here in MATLAB. My task is to write code for a multimodal biometric system using discrete wavelet transform and PCA (principal component analysis) for 100 people database containing 9 faces, 2 ears and 2 thumbprint images. For the same, I wrote the following code for each sample E11 = imread('E1(1).JPG'); E11 = imresize(E11, [100 100]); E11 = rgb2gray(E11); %colormap(pink) [a, b, c, d] = dwt2(E11, 'haar'); X = a; E11 = X(:); E11 = im2double(E11); for reading all those images After that, i applied PCA on all these images, and after it i used the minimum distance classifier mindist =

Join the discussion →

Emulate yield return for IObservable

When I don't know how to do generate some enumerable using LINQ, I just create my own extension method and use the yield keyword. This gives me a closure where I can store things such as a counter or some other aggregate values. In an IObservable I don't know if there is a built-in way to do this. I recently wanted to generate an observable which, given another IObservable<string>, ignores everything until a starting value (say "start") appears in the source, and then starts ignoring everything until the source yields an ending value (say "end"). So if, for instance my source was {"1", "start"

Join the discussion →

How was 2²³⁺¹ + 1 determined as the value of the smallest integer not representable in single precision floating point?

So I know that the smallest positive integer not representable by a single precision floating point is 223+1 + 1 = 16,777,217. How did we figure out that we use 223+1 + 1. I understand that there is an implied 1, along with 23 being the number of bits represented in the mantissa but why does this work?

Join the discussion →

ARM sleep mode entry and exit differences between assembly instructions WFE and WFI

I am reasonably new to the ARM architectures, and I am trying to wrap my head around the wake up mechanism. So first of all I am finding it difficult to find good information on this. ARM's documentation seems to be very terse on the topic. I'd like to understand when the Cortex (particularly the M0 as that's what I am working with) will wake up. For reference, I have also consulted the following: What is the purpose of WFI and WFE instructions and the event signals? Why does the processor enter standby when using WFE instruction but not when using WFI instruction? The documentation on the WFE

Join the discussion →

Hibernate @Where annotation on a ManyToOne relation

I have recently started to refactor my project because I had to add an extra column to some of my table. The extra column is an Enum (Pending, or Active). Because of that change I would need now to refactor ALL my queries to only retrieves a row if the status is ACTIVE. After some research I found that we can annotate an Entity with the @Where annotation. it works fine where I use it on a simple column but my table look like this: @Where(clause = 'state='ACTIVE'") @Entity public class Place { @Column(name="id_place") private String placeId; @Column(name="name") private String palceName; @OneTo

Join the discussion →

Google places api not returning postal code for some places

I have a form which would collect location information from the user. I'm using Google places api to autocomplete the location information. It works great. Everything got filled out nicely however there are some places (e.g. my workplace which is a building), Google does not return a postal code for it. I followed this example from Google address autocomplete. It also doesn't return postal code for my workplace. So I'm not entire sure what I did wrong. Below is my code: HTML <div id="location-autocomplete" style="display: none;"> <div class="half-formfield"> @Html.LabelFor(x => x.Address) @Htm

Join the discussion →

const vector implies const elements?

Does const vector<A> mean that its elements are constas well? In the code below, v[0].set (1234); in void g ( const vector<A> & v ) produces the compiler error const.cpp:28:3: error: member function 'set' not viable: 'this' argument has type 'const value_type' (aka 'const A'), but function is not marked const Why? But (*v[0]).set(1234); in void h ( const vector<A *> & v ) is OK for the compiler. What's the difference between the versions? // ........................................................... class A { private: int a; public: A (int a_) : a (a_) { } int get () const { return a; } void

Join the discussion →

Writing custom Shiro realm

I am constructing my own AuthorizingRealm subclass, and am having a tough time wiring it up to my SecurityManager. The essence of my realm: public class MyRealm extends AuthorizingRealm { protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken token) throws AuthenticationException { try { // My custom logic here } catch(Throwable t) { System.out.println(t.getMessage()); } SimpleAuthenticationInfo authn = new SimpleAuthenticationInfo(new MyUser(), "somePassword"); return authn; } protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) { try { // My cu

Join the discussion →

How to hash a password field [duplicate]

bought a php software that allows users to build websites. But the guy I paid didn't build a signup form. I'm dangerous enough to do basic coding. But I feel this is past my skill level. The form I created inserts into the mysql database just fine, but it wold let the new users that use this form login because the password field isn't hashing. HMTL signup form: <form action="input.php" method="post" class="pcss3f pcss3f-type-hor"> <header>Fillout the below to join.</header> <section class="state-normal"> <label for="">First Name</label> <input type="text" name="first_name"/> <i class="icon-use

Join the discussion →

Oracle BI Publisher multiple select parameters

I have a requirement to have multiple select parameters on a BI Publisher report. I am passing the parameters to a function that turns a comma separated list of values to a table. I then use the tables from the csv parser function in "IN" statements in the where clause. It looks likes below... select * from table(my_report_function(my_csv_parser_function(:Parameter)) This works fine when I run it in SQL Developer. The problem is that seems when BI Publisher passes the parameter it interprets each comma as a separate parameter so I get an invalid number of parameters error. How can I stop it fr

Join the discussion →

Difference between "high-level" class diagram and "normal" diagram

I am a student and we have a Object-Oriented Project that we have to do to pass Object-Oriented course. My problem is to design the project. Teacher wants two different class diagram.Teacher said "One is high level, other one is normal class diagram." I know that high-level class diagram have detailed information such as attributes and methods. Additionally, I think high-level diagram covers normal diagram. What is normal class diagram? What is the difference between high-level and normal class diagram? I think that if we draw a high-level diagram normal diagram is redundant. Why Did teacher w

Join the discussion →

python pip installation error 'cannot fetch base index URL'

fairly new user but have basic understanding of command line/python. when attempting to install pip through windows 8 powershell get the following error message: Cannot fetch index base URL https://pypi.python.org/simple/ Could not find any downloads that satisfy the requirement pip Cleaning up... No distributions at all found for pip Storing debug log for failure in C:\Users\xxxx\pip\pip.log other instances of similar question seem to suggest something to do with proxy and then some more detailed linux instructions. i am unfamiliar with 'proxy' though if it's relevant i have a VPN extension i

Join the discussion →

Cannot read setMap property of undefined while using Google maps Javascript API

I call the initialize function on page load. Which correctly setsup all the markers. Then I have a searchbox along with a submit button which clears all the markers and then fetches a new JSON object which consist of new markers to be created. As soon as I enter a search query and call the getWorldTweets function I get this error: Cannot read setMap property of undefined which points to the addMarker and deleteMarker functions. var map; var marker; var allmarkers = []; var iterator = 0; var riterator = 0; var geocoder = new google.maps.Geocoder(); var search = { q: "" }; function initialize()

Join the discussion →

JavaFX search textfield

In the JavaFX Scene Builder there is a text field to search in the library: Is this a default control (if so I can't find it) or did they simply style a text field? I tried looking in the source code of the Scene Builder as well, but could not find it.

Join the discussion →

How to call spring controller via Angularjs Controller

Hi i am new to spring restful service using angular.js, i need to display data returning from spring controller via angular js. Here i hava attached the code Controller file:- @Controller public class Control { @RequestMapping(value="/getContent",method = RequestMethod.GET,produces = {"application/json"}) public @ResponseBody String show(){ String msg = "welcome to spring angular js"; return msg; }} servlet file: <context:component-scan base-package="spring" /> <mvc:annotation-driven content-negotiation-manager="contentManager"/> <bean id="contentManager" class="org.springframework.web.accept.

Join the discussion →
Older stories