Questions Tagged with #Profiles

Adding Git-Bash to the new Windows Terminal

I'm trying to add a new terminal (Git Bash) to the new Windows Terminal, however I can't get it to work. I tried changing the commandline property in the profiles array to git-bash.exe but no luck. ..

Xcode 10: A valid provisioning profile for this executable was not found

Since yesterday I've been getting the following error when trying run an app on my device: A valid provisioning profile for this executable was not found." This is after updating to Xcode 10. B..

Xcode couldn't find any provisioning profiles matching

I am trying to rebuild an ios app, that previously had no issues (first rebuild in 6 months or so). Environment is OSX 10.13.5 with all the latest updates, Xcode 9.4.1, Ionic is 3.20.0. Local cordova,..

Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured

I am working on a Spring Boot Batch example with MongoDB and I have already started the mongod server. When I launch my application, I am getting the error below. Any pointers for this issue? *****..

ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean

I have written a spring batch application using Spring boot. When I am trying to run that application using command line and classpath on my local system it is running fine. However, when I tried to r..

Failed to auto-configure a DataSource: 'spring.datasource.url' is not specified

I have created a basic spring boot application from SPRING INITIALIZR with the Web, MongoDB and JPA dependencies. When I try to run the spring boot application I am getting the following exception: ..

Configure active profile in SpringBoot via Maven

I'm trying to set an active profile in Spring Boot application using Maven 3. In my pom.xml I set default active profile and property to development: <profiles> <..

how to use Spring Boot profiles

i have application.yml,application-dev.ymlandapplication-dev.yml I'm using the maven command mvn spring-boot:run it doesn't work and I can not choose the dev profile usi..

How do I activate a Spring Boot profile when running from IntelliJ?

I have 5 environments: - local (my development machine) - dev - qc - uat - live - staging I want different application properties to be used for each environment, so I have the following prop..

Spring-boot default profile for integration tests

Spring-boot utilizes Spring profiles ( which allow for instance to have separate config for different environm..

Setting the default active profile in Spring-boot

I want my default active profile to be production if is not set. I tried the following in my but it did't work: spring.profiles.default=production S..

How to run bootRun with spring profile via gradle task

I'm trying to set up gradle to launch the bootRun process with various spring profiles enabled. My current bootRun configuration looks like: bootRun { // pass command line options from gradle t..

Certificate has either expired or has been revoked

A while ago I started coding a new ios app, after a long break from it, I'm working on it again and have it almost complete. I test it on the simulator but when I tried to install it on my iphone 6 (..

Disable all Database related auto configuration in Spring Boot

I am using Spring Boot to develop two applications, one serves as the server and other one is a client app. However, both of them are the same app that function differently based on the active profile..

How to get user's high resolution profile picture on Twitter?

I was reading the Twitter documentation at and it clearly states that: Alternative image sizes for user profile images You ..

Xcode 7.2 no matching provisioning profiles found

Before upgrading Xcode to 7.2, I was using Xcode 7.1.1 to build and distribute apps. I have upgraded to Xcode 7.2 and none of my provisioning profiles (matched to that particular app's bundle ID) matc..

cordova run with ios error .. Error code 65 for command: xcodebuild with args:

This error occur only when I try to cordova run ios --device Even after cordova build ios command executed, non error is reported. Whats I do wrong? And how to debug cordova projects on my iPhone (n..

java.lang.IllegalStateException: Error processing condition on org.springframework.boot.autoconfigure.jdbc.JndiDataSourceAutoConfiguration

I am trying to write a standalone executable jar (fat jar) . I am using spring boot gradle plugin and writing a SpringBoot App to do this. Here is my file @Configuration @EnableAut..

Setting active profile and config location from command line in spring boot

I have a spring boot application. I have three profiles in my application-> development, staging and production. So I have 3 files application-development.yml application-staging.yml application-p..

Maven: How do I activate a profile from command line?

This is a snippet from my pom.xml. I tried the following, but the profile was not activated. mvn clean install -Pdev1 mvn clean install -P dev1 When I tried mvn help:active-profiles no profiles wer..

Maven- No plugin found for prefix 'spring-boot' in the current project and in the plugin groups

I am trying to build a springboot project I built with Spring Tools Suite. I get the following error when I execute $mvn spring-boot:run Downloading:

Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved

I have install maven in my machine. I have properly set the class-path and maven home folder. Every time I execute mvn clean install, it gives me exception. I have also tried to delete the .m2 folder ..

Want to make Font Awesome icons clickable

So I am new to web development and I am trying to link font awesome icons to my social profiles but am unsure of how to do that. I tried using an a href tag but it made all of the icons take me to one..

How to remove provisioning profiles from Xcode

Does anyone know how to remove previously installed provisioning profiles from Xcode? I have seen this link, but I am not able to find that location in my system. So I think there must be some other..

The OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)"

I'm trying to run the following statement but am receiving the error messages just below. I have researched answers to no end and none have worked for me. I'm running Office 365 (64bit). I have loa..

Code signing is required for product type Unit Test Bundle in SDK iOS 8.0

Getting Code signing is required for product type 'Unit Test Bundle' in SDK 'iOS 8.0' My app target is code signing just fine - but my test target is not. I bought a new computer, created a ..

Django 1.7 - "No migrations to apply" when run migrate after makemigrations

I use Django1.7 with Mezzanine. I create simple profile (according to Mezzanine documentation) stored in separate app "profiles": class RoadmapProfile(models.Model): user = models.OneToOneField("..

Cannot create Maven Project in eclipse

I have Eclipse Luna and Maven 3.2.3 installed on a Windows 7 machine behind a corporate firewall. Trying to create a project from an archetype results in the following error: Could not resolve a..

Why am I getting a "401 Unauthorized" error in Maven?

Why am I getting a "401 Unauthorized" error in Maven? Here's the error I'm getting when calling mvn deploy (full logs at the bottom): [INFO] BUILD FAILURE [ERROR] Failed to execute goal org.apache.m..

Spring Boot - Cannot determine embedded database driver class for database type NONE

This is the error that is thrown when trying to run my web app: [INFO] WARNING: Nested in org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.b..

How to override during production in Spring-Boot?

I'm using spring boot and to select a database during development by @Configuration @Profile("dev"). spring.config.location=file:d:/application.prope..

How to export iTerm2 Profiles

I needed to reformat my computer and now I'm having trouble copying the settings/profiles over. I copied the files in ~/Library/Application\ Support/iTerm/ I also copied ~/Library/Preferences/com.go..

lambda expression join multiple tables with select and where clause

I have three table many to many relationship I have joined the three table and select the value I want but now I need to select one row from the query result by where by specifying the id this is my ..

How does Subquery in select statement work in oracle

I have looked all over for an explanation, to how does the subquery in a select statement work and still I cannot grasp the concept because of very vague explanations. I would like to know how do you..

Use C# HttpWebRequest to send json to web service

I am new to JSON and need help. I have some JSON working in jquery and get the information back correctly from the web service I have running on the web. However, I can't get it to work using HttpWebR..

Is there a way since (iOS 7's release) to get the UDID without using iTunes on a PC/Mac?

I'm developing an app for my company and we're going through the process of slowly letting people into the "beta" by adding their iPads to the company's iOS Dev Center accounts. From there we do an ad..

Find provisioning profile in Xcode 5

In Xcode 5, I can get list of provisioning profiles under Xcode >> preferences >> accounts >> view details. I want to copy profile and have to send it to one of my client, but I am n..

Xcode5 "No matching provisioning profiles found issue" (but good at xcode4)

Everything is OK on Xcode4.6. When I try to use Xcode5 dp6 to run app on devices. I got an error of "No matching provisioning profiles found issue". How can I resolve this issue? ..

Provisioning Profiles menu item missing from Xcode 5

After spending a whole day installing a fresh copy of Mac OS X v10.8 (Mountain Lion), Xcode 5, fixing provisioning profiles, certificates, creating new ones, I finally managed to get my..

Select multiple records based on list of Id's with linq

I have a list containing Id's of my UserProfile table. How can i select all UserProfiles based on the list of Id's i got in a var using LINQ? var idList = new int[1, 2, 3, 4, 5]; var userProfiles = _..

Using msbuild to execute a File System Publish Profile

I have a c# .Net 4.0 project created with VS2010 and now being accessed with VS2012. I'm trying to publish only the needed files from this website to a destination location (C:\builds\MyProject[Files..

Xcode Product -> Archive disabled

I have been archiving for ad hoc distribution fine for many months and suddenly today I cannot do so as the Archive menu item is disabled. I have not changed anything. I went through the provisioning ..

Format date with Moment.js

I have a string in this format: var testDate = "Fri Apr 12 2013 19:08:55 GMT-0500 (CDT)" I would like to use Moment.js get it in this format mm/dd/yyyy : 04/12/2013 for display. I tried to ..

unable to remove file that really exists - fatal: pathspec ... did not match any files

unable to remove file that really exists - fatal: pathspec ... did not match any files I have a file under git control that simply will not be deleted. The failing command is: $ git rm .idea/worksp..

Setting Spring Profile variable

I have two Spring profiles: dev and test. I want to set the active profile in the server environment, I don't want to set it in my code so that wherever I deploy my application the profile gets loaded..

Horizontal list items

So, I have attempted to create a horizontal list for use on a new website I am designing. I have attempted a number of the suggestions found online already such as setting 'float' to left and such - y..

Could not transfer artifact org.apache.maven.plugins:maven-surefire-plugin:pom:2.7.1 from/to central (

I have created a new maven project in SpringSource Tool Suite. I am getting this error in my new maven project. Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:2.7.1 from ..

Spring Test & Security: How to mock authentication?

I was trying to figure out how to unit test if my the URLs of my controllers are properly secured. Just in case someone changes things around and accidentally removes security settings. My controlle..

SCRIPT438: Object doesn't support property or method IE

I have an option in my application where users can deactivate their profiles. Only admin can activate them again. I have a class ActivateProfile with two methods userExist(userName) that checks if ..

Enabling/Disabling Microsoft Virtual WiFi Miniport

I disabled my Microsoft Virtual WiFi Miniport network adapter from Control Panel\Network and Internet\Network Connections. Just right clicked on the miniport nic and clicked disable, and its gone. N..

Spring profiles and testing

I've got a web application where I have the typical problem that it requires different configuration files for different environments. Some configuration is placed in the application server as JNDI da..

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test

I have scoured the internet for almost five days now looking for a fix to this issue, but I cannot seem to find and fix it on my own, mainly because I am so new to both Maven and PlayN so I'm not enti..

Maven fails to find local artifact

Occasionally maven complains that a particular dependency, which is built and packaged locally, cannot be found in the local repository while building another project that has it as a dependency. We ..

What does the 'u' symbol mean in front of string values?

Yes in short i would like to know why am I seeing a u in front of my keys and values. I am rendering a form. The form has check-box for the particular label and one text field for the ip address. I ..

Accidentally committed .idea directory files into git

I have accidentally committed the .idea/ directory into git. This is causing conflicts everywhere else I need to checkout my repo. I was wondering how do I remove these files from the remote? I still..

NoSQL Use Case Scenarios or WHEN to use NoSQL

With all the hype it seems really hard to find reliable information on when to use this. So I pose the following questions, and I'm sorry if these are really dumb questions in advance: Should I use ..

Getting activity from context in android

This one has me stumped. I need to call an activity method from within a custom layout class. The problem with this is that I don't know how to access the activity from within the layout. ProfileVie..

How do you get current active/default Environment profile programmatically in Spring?

I need to code different logic based on different current Environment profile. How can you get the currently active and default profiles from Spring?..

Get device token for push notification

I am working on push notifications. I wrote the following code for fetching a device token. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOption..

Adding :default => true to boolean in existing Rails column

I've seen a few questions (namely this one) here on SO about adding a default boolean value to an existing column. So I tried the change_column suggestion but I mustn't be doing it right. I tried: $..

Maven plugin not using Eclipse's proxy settings

I am using springsource tool suite 2.7.2, based on Eclipse 3.7. The Maven plugin comes now out of the box with Eclipse which is great, and this problem occurred even with previous version of Eclipse. ..

how to solve Error cannot add duplicate collection entry of type add with unique key attribute 'value' in iis 7

I created a website and published it in iis 7. I deleted the default website option in the iis 7 and created the new website in the iis 7. When i click the default document I got the error lik..

Selenium WebDriver.get(url) does not open the URL

from selenium import webdriver from selenium.common.exceptions import TimeoutException from import WebDriverWait # available since 2.4.0 import time # Create a new inst..

Recommendation for compressing JPG files with ImageMagick

I want to compress a JPG image file with ImageMagick but can't get much difference in size. By default the output size is bigger than the input. I don't know why, but after adding some +profile option..

Get user info via Google API

Is it possible to get information from user's profile via Google API? If it is possible, which API should I use? I'm interesting in such information: Url to the user profile (e.g. https://profiles..

Xcode 4 - "Valid signing identity not found" error on provisioning profiles on a new Macintosh install

I had a Macintosh I used to develop iPhone apps with using Xcode 4. I now have a new Macintosh with a new install of... everything. When opening Xcode projects built on the old Mac, I cannot run the a..

Maven: repository element was not specified in the POM inside distributionManagement?

I am trying to run the command, mvn release:perform, but I get this error: Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy (default-deploy) on project git-demo: Deploy..

How to set order of repositories in Maven settings.xml

I have 3 repositories in my settings.xml because I need artifacts from all of them. Whenever a dependency is not found, Maven tries Downloading: http://some.server/mvn2repo/releases/org/apache/lucene..

How to get last inserted id?

I have this code: string insertSql = "INSERT INTO aspnet_GameProfiles(UserId,GameId) VALUES(@UserId, @GameId)"; using (SqlConnection myConnection = new SqlConnection(myConnectionString)) { m..

MySQL Insert into multiple tables? (Database normalization?)

I tried searching a way to insert information in multiple tables in the same query, but found out it's impossible? So I want to insert it by simply using multiple queries i.e; INSERT INTO users (user..

How to set breakpoints in inline Javascript in Google Chrome?

When I open Developer Tools in Google Chrome, I see all kinds of features like Profiles, Timelines, and Audits, but basic functionality like being able to set breakpoints both in js files and within h..

How to install a certificate in Xcode (preparing for app store submission)

I wan't to select my distribution profile in Code Signing Identity in the build tab of targets. But all my certificates (developer, ad hoc, ...) are grayed out. So it seems that the new profile

JAXB Exception: Class not known to this context

When I call a particular restful service method, which is built using CXF, I get the following error, anyone know why and how to resolve it? JAXBException occurred : class

Django Multiple Choice Field / Checkbox Select Multiple

I have a Django application and want to display multiple choice checkboxes in a user's profile. They will then be able to select multiple items. This is a simplified version of my from p..

Call javascript from MVC controller action

Can I call javascript function from MVC controller action (not from view page) and get return value? How? I need to make request to server from code (.cs) using javascript like here (but this is as..

Add querystring parameters to link_to

I'm having difficultly adding querystring parameters to link_to UrlHelper. I have an Index view, for example, that has UI elements for sorting, filtering, and pagination (via will_paginate). The wil..

How to select true/false based on column value?

I have a table with the following columns: EntityId, EntityName, EntityProfile, ................. I want to select the Id and Name and true/false column based on the value of entity profile, for exam..

How to parse a JSON and turn its values into an Array?

public static void parseProfilesJson(String the_json){ try { JSONObject myjson = new JSONObject(the_json); JSONArray nameArray = myjson.names(); JSONArray v..

Maven dependency for Servlet 3.0 API?

How can I tell Maven 2 to load the Servlet 3.0 API? I tried: <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version&..

{"<user xmlns=''> was not expected.} Deserializing Twitter XML

I'm pulling in the XML from Twitter via OAuth. I'm doing a request to, which returns the following XML: <?xml version="1.0" encoding=&quo..

"Too many values to unpack" Exception

I'm working on a project in Django and I've just started trying to extend the User model in order to make user profiles. Unfortunately, I've run into a problem: Every time I try to get the user's pr..

Do standard windows .ini files allow comments?

Are comments allowed in Windows ini files? (...assuming you're using the GetPrivateProfileString api functions to read them...) [Section] Name=Value ; comment ; full line comment And, is there a..

The executable was signed with invalid entitlements

I am having a problem with ad-hoc distribution on my iPhone. I have developed an application with SDK 3.0. I have a developer's license. I have added certificates and provisioning profiles in my proje..

iPhone app signing: A valid signing identity matching this profile could not be found in your keychain

I'm pulling my hair out over this. I just downloaded the iPhone 3.0 SDK, but now I can't get my provisioning profiles to work. Here is what I have tried: Delete all provisioning profiles Delete logi..

How to preserve aspect ratio when scaling image using one (CSS) dimension in IE6?

Here's the problem. I have an image: <img alt="alttext" src="filename.jpg"/> Note no height or width specified. On certain pages I want to only show a thumbnail. I can't alter the html, so I..

How can I implement the Iterable interface?

Given the following code, how can I iterate over an object of type ProfileCollection? public class ProfileCollection implements Iterable { private ArrayList<Profile> m_Profiles; pu..

How to store file name in database, with other info while uploading image to server using PHP?

Hi I have read many forums and websites that tell you how to upload an image to a server and I have managed to get this working, I can upload a file to a my server but storing the file name does work ..

conversion of a varchar data type to a datetime data type resulted in an out-of-range value

I have the following piece of inline SQL that I run from a C# windows service: UPDATE table_name SET status_cd = '2', sdate = CAST('03/28/2011 18:03:40' AS DATETIME), bat_id = '33acff9..

Python module for converting PDF to text

Is there any python module to convert PDF files into text? I tried one piece of code found in Activestate which uses pypdf but the text generated had no space between and was of no use. ..

Java best way for string find and replace?

I'm looking for the best approach for string find and replace in Java. This is a sentence: "My name is Milan, people know me as Milan Vasic". I want to replace the string Milan with Milan Vasic, bu..

opening a window form from another form programmatically

I am making a Windows Forms application. I have a form. I want to open a new form at run time from the original form on a button click. And then close this new form (after 2,3 sec) programatically but..

How to use in jQuery :not and hasClass() to get a specific element without a class

I have this line of code: $('#sitesAccordion .groupOfSites').click(function() { var lastOpenSite = $(this).siblings().hasClass(':not(.closedTab)'); console.log(lastOpenSite); }); I get "fal..

ExpressJS - throw er Unhandled error event

I created expressjs application using the following commands: express -e folderName npm install ejs --save npm install When I run the application with: node app.js, I have the following errors: ev..

How many threads is too many?

I am writing a server, and I send each action of into a separate thread when the request is received. I do this because almost every request makes a database query. I am using a threadpool library to ..

What is the best way to seed a database in Rails?

I have a rake task that populates some initial data in my rails app. For example, countries, states, mobile carriers, etc. The way I have it set up now, is I have a bunch of create statements in fil..

What is the difference between Double.parseDouble(String) and Double.valueOf(String)?

I want to convert String to a Double data type. I do not know if I should use parseDouble or valueOf. What is the difference between these two methods?..

Carriage Return\Line feed in Java

I have created a text file in Unix environment using Java code. For writing the text file I am using and BufferedWriter. And for newline after each row I am using bw.newLine() meth..

Forcing a postback

Is there a way to force a postback in code? I'm looking to force the raising of a postback from a method in the c# code behind my web application...

css transform, jagged edges in chrome

I've been using CSS3 transform to rotate images and textboxes with borders in my website. The problem is that the border look jagged in Chrome, like a (low-resolution) game without Anti-Aliasing. In ..

How to merge specific files from Git branches

I have 2 git branches branch1 and branch2 and I want to merge in branch2 into in branch1 and only that file. In essence I just want to work on the in branch1 but want to take ..

how to toggle (hide/show) a table onClick of <a> tag in java script

I want to show and hide (toggle) the <table> onClick event of the <a>. this is my <a> tag <a id="loginLink" onclick="toggleTable(true);" href="#">Login</a> here is my ..

Insert text into textarea with jQuery

I'm wondering how I can insert text into a text area using jquery, upon the click of an anchor tag. I don't want to replace text already in textarea, I want to append new text to textarea...

Getting value from JQUERY datepicker

If I want to display the JQUERY UI datepicker inline by attaching it to a DIV like $("div#someID").datepicker() - how do I access the chosen date? I assume if it's not bound to an INPUT then it won't ..

What's the difference between __PRETTY_FUNCTION__, __FUNCTION__, __func__?

What's the difference between __PRETTY_FUNCTION__, __FUNCTION__, __func__, and where are they documented? How do I decide which one to use?..

Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect)

I have a java project that runs on a webserver. I always hit this exception. I read some documentation and found that pessimistic locking (or optimistic, but I read that pessimistic is better) is the ..

What is an example of the Liskov Substitution Principle?

I have heard that the Liskov Substitution Principle (LSP) is a fundamental principle of object oriented design. What is it and what are some examples of its use?..

Better way to check variable for null or empty string?

Since PHP is a dynamic language what's the best way of checking to see if a provided field is empty? I want to ensure that: null is considered an empty string a white space only string is conside..

How to prevent http file caching in Apache httpd (MAMP)

I am developing a single page Javascript application in MAMP. My JavaScript and HTML template files are getting cached between requests. Is there a simple way to indicate in MAMP that I want to preve..

Java - Convert integer to string

Given a number: int number = 1234; Which would be the "best" way to convert this to a string: String stringNumber = "1234"; I have tried searching (googling) for an answer but no many seemed ..

What does "where T : class, new()" mean?

Can you please explain to me what where T : class, new() means in the following line of code? void Add<T>(T item) where T : class, new(); ..

Combine two (or more) PDF's

Background: I need to provide a weekly report package for my sales staff. This package contains several (5-10) crystal reports. Problem: I would like to allow a user to run all reports and also just ..

How to check for an empty object in an AngularJS view

In the controller's scope I have something like: $scope.card = {}; In the view I must check if my object is still an empty literal, {}, or if it contains some data in some fields. I tried this: n..

JavaScript Loading Screen while page loads

This is a little hard to explain, So I'll try my best So while a HTML page loads, I'd like there to be a cool loading screen going on. When it finishes loading, I want the loading screen to clear and..

Function passed as template argument

I'm looking for the rules involving passing C++ templates functions as arguments. This is supported by C++ as shown by an example here: #include <iostream> void add1(int &v) { v+=1; } ..

SecurityError: Blocked a frame with origin from accessing a cross-origin frame

I am loading an <iframe> in my HTML page and trying to access the elements within it using Javascript, but when I try to execute my code, I get the following error: SecurityError: Blocked a fra..

Validation for 10 digit mobile number and focus input field on invalid

I need the code for validating email and mobile number in jQuery and also focus() on that particular field where validations are not satisfied. This is my query <form name="enquiry_form" method=..

What is the C++ function to raise a number to a power?

How do I raise a number to a power? 2^1 2^2 2^3 etc.....

How to use pip on windows behind an authenticating proxy

My computer is running windows behind a proxy on a windows server (using active directory), and I can't figure out how to get through it with pip (in python3). I have tried using --proxy, but it stil..

Specify system property to Maven project

Is there a way ( I mean how do I ) set a system property in a maven project? I want to access a property from my test and my webapp ( running locally ) and I know I can use a java system property. ..

How to delete specific columns with VBA?

I am trying to delete multiple columns in VBA for Excel. I downloaded data from the Illinois Statistical analysis center about drug arrest.

Android scale animation on view

I want to use ScaleAnimation (programmatically not in xml) to change height to view from 0 to 60% of parent height. Width of view is constant and is 50px. View is empty only background color is set. ..

How to do SQL Like % in Linq?

I have a procedure in SQL that I am trying to turn into Linq: SELECT O.Id, O.Name as Organization FROM Organizations O JOIN OrganizationsHierarchy OH ON O.Id=OH.OrganizationsId where OH.Hierarchy lik..

Maven project version inheritance - do I have to specify the parent version?

I have two projects: Parent project: A, Sub project: B A/pom.xml: <groupId>com.dummy.bla</groupId> <artifactId>parent</artifactId> <version>0.1-SNAPSHOT</version>..

MySQL - How to parse a string value to DATETIME format inside an INSERT statement?

I have a MySQL database, with a column that is date type DATETIME. I am getting a string value for a date / time from an external application. That string value looks like this: '5/15/2012 8:06:26..

Java Wait for thread to finish

I have a thread downloading data and I want to wait until the download is finished before I load the data. Is there a standard way of doing this? More Info: I have a Download class that gets data f..

CSS 3 slide-in from left transition

Is there a cross browser solution to produce a slide-in transition with CSS only, no javascript? Below is an example of the html content: <div> <img id="slide" src="http://.../img.jpg /&..

Can't find System.Windows.Media namespace?

I'm using an object from a 3rd party API that has a property of type System.Windows.Media.ImageSource, yet I can't seem to find the System.Windows.Media namespace anywhere. If I try to add a reference..

How can I limit the visible options in an HTML <select> dropdown?

How can I limit the number of shown options in an HTML <select> drop down? For example: <select> <option value="1">1</option> <option value="2">2</option..

Is there an API to get bank transaction and bank balance?

I'm using CHASE bank. (Also Bank of America) and I want to get my bank transactions and my balance if I can. Is there an API for that? in PHP or JAVA? If so, please let me know how to get them...

How can I split a text into sentences?

I have a text file. I need to get a list of sentences. How can this be implemented? There are a lot of subtleties, such as a dot being used in abbreviations. My old regular expression works badly: ..

Using Address Instead Of Longitude And Latitude With Google Maps API

I've heard that it is possible to submit an Address instead of Longitude and Latitude and this would be much more feasible for my system. The user has to input their address when creating their profil..

how to get GET and POST variables with JQuery?

How do I simply get GET and POST values with JQuery? What I want to do is something like this: $('#container-1 > ul').tabs().tabs('select', $_GET('selectedTabIndex')); ..

Error: No Firebase App '[DEFAULT]' has been created - call Firebase App.initializeApp()

I have a firebase database linked up to two apps, one being an iOS app and another being a web app coded in node.js which is a basic algorithm that sets data to the database. When ever i am running th..

How to set aliases in the Git Bash for Windows?

How to alias command in Git Bash for Windows downloaded from ? I mean Bash commands not Git. (windows7) Edit: Writing aliases in .bashrc file (as suggested by @gturri) not adding it ..

OpenCV in Android Studio

I want to use OpenCV library in my app with Android Studio. I followed instructions found here but I get error Configuration with name 'default' not found What can be wrong? I use Android Stud..

Creating a chart in Excel that ignores #N/A or blank cells

I am attempting to create a chart with a dynamic data series. Each series in the chart comes from an absolute range, but only a certain amount of that range may have data, and the rest will be #N/A. ..

Android- create JSON Array and JSON Object

How can I create a JSON with this format in Android: Since the API that I will be passing will parse JsonArray then the object. Or would it be okay if just to pass a json object? Since I will just hav..

PLS-00201 - identifier must be declared

I executed a PL/SQL script that created the following table TABLE_NAME VARCHAR2(30) := 'B2BOWNER.SSC_Page_Map'; I made an insert function for this table using arguments CREATE OR REPLACE FUNCTION..

How can I print variable and string on same line in Python?

I am using python to work out how many children would be born in 5 years if a child was born every 7 seconds. The problem is on my last line. How do I get a variable to work when I'm printing text eit..

What is RSS and VSZ in Linux memory management

What are RSS and VSZ in Linux memory management? In a multithreaded environment how can both of these can be managed and tracked?..

Testing socket connection in Python

This question will expand on: Best way to open a socket in Python When opening a socket how can I test to see if it has been established, and that it did not timeout, or generally fail. Edit: I tried..

Download and install an ipa from self hosted url on iOS

I need to download and install an ipa directly from an URL. I have tried this: NSURL *url = [NSURL URLWithString:@""]; [[UIApplication sharedApplication] openURL:url]; Th..

How to specify jackson to only use fields - preferably globally

Default jackon behaviour seems to use both properties (getters and setters) and fields to serialize and deserialize to json. I would like to use the fields as the canonical source of serialization co..

Last non-empty cell in a column

Does anyone know the formula to find the value of the last non-empty cell in a column, in Microsoft Excel?..

Android How to adjust layout in Full Screen Mode when softkeyboard is visible

I have researched a lot to adjust the layout when softkeyboard is active and I have successfully implemented it but the problem comes when I use android:theme="@android:style/Theme.NoTitleBar.Fullscre..

How much data / information can we save / store in a QR code?

I would like to use this script (or is there even a better solution?) What I like to do is "save" some small scripts or programs and even files like xml..

T-SQL: Using a CASE in an UPDATE statement to update certain columns depending on a condition

I am wondering if this is possible at all. I want to update column x if a condition is true, otherwise column y would be updated UPDATE table SET (CASE (CONDITION) WHEN TRUE THEN columnx ..

How can I draw vertical text with CSS cross-browser?

I want to rotate a single word of text by 90 degrees, with cross-browser (>= IE6, >= Firefox 2, any version of Chrome, Safari, or Opera) support. How can this be done?..

Check if date is a valid one

Following is the scenario: I have a String date and a date format which is different. Ex.: date: 2016-10-19 dateFormat: "DD-MM-YYYY". I need to check if this date is a valid date. I have tried foll..

Ruby: What is the easiest way to remove the first element from an array?

Lets say I have an array [0, 132, 432, 342, 234] What is the easiest way to get rid of the first element? (0)..

HTML form action and onsubmit issues

I want to run JavaScript user validation on some textbox entries. The problem I'm having is that my form has the action of going to a new page within our site, and the onsubmit attribute never runs th..

what's the differences between r and rb in fopen

I tried using fopen in C, the second parameter is the open mode. The two modes "r" and "rb" tend to confuse me a lot. It seems they are the same. But sometimes it is better to use "rb". So, why does "..

What data type to use for money in Java?

What data type should you use for money in Java?..

Extract the filename from a path

I want to extract filename from below path: D:\Server\User\CUST\MEA\Data\In\Files\CORRECTED\CUST_MEAFile.csv Now I wrote this code to get filename. This working fine as long as the folder level didn..

Which type of folder structure should be used with Angular 2?

I am an Angular 1 developer that is starting to learn about Angular 2. There are a lot of different types of folder structure methods depending on the training material. I am going to list each one ..

How to execute shell command in Javascript

I want to write a JavaScript function which will execute the system shell commands (ls for example) and return the value. How do I achieve this?..

How can I completely uninstall nodejs, npm and node in Ubuntu

The Question is similar to How do I completely uninstall Node.js, and reinstall from beginning (Mac OS X) but for Ubuntu, and just for uninstalling. Installation was done by: sudo apt-get install node..

Where can I download the jar for org.apache.http package?

I want the jar file for org.apache.http package but I am not able to find it,can anyone let me know from where can I download it? I was not able to find the jar even in Apache site as well ..

Why avoid increment ("++") and decrement ("--") operators in JavaScript?

One of the tips for jslint tool is: ++ and -- The ++ (increment) and -- (decrement) operators have been known to contribute to bad code by encouraging excessive trickiness. They are secon..

How to Extract Year from DATE in POSTGRESQL

Date is in 'YYYY-MM-DD' text format, now I need to extract the year part which must be in numeric. I need this conversion to be done in single step, Since I need to use in other application where i ca..

C++ wait for user input

What would be the best way to wait for user input in console application? std::cout << "press any key to exit..."; // wait for user to hit enter or another key ..

In PHP with PDO, how to check the final SQL parametrized query?

In PHP, when accessing MySQL database with PDO with parametrized query, how can you check the final query (after having replaced all tokens)? Is there a way to check what gets really executed by the ..

sqldeveloper error message: Network adapter could not establish the connection error

I had made connection to the remote oracle database through sqldeveloper on my system. Suddenly the power went down and I had to restart the system. Now, when I am trying to connect to the remote ora..

What is the "N+1 selects problem" in ORM (Object-Relational Mapping)?

The "N+1 selects problem" is generally stated as a problem in Object-Relational mapping (ORM) discussions, and I understand that it has something to do with having to make a lot of database queries fo..

Jquery to get SelectedText from dropdown

I am trying to get the selected Text from the dropdownlist using Jquery. <div> @Html.DropDownList("SelectedCountryId", Model.CountryList, "(Select one Country)") </div> Given below ..

Where is body in a nodejs http.get response?

I'm reading the docs at, but for some reason, I can't seem to to actually find the body/data attribute on the returned, finished response obje..

Running the new Intel emulator for Android

Lately Google and Intel have published a new way to run the emulator, which should work much better than the previous version (which has emulated ARM CPU). Here are some links about it: this and this...

C#: How would I get the current time into a string?

How could I get the current h/m/s AM time into a string? And maybe also the date in numeric form (01/02/09) into another one?..

How can I clear the SQL Server query cache?

I've got a simple query running against SQL Server 2005 SELECT * FROM Table WHERE Col = 'someval' The first time I execute the query can take > 15 secs. Subsequent executes are back in < 1 ..

Safely remove migration In Laravel

In Laravel, there appears to be a command for creating a migration, but not removing. Create migration command: php artisan migrate:make create_users_table If I want to delete the migration, can I..

"std::endl" vs "\n"

Many C++ books contain example code like this... std::cout << "Test line" << std::endl; I've always done that too. But I've seen a lot of code from working developers like this in..

Why doesn't wireshark detect my interface?

I just installed Wireshark, but when I click capture > interfaces, the dialog box appears, but it does not contain my network interface. When click on capture > interfaces it appears as in the ..

How to build a RESTful API?

The issue is this: I have a web application that runs on a PHP server. I'd like to build a REST api for it. I did some research and I figured out that REST api uses HTTP methods (GET, POST...) for cer..

How to write a large buffer into a binary file in C++, fast?

I'm trying to write huge amounts of data onto my SSD(solid state drive). And by huge amounts I mean 80GB. I browsed the web for solutions, but the best I came up with was this: #include <fstream&..

How to join on multiple columns in Pyspark?

I am using Spark 1.3 and would like to join on multiple columns using python interface (SparkSQL) The following works: I first register them as temp tables. numeric.registerTempTable("numeric") Ref..

Is it possible to decompile a compiled .pyc file into a .py file?

Is it possible to get some information out of the .pyc file that is generated from a .py file?..

Bootstrap 3 scrollable div for table

I am using Bootstrap 3 with a navbar at the top and a page that displays a table formatted using Bootstrap 3's table class. I would like the table (which is sitting in its own div) to be the only par..

Failed to install android-sdk: "java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema"

When installing the android sdk tools the following error is emitted: java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema Why is this happening and how can it be fixed? Debug ou..

PG COPY error: invalid input syntax for integer

Running COPY results in ERROR: invalid input syntax for integer: "" error message for me. What am I missing? My /tmp/people.csv file: "age","first_name","last_name" "23","Ivan","Poupkine" "","Eugen..

How do I download code using SVN/Tortoise from Google Code?

I just saw a really cool WPF twitter client that I think is developed by the Herding Code podcast guys HerdingCode called Witty. (or at least, I see a lot of those guys using this client). This proj..

What do the makefile symbols $@ and $< mean?

CC=g++ CFLAGS=-c -Wall LDFLAGS= SOURCES=main.cpp hello.cpp factorial.cpp OBJECTS=$(SOURCES:.cpp=.o) EXECUTABLE=hello all: $(SOURCES) $(EXECUTABLE) $(EXECUTABLE): $(OBJECTS) $(CC) $(LDFLAGS) $(OB..

Create Generic method constraining T to an Enum

I'm building a function to extend the Enum.Parse concept that Allows a default value to be parsed in case that an Enum value is not found Is case insensitive So I wrote the following: public stat..

How do I initialize a TypeScript Object with a JSON-Object?

I receive a JSON object from an AJAX call to a REST server. This object has property names that match my TypeScript class (this is a follow-on to this question). What is the best way to initialize it..

MySQL JDBC Driver 5.1.33 - Time Zone Issue

Some background: I have a Java 1.6 webapp running on Tomcat 7. The database is MySQL 5.5. Previously, I was using Mysql JDBC driver 5.1.23 to connect to the DB. Everything worked. I recently upgraded..

How can I git stash a specific file?

How can I stash a specific file leaving the others currently modified out of the stash I am about to save? For example, if git status gives me this: younker % gst # On branch master # Your bra..

What is the use of the init() usage in JavaScript?

What is the meaning and usage of the init() function in JavaScript?..

CSS: 100% font size - 100% of what?

There are many articles and questions about percentage-sized vs other-sized fonts. However, I can not find out WHAT the reference of the percent-value is supposed to be. I understand this is 'the same..

Build Error - missing required architecture i386 in file

I'm getting this error when building my iPhone application: ld: warning: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.sdk/System/Library /Frameworks/UIKit.framework/UIKit..

How should I copy Strings in Java?

String s = "hello"; String backup_of_s = s; s = "bye"; At this point, the backup variable still contains the original value "hello" (this is because of String's immutability right?). Bu..

Communication between tabs or windows

I was searching for a way how to communicate between multiple tabs or windows in a browser (on the same domain, not CORS) without leaving traces. There were several solutions: using window object po..

Replacing characters in Ant property

Is there a simple way of taking the value of a property and then copy it to another property with certain characters replaced? Say propA=This is a value. I want to replace all the spaces in it into u..

sorting a List of Map<String, String>

I have a list variable created like this: List<Map<String, String>> list = new ArrayList<Map<String, String>>(); In my Android application, this list gets populated. just a..

How to access a value defined in the file in Spring Boot

I want to access values provided in, e.g.: DEBUG ERROR logging.file=${HOME}/application.log userBucket.path..

Format a number as 2.5K if a thousand or more, otherwise 900

I need to show a currency value in the format of 1K of equal to one thousand, or 1.1K, 1.2K, 1.9K etc, if its not an even thousands, otherwise if under a thousand, display normal 500, 100, 250 etc, u..

Easy way to test a URL for 404 in PHP?

I'm teaching myself some basic scraping and I've found that sometimes the URL's that I feed into my code return 404, which gums up all the rest of my code. So I need a test at the top of the code to ..

Access-Control-Allow-Origin error sending a jQuery Post to Google API's

I read a lot for the 'Access-Control-Allow-Origin' error, but I don't understand what I have to fix :( I'm playing with Google Moderator API, but when I try to add new serie I receive: XMLHttpReques..

Make child visible outside an overflow:hidden parent

In CSS the overflow:hidden is set on parent containers in order to allow it to expand with the height of their floating children. But it also has another interesting feature when combined with marg..

TSQL: How to convert local time to UTC? (SQL Server 2008)

We are dealing with an application that needs to handle global time data from different time zones and daylight savings time settings. The idea is to store everything in UTC format internally and only..

Better way to shuffle two numpy arrays in unison

I have two numpy arrays of different shapes, but with the same length (leading dimension). I want to shuffle each of them, such that corresponding elements continue to correspond -- i.e. shuffle them ..

How To Accept a File POST

I'm using mvc 4 webapi beta to build a rest service. I need to be able to accept POSTed images/files from client applications. Is this possible using the webapi? Below is how action I am cu..

How to use Git and Dropbox together?

Is it possible to use Git and Dropbox together?..

Validate phone number using javascript

I'm trying to validate phone number such as 123-345-3456 and (078)789-8908 using JavaScript. Here is my code function ValidateUSPhoneNumber(phoneNumber) { var regExp = /^(\([0-9]{3}\) |[0-9]{3}-)[0..

How to Install gcc 5.3 with yum on CentOS 7.2?

I am using CentOS 7.2 When I use yum groupinstall "Development Tools", gcc version is 4.8.5, like this: I would like to install gcc 5.3 How to approach this with yum?..

Deleting array elements in JavaScript - delete vs splice

What is the difference between using the delete operator on the array element as opposed to using the Array.splice method? For example: myArray = ['a', 'b', 'c', 'd']; delete myArray[1]; // or my..

How do I remove quotes from a string?

$string = "my text has \"double quotes\" and 'single quotes'"; How to remove all types of quotes (different languages) from $string?..

How to get share counts using graph API

I can get the share count of an URL using PHP SDK and using the deprecated rest API, but didn't find a way to get the share counts of an URL using graph API. Is there any way to find out?..

Difference between Ctrl+Shift+F and Ctrl+I in Eclipse

I have been used Ctrl+Shift+F to correct indentation but I heard there is another shortcut to do that: Ctrl+I According a reference found in google, Ctrl+Shift+F is Reformat and Ctrl+I is Correct ind..

MySQL - DATE_ADD month interval

I face a problem with the function DATE_ADD in MySQL. My request looks like this : SELECT * FROM mydb WHERE creationdate BETWEEN "2011-01-01" AND DATE_ADD("2011-01-01", INTERVAL 6 MONTH) GROUP BY..

How to use nan and inf in C?

I have a numerical method that could return nan or inf if there was an error, and for testing purposed I'd like to temporarily force it to return nan or inf to ensure the situation is being handled co..

$apply already in progress error

Stack trace: Error: $apply already in progress at Error (<anonymous>) at beginPhase (file:///android_asset/www/built.min.js:7:22740) at Object.Scope.$apply (file:///android_asset/www/built.min...

Get current time in milliseconds using C++ and Boost

In my thread (using boost::thread) I need to retrieve the current time in ms or less and to convert into ms: Actually, reading here I've found this: tick = boost::posix_time::second_clock::local_tim..

Reverse / invert a dictionary mapping

Given a dictionary like so: my_map = {'a': 1, 'b': 2} How can one invert this map to get: inv_map = {1: 'a', 2: 'b'} ..

Installing Git on Eclipse

How can I install Git on Eclipse? I found tutorials on but there was said that "You should then see the eight Eclipse projects 'org.spearce.something.'" I don'..

ScrollIntoView() causing the whole page to move

I am using ScrollIntoView() to scroll the highlighted item in a list into view. When I scroll downwards ScrollIntoView(false) works perfectly. But when I scroll upwards, ScrollIntoView(true) is causin..

How do I remove blank pages coming between two chapters in Appendix?

Is there a way to remove blank pages appearing between two chapters, in Appendix?..

postgreSQL - psql \i : how to execute script in a given path

I'm new to postgreSQL and I have a simple question: I'm trying to create a simple script that creates a DB so I can later call it like this: psql -f createDB.sql I want the script to call other sc..

"Submit is not a function" error in JavaScript

Can anyone tell me what is going wrong with this code? I tried to submit a form with JavaScript, but an error ".submit is not a function" shown. See below for more details of the code: <form actio..

React-router: How to manually invoke Link?

I'm new to ReactJS and to React-Router. I have a component that receives through props a <Link/> object from react-router. Whenever the user clicks on a 'next' button inside this component I wan..

How can I convert a string with dot and comma into a float in Python

How can I convert a string like 123,456.908 to float 123456.908 in Python?..

What is the difference between a token and a lexeme?

In Compiler Construction by Aho Ullman and Sethi, it is given that the input string of characters of the source program are divided into sequence of characters that have a logical meaning, and are kno..

LDAP root query syntax to search more than one specific OU

I need to run a single LDAP query that will search through two specific organization units (OU) in the root query however I'm having a tough go of it. I've tried the following queries below and neithe..

TextFX menu is missing in Notepad++

There is no TextFX menu in the menu bar in my Notepad++ installation. How do I add it? There is nothing in Plugins -> Plugin Manager -> Show Plugin Manager -> Available tab I reinstalle..

MySQL 'Order By' - sorting alphanumeric correctly

I want to sort the following data items in the order they are presented below (numbers 1-12): 1 2 3 4 5 6 7 8 9 10 11 12 However, my query - using order by xxxxx asc sorts by the first digit above ..

No mapping found for HTTP request with URI Spring MVC

Here's my Web.xml <servlet> <servlet-name>dispatcherServlet</servlet-name> <servlet-class> org.springframework.web.servlet.DispatcherServlet </servlet-c..

Git for Windows: .bashrc or equivalent configuration files for Git Bash shell

I've just installed Git for Windows and am delighted to see that it installs Bash. I want to customise the shell in the same way I can under Linux (e.g. set up aliases like ll for ls -l), but I can't..

How to use the DropDownList's SelectedIndexChanged event

I have two DropDownLists in my webform and when I select a value in the first dropdownlist, I would like a related value to be automatically selected in the second dropdownlist. This is what I curren..

Modifying a subset of rows in a pandas dataframe

Assume I have a pandas DataFrame with two columns, A and B. I'd like to modify this DataFrame (or create a copy) so that B is always NaN whenever A is 0. How would I achieve that? I tried the followi..

How does the stack work in assembly language?

I'm currently trying to understand how the stack works, so I've decided teach myself some assembly language, I'm using this book: I'm using Gas and doin..

Check with jquery if div has overflowing elements

I have a div with a fixed height and overflow:hidden; I want to check with jQuery if the div has elements that are overflowing past the fixed height of the div. How can I do this?..

How to Execute SQL Server Stored Procedure in SQL Developer?

I've been given a user account to a SQL Server database that only has privileges to execute a stored procedure. I added the JTDS SQL Server JDBC jar file to SQL Developer and added it as a Third Party..

Assign a class name to <img> tag instead of write it in css file?

I am curious to know, is it true that it is better to assign a class name to the <img> tag in the html file instead of writing it down directly into css file? <div class="column"> <..

Form inline inside a form horizontal in twitter bootstrap?

What's the best way to design a form that looks like this (please see link below) in twitter bootstrap without any homemade classes ? Is it possible to set a inner form-inline inside a form-horizonta..

How To Change DataType of a DataColumn in a DataTable?

I have: DataTable Table = new DataTable; SqlConnection = new System.Data.SqlClient.SqlConnection("Data Source=" + ServerName + ";Initial Catalog=" + DatabaseName + ";Integrated Security=SSPI; Connect..

Why do Twitter Bootstrap tables always have 100% width?

Suppose this markup: <table class="table table-bordered" align="center"> No mather how many cells I have, the table is always 100% width. Why's that? ..

How to set custom location for local installation of npm package?

Is it possible to specify a custom package destination for npm install, either through a command flag or environment variable? By default, npm local installs end up in node_modules within the current..

generate model using user:references vs user_id:integer

I'm confused on how to generate a model that belongs_to another model. My book uses this syntax to associate Micropost with User: rails generate model Micropost user_id:integer but

How to remove all white spaces from a given text file

I want to remove all the white spaces from a given text file. Is there any shell command available for this ? Or, how to use sed for this purpose. I want something like below: $ cat hello.txt | ..

twitter bootstrap 3.0 typeahead ajax example

There are a lot of typeahead ajax examples out there for bootstrap 2, for example this here twitter bootstrap typeahead ajax example. However I am using bootstrap 3 and I could not find a complete ex..

Mysql Compare two datetime fields

I want to compare two dates with time, I want all the results from tbl where date1 > date2 Select * From temp where mydate > '2009-06-29 04:00:44'; but it is just comparing dates not time. it..

Delete topic in Kafka

I need to delete the topic test in Apache Kafka As expressed in the documentation here, I have executed: bin/ --zookeeper localhost:2181 --delete --topic test However, this..

Group by with multiple columns using lambda

How can I group by with multiple columns using lambda? I saw examples of how to do it using linq to entities, but I am looking for lambda form...

Ajax tutorial for post and get

I need a simple ajax tutorial or case study for a simple input form, where I want to post a username through an input form, which sends it to the database and replies with the results. Any recommendat..

How do I show/hide a UIBarButtonItem?

I created a toolbar in IB with several buttons. I would like to be able to hide/show one of the buttons depending on the state of the data in the main window. UIBarButtonItem doesn't have a hidden p..

How to clear the cache of nginx?

I use nginx to as the front server, I have modified the CSS files, but nginx is still serving the old ones. I have tried to restart nginx, to no success and I have Googled, but not found a valid way ..

Is iterating ConcurrentHashMap values thread safe?

In javadoc for ConcurrentHashMap is the following: Retrieval operations (including get) generally do not block, so may overlap with update operations (including put and remove). Retrievals reflect..

IEnumerable<object> a = new IEnumerable<object>(); Can I do this?

I want to create a new instance of an object IEnumerable<object> Can I do this? IEnumerable<object> a = new IEnumerable<object>(); ..

Importing from a relative path in Python

I have a folder for my client code, a folder for my server code, and a folder for code that is shared between them Proj/ Client/ Server/ Common/ ..

How to install MySQLdb (Python data access library to MySQL) on Mac OS X?

I'm a Python newbie, but I've just spent a day working out how to get MySQLdb working properly, and the universe according to google includes numerous references to what a PITA it is, and an inordinat..

USB Debugging option greyed out

I have an LG-E405 phone running Android 2.3.6. I connected my phone with a USB cable and selected the mode as Charge Only. Now when I try to turn on USB Debugging, I find that that the option is gre..

Get querystring from URL using jQuery

I have the following URL: I need to get the value of location from the URL into a variable and then use it in jQuery code: var thequerystring = "get..

Transfer data between iOS and Android via Bluetooth?

I've been reading up on how to transfer data between iOS devices over Bluetooth using GameKit. I'm not writing a game, per se, but do have a need to transfer a small amount of binary data between two..

SQL Count for each date

I have the following need I have a logging table which logs som leads generated each day. Now I need to pull a report over the amount of leads for each day over the last 10 days. Lets say the table..

How can I download HTML source in C#

How can I get the HTML source given a web address in c#?..

AJAX post error : Refused to set unsafe header "Connection"

I have the following custom ajax function that posts data back to a PHP file. Everytime the post of data happens I get the following two errors : Refused to set unsafe header "Content-length" R..

file_get_contents() how to fix error "Failed to open stream", "No such file"

I'm getting the following error when I try to run my PHP script: failed to open stream: No such file or directory in C:\wamp\www\LOF\Data.php on line 3 script: My code is as follows: <?php..

Centering a canvas

How do I markup a page with an HTML5 canvas such that the canvas Takes up 80% of the width Has a corresponding pixel height and width which effectively define the ratio (and are proportionally maint..

How to repair a serialized string which has been corrupted by an incorrect byte count length?

I am using Hotaru CMS with the Image Upload plugin, I get this error if I try to attach an image to a post, otherwise there is no error: unserialize() [function.unserialize]: Error at offset The..

Capture HTML Canvas as gif/jpg/png/pdf?

Is it possible to capture or print what's displayed in an html canvas as an image or pdf? I'd like to generate an image via canvas, and be able to generate a png from that image...

Detect IE version (prior to v9) in JavaScript

I want to bounce users of our web site to an error page if they're using a version of Internet Explorer prior to v9. It's just not worth our time and money to support IE pre-v9. Users of all other non..

Laravel - Eloquent "Has", "With", "WhereHas" - What do they mean?

I've found the concept and meaning behind these methods to be a little confusing, is it possible for somebody to explain to me what the difference between has and with is, in the context of an example..

How to prevent user from typing in text field without disabling the field?

I tried: $('input').keyup(function() { $(this).attr('val', ''); }); but it removes the entered text slightly after a letter is entered. Is there anyway to prevent the user from entering text c..

How to install the Sun Java JDK on Ubuntu 10.10 (Maverick Meerkat)?

I've tried to add the Canonical Partner repository, but I still can't find the sun-java6-jdk package. What is the right way to install the Oracle Sun JDK instead of OpenJDK on Ubuntu 10.10 (Maverick M..

CSS selector last row from main table

I have a table inside a table, and I want to fill the background of the last row of table 1 only — not table 2. <style> #test tr:last-child { background:#ff0000; } </style> <tabl..

python to arduino serial read & write

I'm trying to "ping pong" info back and forth between some python code and arduino code. I want to send two setpoints to the arduino code periodically (for instance on the minute), read them on arduin..

Why does git status show branch is up-to-date when changes exist upstream?

Changes exist upstream in a tracked branch, but when I type git status it indicates that my local branch is up-to-date. Is this new behavior, did I change a config setting, or is something wrong? Th..

How to fetch Java version using single line command in Linux

I want to fetch the Java version in Linux in a single command. I am new to awk so I am trying something like java -version|awk '{print$3}' But that does not return the version. How would I fe..

Run a Docker image as a container

After building a Docker image from a dockerfile, I see the image was built successfully, but what do I do with it? Shouldn't i be able to run it as a container?..

Sort ArrayList of custom Objects by property

I read about sorting ArrayLists using a Comparator but in all of the examples people used compareTo which according to some research is a method for Strings. I wanted to sort an ArrayList of custom o..

Converting string format to datetime in mm/dd/yyyy

I have to convert string in mm/dd/yyyy format to datetime variable but it should remain in mm/dd/yyyy format. string strDate = DateTime.Now.ToString("MM/dd/yyyy"); Please help...

IntelliJ does not show project folders

I have an issue with IntelliJ. It doesn't show any folders in my project view on the left. My setting is "View As: Project" How can I manage it so that the folders and packages are shown again? I don..

add new row in gridview after binding C#,

I want to add a new blank row to the gridview after binding as seen in the picture when clicking the link button below. The textboxes inside the gridview should remain the same if there is any data ..

Rendering HTML inside textarea

I need to be able to render some HTML tags inside a textarea (namely <strong>, <i>, <u>, <a>) but textareas only interpret their content as text. Is there an easy way of doing ..

How to display image from URL on Android

I want to display image on screen. Image should come from URL, and not drawable. Code is here: <ImageView android:id="@+id/ImageView01" android:src = "" a..

jquery/javascript convert date string to date

I have a date string "Sunday, February 28, 2010" that I would like to convert to a js date object formatted @ MM/DD/YYYY but don't know how. Any suggestions? ..

How to use UIVisualEffectView to Blur Image?

Could someone give a small example of applying the blur to an image? I've been trying to figure out the code for a while now :( still new at obj c! The UIVisualEffectView provides a simple abstra..

How to sparsely checkout only one single file from a git repository?

How do I checkout just one file from a git repo?..

Count elements with jQuery

Is there a way to count how many elements on the page with a particular class?..

Item frequency count in Python

Assume I have a list of words, and I want to find the number of times each word appears in that list. An obvious way to do this is: words = "apple banana apple strawberry banana lemon" uniques = set..

Nesting optgroups in a dropdownlist/select

I have created a customer c# DropDownList control that can render out it's contents are optgroups (Not from scratch, I edited some code found on the internet, although I do understand exactly what it'..

Format Float to n decimal places

I need to format a float to "n"decimal places. was trying to BigDecimal, but the return value is not correct... public static float Redondear(float pNumero, int pCantidadDecimales) { // the func..

Random alpha-numeric string in JavaScript?

What's the shortest way (within reason) to generate a random alpha-numeric (uppercase, lowercase, and numbers) string in JavaScript to use as a probably-unique identifier?..

Spring Boot JPA - configuring auto reconnect

I have a nice little Spring Boot JPA web application. It is deployed on Amazon Beanstalk and uses an Amazon RDS for persisting data. It is however not used that often and therefore fails after a while..

What is in your .vimrc?

Vi and Vim allow for really awesome customization, typically stored inside a .vimrc file. Typical features for a programmer would be syntax highlighting, smart indenting and so on. What other tricks ..

Convert nested Python dict to object?

I'm searching for an elegant way to get data using attribute access on a dict with some nested dicts and lists (i.e. javascript-style object syntax). For example: >>> d = {'a': 1, 'b': {'c'..

Capture Image from Camera and Display in Activity

I want to write a module where on a click of a button the camera opens and I can click and capture an image. If I don't like the image I can delete it and click one more image and then select the ima..

SQL Plus change current directory

How does one change the current directory in SQL Plus under windows. I am trying to write a script with several "@ filename" commands. I know that one can open a script with the File --> Open comma..

How Stuff and 'For Xml Path' work in SQL Server?

Table is: Id Name 1 aaa 1 bbb 1 ccc 1 ddd 1 eee Required output: Id abc 1 aaa,bbb,ccc,ddd,eee Query: SELECT ID, abc = STUFF( (SELECT ',' + name FR..