Questions Tagged with #Lpr

The Line Printer Remote protocol (or LPR) is a network protocol for submitting print jobs to a remote printer.

What's the net::ERR_HTTP2_PROTOCOL_ERROR about?

I'm currently working on a website, which triggers a net::ERR_HTTP2_PROTOCOL_ERROR 200 error on Google Chrome. I'm not sure exactly what can provoke this error, I just noticed it pops out only when ac..

"Permission Denied" trying to run Python on Windows 10

Seems as though an update on Windows 10 overnight broke Python. Just trying to run python --version returned a "Permission Denied" error. None of the three updates; KB4507453, KB4506991, or KB4509096..

Could not resolve in Android Studio new project

I know about this questions: Failed to resolve: android Could not resolve [duplicate] And I've read this documentation..

Unable to merge dex

I have Android Studio Beta. I created a new project with compile my old modules but when I tried launching the app it did not launch with the message: Error:Execution failed for task ':app:transformD..

Iterate over array of objects in Typescript

I need to iterate over the array of objects in angular 2 and limit the string length display for a particular key in the object. this.productService.loadAllProducts(product).subscribe(data => { ..

how to refresh page in angular 2

I have created one router link as below. This router link loads ProductsStartComponent and then this component loads several other components using ngif and not via navigation. Since below Product cat..

Could not find in circle ci

I update the gradle plugin to the latest : and this error occured : export TERM="dumb" if [ -e ./gradlew ]; then ./gradlew test;else gradle test;fi FAILU..

Error:Execution failed for task ':app:compileDebugKotlin'. > Compilation error. See log for more details

Error:Execution failed for task ':app:compileDebugKotlin'. > Compilation error. See log for more details build:gradle(Module:app) buildscript { repositories { maven { url '..

Error: the entity type requires a primary key

I would like to expand the question asked on this thread Binding listbox to observablecollection by giving it an ability to persistent the data. The structure is mostly the same except I installed E..

Typescript : Property does not exist on type 'object'

I have the follow setup and when I loop through using for...of and get an error of : Property "country" doesn't exist on type "object". Is this a correct way to loop through each..

Android: Getting "Manifest merger failed" error after updating to a new version of gradle

After accepting to update the project to new version of gradle I get this error: Error:Execution failed for task ':app:processDebugManifest'. Manifest merger failed : Attribute meta-data#android.supp..

TypeScript enum to object array

I have an enum defined this way: export enum GoalProgressMeasurements { Percentage = 1, Numeric_Target = 2, Completed_Tasks = 3, Average_Milestone_Progress = 4, Not_Measured = 5 }..

Gradle error: Minimum supported Gradle version is 3.3. Current version is 3.2

When I today update Android Studio it write: Minimum supported Gradle version is 3.3. Current version is 3.2 how can I solve this problem? Here is my build.gradle // Top-level build file where you ..

Error:Cause: unable to find valid certification path to requested target

I got the following Error in android Studio 2.2.3 when I sync gradle. Error:Cause: unable to find valid certification path to requested target How can I fix this issue I am Adding my Gradle file al..

All libraries must use the exact same version specification

After updating to android studio 2.3 I got this error message. I know it's just a hint as the app run normally but it's really strange. All libraries must use the exact same ve..

Typescript input onchange

In my react and typescript app, I use: onChange={(e) => data.motto = ( as any).value}. How do I correctly define the typings for the class, so I wouldn't have to hack my way around the typ..

Didn't find class ""?

I am getting the below exception on app launch. java.lang.RuntimeException: Unable to get provider java.lang.ClassNotFoundException: Didn't find cla..

Call to undefined function mysql_query() with Login

When i execute my PHP code below i get a Fatal error and i'm not sure how to resolve it. Thank you for your help The Error PHP Fatal error: Uncaught Error: Call to undefined function mysql_quer..

Django URLs TypeError: view must be a callable or a list/tuple in the case of include()

After upgrading to Django 1.10, I get the error: TypeError: view must be a callable or a list/tuple in the case of include(). My is as follows: from django.conf.urls import include, url u..

Node.js heap out of memory

Today I ran my script for filesystem indexing to refresh RAID files index and after 4h it crashed with following error: [md5:] 241613/241627 97.5% [md5:] 241614/241627 97.5% [md5:] 241625/2416..

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:transformClassesWithDexForDebug'

Due to 65K error in my project I need it to migrate to Android Studio . While running ./gradlew assembleDebug I am getting the error: Execution failed for task ':app:transformClassesWithDexFor..

Unable to get provider

I am testing the new Crash tool: After going through the steps, the app launches and it crashes saying: 05-18 17:28:18.870 28743 28743 E AndroidRuntime: java...

Could not find method android() for arguments

I've been trying to import a project to Android Studio and this is where I am stuck, there is a similar question on Stack Overflow but it did not provide a solution to my particular error. This is m..

Error: No toolchains found in the NDK toolchains folder for ABI with prefix: llvm

I want to compile an open source android project (Netguard) using gradel (gradlew clean build) But I encountered this Error: A problem occurred configuring project ':app'. > Exception thrown while..

Gradle version 2.2 is required. Current version is 2.10

I am trying to use gradle build. It gives me error saying that Failed to apply plugin [id ''] Gradle version 2.2 is required. Current version is 2.10. If using the gradle wra..

Android Studio Gradle: Error:Execution failed for task ':app:processDebugGoogleServices'. > No matching client found for package

I am trying to upgrade my google play services dependencies to 8.4.0 by following the example Google gives here, but I am getting the following error ('com.example.exampleapp' is a replacement for my ..

Could not determine the dependencies of task ':app:crashlyticsStoreDeobsDebug' if I enable the proguard

I get following error when I was running an app within Android Studio 2. Gradle tasks [:app:assembleDebug] Could not determine the dependencies of task ':app:crashlyticsStoreDeobsDebug'. > Task wi..

android : Error converting byte to dex

So, I am getting the following error while running the project after upgrading build.gradle (Project) from dependencies { classpath '' // N..

Conda update failed: SSL error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed

I found out that there was a problem when I tried doing conda update <package> Terminal output conda update bokeh Fetching package metadata: SSL verification error: [SSL: CERTIFICATE_V..

Swift Modal View Controller with transparent background

I know this topic is quite popular, but I'm a little iniciate problem in a programming language, the fact is that I still do not understand where I put the code. Well, I'll tell the whole case: I'm..

How to add LocalDB to Visual Studio 2015 Community's SQL Server Object Explorer?

Problem I don't understand how to make LocalDB show up in the SQL Server Object Explorer. On some VMs, it shows up automatically, on some other VMs, it doesn't. Still, after googling for hours, I don'..

Logarithmic returns in pandas dataframe

Python pandas has a pct_change function which I use to calculate the returns for stock prices in a dataframe: ndf['Return']= ndf['TypicalPrice'].pct_change() I am using the following code to get lo.. is not a function

I'm bashing my head against an error I can't work out how to fix. I have the following; JSON {"products": [ { "product_id" : "123", "product_data" : { "image_id" : "..

Authentication failed because remote party has closed the transport stream

I am developing a TCP client to connect OpenSSL server with the certificate authentication. I have using .crt and .key files shared by server team. These certificates are generated by OpenSSL commands..

Run a command shell in jenkins

I'm trying to execute a command shell in Jenkins, I'm working on Windows 7. In the console output I have this: Building in workspace C:\Program Files (x86)\Jenkins\workspace\test [test] $ sh -xe C:\W.. SSL handshake aborted: Failure in SSL library, usually a protocol error

I am trying to run the following code in android URLConnection l_connection = null; // Create connection uzip=new UnZipData(mContext); l_url = new URL(serverurl); if ..

Execution failed for task ':app:compileDebugAidl': aidl is missing

I installed Android Studio on my computer. I created a new project but that got me the error below. What can I do? Error:Execution failed for task ':app:compileDebugAidl'. > aidl is missing My A..

Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRIDE environment variable to

today I just imported a sample app from Android SDK as a module in my project (analytics) and suddenly I got this gradle error when I try to sync it: Plugin is too old, please update to a more recent ..

How to enable TLS 1.2 support in an Android application (running on Android 4.1 JB)

As per the docs in Android for SSLSocket and SSLContext, TLS v1.1 and v1.2 protocols are supported in API level 16+, but are not enabled by default.

Android Studio Gradle DSL method not found: 'android()' -- Error(17,0)

I am attempting to run my project in Android Studio but the error appears below: I have followed many sources just to get this to run and have wound up here, but do not know what else to do. How ..

Android Studio update -Error:Could not run build action using Gradle distribution

I have recently updated android studio to the latest version,but then comes the problem. Gradle 'MyApplication' project refresh failed. Error:Could not run build action using Gradle distribution 'htt..

The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path

I'm a beginner and learning spring and hibernate (utilizing maven in project)and came across this problem and got stuck here. tried finding solution but ended up no where. Please help. thanks a lot E..

No content to map due to end-of-input jackson parser

I am getting this response from the server {"status":"true","msg":"success"} I am trying to parse this json string using Jackson parser library but somehow I am facing mapping-exception stating com..

Android Studio - Unable to find valid certification path to requested target

I'm getting this error Gradle 'project_name' project refresh failed: Unable to find valid certification path to requested target when I create a new project on Android Studio 0.8.14 Mac OSX Build...

Could not resolve all dependencies for configuration ':classpath'

I cant seem to get build tools for the latest gradle at all. I suspect its something to do with proxy setting for gradle. I have had a good look online but still cant seem to find a solution. I use gr..

Problems with local variable scope. How to solve it?

I'm getting the following error when trying to execute statemet.executeUpdate() in my code: Local variable statement defined in an enclosing scope must be final or effectively final. This is my cod..

iOS 8 Snapshotting a view that has not been rendered results in an empty snapshot

In iOS 8 I am having problem capturing images from camera till now I am using this code for UIImagePickerController *controller=[[UIImagePickerController alloc] init]; controller.videoQuality=UIImag..

iOS8 Beta Ad-Hoc App Download (itms-services)

I have an ipa built using my Wildcard profile. I am hosting the ipa, and my testers are downloading it on our devices. For iOS7+ devices it is working fine. I have installed the iOS8 Beta on one of ..

DataFrame constructor not properly called! error

I am new to python and i am facing problem in creating the Dataframe in the format of key and value i.e. data = [{'key':'\[GlobalProgramSizeInThousands\]','value':'1000'},] Here is my My code c..

how to configure apache server to talk to HTTPS backend server?

I configured apache server as a reverse proxy and it works fine if I point a backend server as HTTP. That is: I configured virtual host 443 like: ProxyPass /primary/store http://localhost:9763/store..

Error:(1, 0) Plugin with id '' not found

This is my first attempt at Android Studio. I installed 0.8.0 and updated to 0.8.2. As soon as a project is created I get the error message: Error:(1, 0) Plugin with id ''..

Tomcat - maxThreads vs maxConnections

In Tomcat server.xml what is maxThreads versus maxConnections I understand that maxConnections is the number of connections open to the server And maxThreads is the maximum number of request process..

How to present popover properly in iOS 8

I'm trying to add a UIPopoverView to my Swift iOS 8 app, but I am unable to access the PopoverContentSize property, as the popover does not show in the correct shape. my code: var popover: UIPopoverC..

How to present a modal atop the current view in Swift

(Xcode6, iOS8, Swift, iPad) I am trying to create a classic Web-like modal view, where the outside of the dialog box is "grayed-out." To accomplish this, I've set the alpha value of the backgroundCol..

How to solve "The directory is not empty" error when running rmdir command in a batch script?

I am making a batch script and part of the script is trying to remove a directory and all of its sub-directories. I am getting an intermittent error about a sub-directory not being empty. I read one a..

View not attached to window manager crash

I am using ACRA to report app crashes. I was getting a View not attached to window manager error message and thought I had fixed it by wrapping the pDialog.dismiss(); in an if statement: if (pDialog!..

Find Number of CPUs and Cores per CPU using Command Prompt

I am trying to retrieve the Number of CPUs and Cores per CPU using Command Prompt. I have executed the following command: wmic cpu get NumberOfCores, NumberOfLogicalProcessors/Format:List I get this..

Error: Configuration with name 'default' not found in Android Studio

I am using the volley library to perform network operation in android. So I am trying to add this library in my project which is created in Android Studio and gradle system. I added the volley libra..

Could not load file or assembly 'Newtonsoft.Json' or one of its dependencies. Manifest definition does not match the assembly reference

Things I've tried after searching: in Web.Config put a binding on the old version: <dependentAssembly> <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" cultur..

Configuration with name 'default' not found. Android Studio

I have an Android Studio app. It has a library dependency (Android-Bootstrap), when I try to sync gradle, it gives me an error: Configuration with name 'default' not found. My structure is: -FT..

System.Data.SqlClient.SqlException: Login failed for user

Working with my project in debug I have no issues. However running it in IIS I am getting this error: System.Data.SqlClient.SqlException: Login failed for user 'domain\name-PC$'. Stack Trace [SqlEx..

UnicodeDecodeError: 'utf8' codec can't decode byte 0xa5 in position 0: invalid start byte

I am using Python-2.6 CGI scripts but found this error in server log while doing json.dumps(), Traceback (most recent call last): File "/etc/mongodb/server/cgi-bin/", line 135, ..

"Templates can be used only with field access, property access, single-dimension array index, or single-parameter custom indexer expressions" error

Why am I receiving the error: Templates can be used only with field access, property access, single-dimension array index, or single-parameter custom indexer expressions at this code: @model IE..

Error: No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlClient'

I recently upgraded/updated Entity Framework in an old project from version 4 or 5 to version 6. Now I get this exception: An exception of type 'System.InvalidOperationException' occurred in Ent..

Apache: "AuthType not set!" 500 Error

It's been a while since I used the Apache httpd web server. I'm firing up a local server for a project and when I try to request localhost/index.html, I get a 500 error and I see this in the error lo..

Error creating bean with name 'entityManagerFactory

I am trying to run a dbtest but I get the following error : "Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in c..

java.lang.ClassNotFoundException: org.springframework.boot.SpringApplication Maven

I'm trying to create a spring mvc application. This is my pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="" xmlns:xsi="

Correct use for angular-translate in controllers

I'm using angular-translate for i18n in an AngularJS application. For every application view, there is a dedicated controller. In the controllers below, I set the value to be shown as the page title...

"The system cannot find the file specified"

I saw many questions on SO with this error. But none were related to forms. I just hosted my application server after testing locally. I think it worked for a few mins but I'm not sure as I may have l..

OwinStartup not firing

I had the OwinStartup configuration code working perfectly and then it stopped working. Unfortunately I'm not sure exactly what I did to get it to stop working and am having a really hard time figuri..

Runtime error: Could not load file or assembly 'System.Web.WebPages.Razor, Version=

I tinkered with my ASP.NET MVC4 packages via NuGet, and now System.Web.WebPages.Razor v3 won't load. Sometimes other packages won't load either. My coworker runs the solution without any trouble, so..

C# - Create SQL Server table programmatically

I am trying to create a SQL Server table programmatically. Here is the code. using (SqlConnection con = new SqlConnection(conStr)) { try { // // Open the SqlConnection. ..

Android Camera Preview Stretched

I've been working on making my custom camera activity on Android, but when rotating the camera, the aspect ratio of the surface view gets messed up. In my oncreate for the activity, I set the framela..

Select All distinct values in a column using LINQ

I created a Web Api in VS 2012. I am trying to get all the value from one column "Category", that is all the unique value, I don't want the list to be returned with duplicates. I used this code to ge..

Hive ParseException - cannot recognize input near 'end' 'string'

I am getting the following error when trying to create a Hive table from an existing DynamoDB table: NoViableAltException(88@[]) at org.apache.hadoop.hive.ql.parse.HiveParser_IdentifiersParser.identi..

The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.5.1 Authentication Required?

I want to send an email from my application and i have written following code for sending mail MailMessage msg = new MailMessage(); msg.From = new MailAddress("mymailid"); msg.To.Add("re..

Exception of type 'System.OutOfMemoryException' was thrown.

I got the following problem Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where ..

django: TypeError: 'tuple' object is not callable

Getting a type error, 'tuple' object is not callable. Any idea what it could be? (dont worry about the indentation. It copies in weird.) I'm trying to create choices based on PackSize of storeliquor. ..

Safely limiting Ansible playbooks to a single machine?

I'm using Ansible for some simple user management tasks with a small group of computers. Currently, I have my playbooks set to hosts: all and my hosts file is just a single group with all machines lis..

Invoke-Command error "Parameter set cannot be resolved using the specified named parameters"

Hope you can help me with a problem trying to execute a script block with alternate credentials on a local computer. I've been thoroughly searching on forums and doing some googling and found two poss..

PHP parse/syntax errors; and how to solve them

Everyone runs into syntax errors. Even experienced programmers make typos. For newcomers, it's just part of the learning process. However, it's often easy to interpret error messages such as: PHP Par..

Gradle Build Android Project "Could not resolve all dependencies" error

I'm trying to build my first project with Gradle and I think my gradle files and settings are correct. I'm using only one module and Support V4 + AppCompatBar libraries. Project - build.gradle allp..

WCF error - There was no endpoint listening at

I am developing a WCF service, running IIS6 on Window server 2003. I have built a test client to talk to the WCF service and I am getting the error below. I have been looking at this error for days an..

PHP Fatal error: Uncaught exception 'Exception'

I'm playing around with exceptions in PHP. For example, I have a script that reads a $_GET request and loads a file; If the file doesn't exists, an new exception should be thrown: if ( file_exists( $..

Running Selenium Webdriver with a proxy in Python

I am trying to run a Selenium Webdriver script in Python to do some basic tasks. I can get the robot to function perfectly when running it through the Selenium IDE inteface (ie: when simply getting th..

SQL Error: 0, SQLState: 08S01 Communications link failure

I am getting this error (not so frequently): 2013-05-08 16:44:35,786 WARN ( [org.hibernate.util.JDBCExceptionReporter, logExceptions] - SQL Error: 0, SQLState: 08S01 2..

How can I bold the fonts of a specific row or cell in an Excel worksheet with C#?

I am exporting data from a List<> to excel. I want to make some specific rows and cells bold. I need to make some cell merged also. Below is the code I am using. try { Excel..

Foreach in a Foreach in MVC View

BIG EDIT : I have edited my full post with the answer that I came up with the help of Von V and Johannes, A BIG THANK YOU GUYS !!!! I've been trying to do a foreach loop inside a foreach loop in my i..

High CPU Utilization in java application - why?

I have a Java Application (web-based) that at times shows very high CPU Utilization (almost 90%) for several hours. Linux TOP command shows this. On application restart, the problem goes away. So to ..

An Authentication object was not found in the SecurityContext - Spring 3.2.2

I'm trying to invoke a protected method from a class that implements the ApplicationListener<AuthenticationSuccessEvent> interface on successful login (Spring 3.2.2 and Spring Security 3.2.0 M1)..

The content type application/xml;charset=utf-8 of the response message does not match the content type of the binding (text/xml; charset=utf-8)

I trying to consume a WCF web service using stand alone application. I am able to view this service using Internet Explorer also able to view in Visual studio service references. This is the error I..

How can I connect to a Tor hidden service using cURL in PHP?

I'm trying to connect to a Tor hidden service using the following PHP code: $url = 'http://jhiwjjlqpyawmpjx.onion/' $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RET..

CMake: How to build external projects and include their targets

I have a Project A that exports a static library as a target: install(TARGETS alib DESTINATION lib EXPORT project_a-targets) install(EXPORT project_a-targets DESTINATION lib/alib) Now I want to use..

How to rollback or commit a transaction in SQL Server

In my stored procedure, I have three insert statements. On duplicate key value insertion first two queries generate the error Violation of PRIMARY KEY constraint and third query runs as usual...

No Title Bar Android Theme

In my application I want to use the Theme.NoTitleBar, but on the other hand I also don't want to loose the internal Theme of the Android OS.. I searched on the net and Found the following answer.. I h..

How to programmatically log out from Facebook SDK 3.0 without using Facebook login/logout button?

The title says it all. I'm using a custom button to fetch the user's facebook information (for "sign up" purposes). Yet, I don't want the app to remember the last registered user, neither the currentl..

Entity Framework Provider type could not be loaded?

I am trying to run my tests on TeamCity which is currently installed on my machine. System.InvalidOperationException: The Entity Framework provider type 'System.Data.Entity.SqlServer.SqlPr..

Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from assembly 'mscorlib

When starting up my web site for the first time, I'm getting this error Could not load type 'System.Runtime.CompilerServices.ExtensionAttribute' from assembly 'mscorlib, Version=, Culture=neut..

Could not load file or assembly 'Microsoft.Web.Infrastructure,

I tried to upload my web site to a server. It was working fine with my local host, so I uploaded everything in my localhost wwwroot folder to the server and changed the connection string. But there i..

Error Microsoft.Web.Infrastructure, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35

I have a small web application. Which was working fine until I added two genericHandler in my application. I have made the following changes for the http handler <system.web> <authent..

SQL Server 100% CPU Utilization - One database shows high CPU usage than others

We have an SQL server with about 40 different (about 1-5GB each) databases. The server is an 8 core 2.3G CPU with 32Gigs of RAM. 27Gig is pinned to SQL Server. The CPU utliziation is mostly close to ..

How to bind WPF button to a command in ViewModelBase?

I have a view AttributeView that contains all sorts of attributes. There's also a button that when pressed, it should set the default values to the attributes. I also have a ViewModelBase class that i..

The module was expected to contain an assembly manifest

I have a project in c# that uses c++ library and some dlls. When I run it it works great. The library is Awesomium, contains both c++ library and c# wrappers When I create reference to this project ..

Get max and min value from array in JavaScript

I am creating the following array from data attributes and I need to be able to grab the highest and lowest value from it so I can pass it to another function later on. var allProducts = $(products)...

How do I POST an array of objects with $.ajax (jQuery or Zepto)

I'd like to POST an array of objects with $.ajax in Zepto or Jquery. Both exhibit the same odd error, but I can't find what I'm doing wrong. The data saves to the server when sent using a test client..

Replace new line/return with space using regex

Pretty basic question for someone who knows. Instead of getting from "This is my text. And here is a new line" To: "This is my text. And here is a new line" I get: "This is my text.And her..

Could not load file or assembly 'System.Web.WebPages.Razor, Version=

I just upgraded packages in an MVC 3 project ( 4), and now I am getting the following error message when accessing a page in that project: Server Error in '/MyApplication' Application. ..

Install apk without downloading

Can I install apk file without downloading? The apk file is on the server. I tried the code below but it doesn't work: public static void InstallProgram(Uri uri, Context context){ Intent intent =..

Adding rows to tbody of a table using jQuery

I am trying to add rows to the tbody of a table. But I am having issues with achieving that. Firstly, the function where everything takes place is called on change of a dropdown from a html page. I cr..

Python send POST with header

I try to build a python script who sends a POST with parameters for extracting the result. With fiddler, I have extracted the post request who return that I want. The website uses https only. POST /..

How to convert image into byte array and byte array to base64 String in android?

Can someone tell me the code to convert image into byte array and that byte array into base64 string. i write the below code not getting proper result . String filepath = "/sdcard/Image/ic_launcher..

Tomcat 7 "SEVERE: A child container failed during start"

Basically, I've written a springMVC application (with a relatively shotgun my way first-timer approach with regards to Spring). The project works fine on Tomcat 6. My Tomcat server doesn't start and ..

Example using Hyperlink in WPF

I've seen several suggestions, that you can add hyperlink to WPF application through Hyperlink control. Here's how I'm trying to use it in my code: <Window xmlns="http://schemas.microsof..

SQL Inner-join with 3 tables?

I'm trying to join 3 tables in a view; here is the situation: I have a table that contains information of students who are applying to live on this College Campus. I have another table that lists the..

Sublime Text 2 Code Formatting

First let me say I come from a Microsoft background and Visual Studio is my bread and butter. It has a command (keybind is arbitrary) that auto-formats any code syntax. The same command works in HTM..

The remote certificate is invalid according to the validation procedure

Running the following code, I get an exception: using (var client = new Pop3Client()) { client.Connect(provider.ServerWithoutPort, provider.Port, true); } The Exception I get: The remote certi..

The calling thread cannot access this object because a different thread owns it

My code is as below public CountryStandards() { InitializeComponent(); try { FillPageControls(); } catch (Exception ex) { MessageBox.Show(ex.Message, "Coun..

presentViewController and displaying navigation bar

I have a view controller hierarchy and the top-most controller is displayed as a modal and would like to know how to display the navigation bar when using 'UIViewController:presentViewController:vie..

Transparent control over PictureBox

In my C# Form I have a Label that displays a download percentage in the download event: this.lblprg.Text = overallpercent.ToString("#0") + "%"; The Label control's BackColor property is set to be..

How to get a value inside an ArrayList java

I am trying to get a value from with in an ArrayList. Here is a sample of my code: public static void main (String [] args){ Car toyota= new Car("Toyota", "$10000", "300"+ "2003"); Car nissa..

How to 'foreach' a column in a DataTable using C#?

How do I loop through each column in a datarow using foreach? DataTable dtTable = new DataTable(); MySQLProcessor.DTTable(mysqlCommand, out dtTable); foreach (DataRow dtRow in dtTable.Rows) { //f..

What is limiting the # of simultaneous connections my ASP.NET application can make to a web service?

I have an ASP.NET 4.0 application running atop IIS 7.5 on a 64-bit Windows Server 2008 R2 Enterprise machine with gobs of RAM, CPU, disk, etc. With every web request, the ASP.NET application makes a ..

No more data to read from socket error

We are using Oracle as the database for our Web application. The application runs well most of the time, but we get this "No more data to read from socket" error. Caused by: java.sql.SQLRecoverableEx..

The 'packages' element is not declared

When using mvc 3 project with vs 2010 I have lots of warnings like the ones below: I wonder if I did something wrong and I need to change something, because this is the out of the box project..

SSL handshake alert: unrecognized_name error since upgrade to Java 1.7.0

I upgraded from Java 1.6 to Java 1.7 today. Since then an error occur when I try to establish a connection to my webserver over SSL: handshake alert: unrecognized..

OpenSSL and error in reading openssl.conf file

I am running windows xp 32bit I just downloaded Openssl from the following URL and installed it. and then i tried to create a self signed certifica..

How to style the option of an html "select" element?

Here's my HTML: <select id="ddlProducts" name="ddProducts"> <option>Product1 : Electronics </option> <option>Product2 : Sports </option> </select> I wa..

Sequel Pro Alternative for Windows

Well my macbook pro is kind of not cutting it for me anymore and I have a perfectly good Windows Laptop I would actually rather use but I cannot find a reliable replacement for my SQL client. So I am ..

How to quit android application programmatically

I Found some codes for quit an Android application programatically. By calling any one of the following code in onDestroy() will it quit application entirely? System.runFinalizersOnExit(true) ..

Using grep to search for hex strings in a file

I have been trying all day to get this to work. Does anyone know how to get grep, or something of the like, to retrieve offsets of hex strings in a file? I have a bunch of hexdumps that I need to che..

Web.Config Debug/Release

I know that web.config in Visual Studio 2010 provides the ability to switch from databases from Debug mode to Release mode. Here is my Web.Release.config: <?xml version="1.0"?> <!-- For m..

Unable to find the wrapper "https" - did you forget to enable it when you configured PHP?

The problem is in the question. I've done a thorough investigation for solutions in regards to this and I know there are topics to this and I've followed them too and nothing has worked. That being sa..

Exception: There is already an open DataReader associated with this Connection which must be closed first

I have below code and I am getting exception: There is already an open DataReader associated with this Connection which must be closed first. I am using Visual Studio 2010/.Net 4.0 and MySQL for..

what does this mean ? image/png;base64?

I don't know what we call this. but i found a image at google 404 url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKsAAADVCAMAAAAfHvCaAAAAGFBMVEVYn%2BH%2F%2F%2F%2Bex%2B3U5vd7s%2Bfq8%2Fs0itq72PMLUP..

Get folder name from full file path

How do I get the folder name from the full path of the application? This is the file path below, c:\projects\root\wsdlproj\devlop\beta2\text Here "text" is the folder name. How can I get that fol..

How do I write a method to calculate total cost for all items in an array?

I'm stuck. This is what I have written so far, but I don't know how to set up for a method call to prompt for the total. I need the individual totals for all items in the array to be added to get a to..

How to hide a TemplateField column in a GridView

How can I hide a TemplateField column in a GridView? I tried the following: <asp:TemplateField ShowHeader="False" Visible='<%# MyBoolProperty %>' > <ItemTemplate> <asp:LinkB..

How to set Android camera orientation properly?

I want to set the camera orientation according to the device orientation in Android but nothing seems to be working. I tried to rotate the Surface as well as the camera parameters but the camera previ..

How to use table variable in a dynamic sql statement?

In my stored procedure I declared two table variables on top of my procedure. Now I am trying to use that table variable within a dynamic sql statement but I get this error at the time of execution of..

Merge two (or more) lists into one, in C# .NET

Is it possible to convert two or more lists into one single list, in .NET using C#? For example, public static List<Product> GetAllProducts(int categoryId){ .... } . . . var productCollection..

JSF(Primefaces) ajax update of several elements by ID's

One more question concerning JSF.Particularly, Primefaces. Have following problem with ajax update of elements by id's at same time. If elements on page goes one by one ,that ajax update performs ok: ..

"The page you are requesting cannot be served because of the extension configuration." error message

I'm getting this error message when trying to run my application. I don't know how to fix it: HTTP Error 404.3 - Not Found The page you are requesting cannot be served because of the extension..

Detect touch press vs long press vs movement?

I'm currently fiddling around with Android programming, but I have a small problem detecting different touch events, namely a normal touch press (press on the screen and release right away), a long pr..

Reload chart data via JSON with Highcharts

I am trying to reload the data for a Highcharts chart via JSON based on a button click elsewhere in the page. Initially I would like to display a default set of data (spending by category) but then lo..

.Net picking wrong referenced assembly version

I just copied an existing project to a brand new machine to start developing on it and have run into a problem with the version of one of my referenced assemblies (a telerik DLL as it happens). The p..

jQuery plugin returning "Cannot read property of undefined"

I'm trying to do something i've done numerous times. I can't figure out why this isn't working. No matter how i write the jQuery code, it doesn't work. menuitems[i].action() just does NOT work. Below ..

Convert array into csv

How to convert an array into a CSV file? This is my array: stdClass Object ( [OrderList_RetrieveByContactResult] => stdClass Object ( [OrderDetails] => stdClass Object..

How to delete last character in a string in C#?

Building a string for post request in the following way, var itemsToAdd = sl.SelProds.ToList(); if (sl.SelProds.Count() != 0) { foreach (var item in itemsToAdd) { paramstr =..

How can I pass a file argument to my bash script using a Terminal command in Linux?

So my question is how can I pass a file argument to my bash script using a Terminal command in Linux? At the moment I'm trying to make a program in bash that can take a file argument from the Terminal..

Performance of FOR vs FOREACH in PHP

First of all, I understand in 90% of applications the performance difference is completely irrelevant, but I just need to know which is the faster construct. That and... The information currently ava..

Specifying number of decimal places in Python

When accepting user input with a decimal in Python I'm using: #will input meal subtotal def input_meal(): mealPrice = input('Enter the meal subtotal: $') mealPrice = float (mealPrice)..

Actual meaning of 'shell=True' in subprocess

I am calling different processes with the subprocess module. However, I have a question. In the following codes: callProcess = subprocess.Popen(['ls', '-l'], shell=True) and callProcess = subpro..

How do I list all tables in all databases in SQL Server in a single result set?

I am looking for T-SQL code to list all tables in all databases in SQL Server (at least in SS2005 and SS2008; would be nice to also apply to SS2000). The catch, however, is that I would like a single ..

Java string replace and the NUL (NULL, ASCII 0) character?

Testing out someone elses code, I noticed a few JSP pages printing funky non-ASCII characters. Taking a dip into the source I found this tidbit: // remove any periods from first name e.g. Mr. John --..

Android Webview - Completely Clear the Cache

I have a WebView in one of my Activities, and when it loads a webpage, the page gathers some background data from Facebook. What I'm seeing though, is the page displayed in the application is the sam..

smtpclient " failure sending mail"

here is my code for(int i = 0; i < number ; i++) { MailAddress to = new MailAddress(; MailAddress from = new MailAddress(iMail.from, iMail.displayName); string body = iMail.bod..

How can I bind a background color in WPF/XAML?

What do I have to change to the following code so that the background is red, neither of the 2 ways I tried worked: (source: XAML: <Window x:Class="TestBackground88238.Window..

Simulating a click in jQuery/JavaScript on a link

I want to simulate a click on any link on a page using JavaScript. If that link has some function binded to its 'onclick' event (by any other JS I don't have any control over), then that function must..

How to get a List<string> collection of values from app.config in WPF?

The following example fills the ItemsControl with a List of BackupDirectories which I get from code. How can I change this so that I get the same information from the app.config file? XAML: <Win..

System.Data.SqlClient.SqlException: Invalid object name 'dbo.Projects'

My MVC app is returning SqlExceptions when trying to access any table in my database. Exception Details: System.Data.SqlClient.SqlException: Invalid object name 'dbo.Projects'. My app us linq for th..

How do I extract data from a DataTable?

I have a DataTable that is filled in from an SQL query to a local database, but I don't know how to extract data from it. Main method (in test program): static void Main(string[] args) { const st..

How to [recursively] Zip a directory in PHP?

Directory is something like: home/ file1.html file2.html Another_Dir/ file8.html Sub_Dir/ file19.html I am using the same PHP Zip class used in PHPMyAdmin http://trac.seagul..

jQuery UI " $("#datepicker").datepicker is not a function"

When i use DatePicker, jQuery's UI plugin, in an existing .aspx page I get errors that: $("#datepicker").datepicker is not a function However, when I copy and paste the same code that creates and u..

How can I change NULL to 0 when getting a single value from a SQL function?

I have a query that counts the price of all items between two dates. Here is the select statement: SELECT SUM(Price) AS TotalPrice FROM Inventory WHERE (DateAdded BETWEEN @StartDate AND @EndDate) ..

How can I join on a stored procedure?

I have a stored procedure that takes no parameters, and it returns two fields. The stored procedure sums up all transactions that are applied to a tenant, and it returns the balance and the id of the ..

How do I solve this error, "error while trying to deserialize parameter"

I have a web service that is working fine in one environment but not in another. The web service gets document meta data from SharePoint, it running on a server where I cant debug but with logging I ..

Large WCF web service request failing with (400) HTTP Bad Request

I've encountered this apparently common problem and have been unable to resolve it. If I call my WCF web service with a relatively small number of items in an array parameter (I've tested up to 50), ..

"The Controls collection cannot be modified because the control contains code blocks"

I am trying to create a simple user control that is a slider. When I add a AjaxToolkit SliderExtender to the user control I get this (*&$#()@# error: Server Error in '/' Application. The Control..

"The remote certificate is invalid according to the validation procedure." using Gmail SMTP server

I'm getting this error: The remote certificate is invalid according to the validation procedure. whenever I try to send e-mail using Gmail's SMTP server in my C# code. Can someone point me to th..

Finding the id of a parent div using Jquery

I have some html like this: <div id="1"> <p> Volume = <input type="text" /> <button rel="3.93e-6" class="1" type="button">Check answer</button> &..

How to make sure you don't get WCF Faulted state exception?

I am getting this exception: The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state. The WCF service us..

Apache Name Virtual Host with SSL

I am attempting to setup our servers to allow traffic over SSL. I am aware that SSL does not work with Name Virtual Host, but we have all of our apache servers on virtual machines with dedicated priv..


I have to perform the following SQL query: select answer_nbr, count(distinct user_nbr) from tpoll_answer where poll_nbr = 16 group by answer_nbr The LINQ to SQL query from a in tpoll_answer wher..

Proper use of 'yield return'

The yield keyword is one of those keywords in C# that continues to mystify me, and I've never been confident that I'm using it correctly. Of the following two pieces of code, which is the preferred a..

How do you implement a good profanity filter?

Many of us need to deal with user input, search queries, and situations where the input text can potentially contain profanity or undesirable language. Oftentimes this needs to be filtered out. Where.. - Add blank item at top of dropdownlist

Why is the dropdown not showing my blank item first? Here is what I have drpList.Items.Add(New ListItem("", "")) With drpList .DataSource = myController.GetList(userid) .DataTextField = "Nam..

What's the foolproof way to tell which version(s) of .NET are installed on a production Windows Server?

This question is not so much programming related as it is deployment related. I find myself conversing a lot with the group in my company whose job it is to maintain our production Windows servers an..

Byte Array to Hex String

I have data stored in a byte array. How can I convert this data into a hex string? Example of my byte array: array_alpha = [ 133, 53, 234, 241 ] ..

Accessing value inside nested dictionaries

I am new to python and need help in solving an issue: I have a dictionary like tmpDict = {'ONE':{'TWO':{'THREE':10}}} Do we have any other way to access THREE's value other than doing tmpDict['..

Capitalize or change case of an NSString in Objective-C

I was wondering how to capitalize a string found in an object in an NSMutableArray. An NSArray contains the string 'April' at index 2. I want this to be changed to 'APRIL'. Is there something simple..

Generating random strings with T-SQL

If you wanted to generate a pseudorandom alphanumeric string using T-SQL, how would you do it? How would you exclude characters like dollar signs, dashes, and slashes from it?..

How to represent a fix number of repeats in regular expression?

I am wondering if there is a better to represent a fix amount of repeats in a regular expression. For example, if I just want to match exactly 14 letters/digits, I am using ^\w\w\w\w\w\w\w\w\w\w\w\w\w..

Github: error cloning my private repository

I'm trying to clone my GitHub project using the https-URL, but it fails with an error: $ git clone https://[email protected]/foo/foo-private.git Cloning into foo-private... Password: error: error settin..

Replace preg_replace() e modifier with preg_replace_callback

I'm terrible with regular expressions. I'm trying to replace this: public static function camelize($word) { return preg_replace('/(^|_)([a-z])/e', 'strtoupper("\\2")', $word); } with preg_replac..

Border Radius of Table is not working

I want to add a border radius around the entire table. But the following code is not working in both the latest versions of Firefox and Google Chrome. HTML <table class="bordered"> <the..

X11/Xlib.h not found in Ubuntu

I'm trying to write a rather trivial program using open gl on linux, but at a compile time it says: Compile thumb : egl <= cuberenderer.c In file included from /path/include/egl.h:36, ..

PHP - Extracting a property from an array of objects

I've got an array of cats objects: $cats = Array ( [0] => stdClass Object ( [id] => 15 ), [1] => stdClass Object ( ..

How do I redirect to the previous action in ASP.NET MVC?

Lets suppose that I have some pages some.web/articles/details/5 some.web/users/info/bob some.web/foo/bar/7 that can call a common utility controller like locale/change/es or authorization/login ..

How to print a debug log?

I'd like to debug some PHP code, but I guess printing a log to screen or file is fine for me. How should I print a log in PHP code? The usual print/printf seems to go to HTML output not the consol..

How to disable Paste (Ctrl+V) with jQuery?

How can I disable Paste (Ctrl+V) option using jQuery in one of my input text fields?..

Date format Mapping to JSON Jackson

I have a Date format coming from API like this: "start_time": "2015-10-1 3:00 PM GMT+1:00" Which is YYYY-DD-MM HH:MM am/pm GMT timestamp. I am mapping this value to a Date variable in POJO. Obviou..

Insert multiple rows into single column

I'm new to SQL, (using SQL 2008 R2) and I am having trouble inserting multiple rows into a single column. I have a table named Data and this is what I am trying INSERT INTO Data ( Col1 ) VALUES ('He..

How to get a list of all valid IP addresses in a local network?

Is there a way to get a list of all valid IP addresses in a local network? I mean all IP addresses that each user is using in the network...

Make an Android button change background on click through XML

Is there a way to specify an alternative background image/color for a Button in the XML file that is going to be applied onClick, or do I have to do a Button.setBackground() in the onClickListener?..

Android: remove left margin from actionbar's custom layout

I am using a custom actionbar view, and as you can see in the screenshot below, there is a blank gray space in the actionbar. I want to remove it. What have I done: res/values-v11/styles.xml ..

Show MySQL host via SQL Command

Show Database Use database show tables Describe <table> All good and well, but is it possible to show the current connections host. Not connection_id, but the IP Address or Name of the host...

nginx: connect() failed (111: Connection refused) while connecting to upstream

Trying to deploy my first portal . I am getting 502 gateway timeout error in browser when i was sending the request through browser when i checked the logs , i got this error 2014/02/03 09:00:32..

Send an Array with an HTTP Get

How can i send an Array with a HTTP Get request? I'm Using GWT client to send the request...

An array of List in c#

I want to have an array of Lists. In c++ I do like: List<int> a[100]; which is an array of 100 Lists. each list can contain many elements. I don't know how to do this in c#. Can anyone help m..

How to fix the "508 Resource Limit is reached" error in WordPress?

508 Resource Limit is reached - Wordpress This error occurs again and again, and I can't post a single post without seeing this error: The website is temporarily unable to service your reques..

Equivalent of Clean & build in Android Studio?

Today while running an app from Android Studio, it didn't build from my latest code. I looked for a Clean & build option but I couldn't find one. So my question is: what is Android Studio's equi..

what is the unsigned datatype?

I've seen this unsigned "typeless" type used a couple of times, but never seen an explanation for it. I suppose there's a corresponding signed type. Here's an example: static unsigned long next = 1; ..

Javac is not found

I'm running Windows 8 and I can not get javac to work. I have set my PATH in environmental variables to C:\Program Files (x86)\Java\jdk1.7.0_17\bin I have tried both with and without ';' but to ..

'IF' in 'SELECT' statement - choose output value based on column values

SELECT id, amount FROM report I need amount to be amount if report.type='P' and -amount if report.type='N'. How do I add this to the above query?..

How to get first character of a string in SQL?

I have a SQL column with a length of 6. Now want to take only the first char of that column. Is there any string function in SQL to do this?..

How do I split a multi-line string into multiple lines?

I have a multi-line string literal that I want to do an operation on each line, like so: inputString = """Line 1 Line 2 Line 3""" I want to do something like the following: for line in inputString..

Preserve line breaks in angularjs

I have seen this SO question. My code instead of ng-bind="item.desc" uses {{item.desc}} because I have a ng-repeat before. So my code: <div ng-repeat="item in items"> {{item.description}} &..

Adding Apostrophe in every field in particular column for excel

How can you add an apostrophe in every field in an Excel spreadsheet without individually typing it in? I have got like 5k fields ..

In git how is fetch different than pull and how is merge different than rebase?

I just cant understand this. I been reading a lot on the web and books and something is just not staying in my head. Can someone please give me the dummy version of the following: git fetch vs pull ..

What is a daemon thread in Java?

Can anybody tell me what daemon threads are in Java?..

Python+OpenCV: cv2.imwrite

I'm trying to detect a face and write down area with the face in a separate file. How can I do it? I think that i must use "faces" (you can see this var in code). But how? from ffnet import mlgraph, ..

Check if current date is between two dates Oracle SQL

I would like to select 1 if current date falls between 2 dates through Oracle SQL. I wrote an SQL after reading through other questions.

Render HTML in React Native

In my React Native app, I am pulling in JSON data that has raw HTML elements like this: <p>This is some text. Let&#8217;s figure out...</p> I've added the data to a view in my app lik..

Index of element in NumPy array

In Python we can get the index of a value in an array by using .index(). But with a NumPy array, when I try to do: decoding.index(i) I get: AttributeError: 'numpy.ndarray' object has no attribute 'i..

Android ADB devices unauthorized

Configuration: Windows 8.1 ADB version: 1.0.32 Smartphone: Oneplus One Problem I installed the Samsung drivers as it is said to do. When I run the ADB devices command, it said unauthorized. Alre..

Uncaught SyntaxError: Unexpected token :

I am running an AJAX call in my MooTools script, this works fine in Firefox but in Chrome I am getting a Uncaught SyntaxError: Unexpected token : error, I cannot determine why. Commenting out code to ..

What's the difference between primitive and reference types?

This is a past exam question and I was wondering what a primitive type and reference type are first off? With an array I know the a reference type is where the array is composed of objects or variable..

Convert array to JSON string in swift

How do you convert an array to a JSON string in swift? Basically I have a textfield with a button embedded in it. When button is pressed, the textfield text is added unto the testArray. Furthermore, I..

What is the difference between application server and web server?

What is the difference between application server and web server?..

Laravel form html with PUT method for PUT routes

I Have this in my routes : +--------+---------------------------+--------------+--------------------------- ..

How to set the LDFLAGS in CMakeLists.txt?

I set the CFLAGS in CMake by CMAKE_C_FLAGS. Is something like this to set LDFLAGS?..

How do you read a file into a list in Python?

I want to prompt a user for a number of random numbers to be generated and saved to a file. He gave us that part. The part we have to do is to open that file, convert the numbers into a list, then fin..

Error message Strict standards: Non-static method should not be called statically in php

I have the following php. However when I see the index.php I get the following error message. Strict standards: Non-static method Page::getInstanceByName() should not be called statically in ..

Register comdlg32.dll gets Regsvr32: DllRegisterServer entry point was not found

I have Windows 7, 64-bit. I'm trying to register a .dll (comdlg32.dll) using regsvr32. But I get an error that says the dll is read but the DLLRegistryServer entry point is not found. I have run the..

byte[] to hex string

How do I convert a byte[] to a string? Every time I attempt it, I get System.Byte[] instead of the value. Also, how do I get the value in Hex instead of a decimal?..

Check input value length

I have a problem with input checking. I don't want to send the request if the input length is less than 3. My form: <form method='post' action=''> Albuma nosaukums: # # this is the input -..

Use PHP to create, edit and delete crontab jobs?

Is it possible to use PHP to create, edit and delete crontab jobs? I know how to list the current crontab jobs of the Apache user: $output = shell_exec('crontab -l'); echo $output; But how to add ..

How to start an application using android ADB tools?

How do I send an intent using Android's ADB tools?..

Laravel is there a way to add values to a request array

I come across a situation in Laravel while calling a store() or update() method with Request parameter to add some additional value to the request before calling Eloquent functions is there any way fo..

Developing for Android in Eclipse: not regenerating

I've found out that my is never updated, so it doesn't contain information about my new resources, so I decided to delete it and thought that Eclipse would generate a new one. But that didn't h..

failed to resolve and

I installed ALL Extra and SDK API 21-22 including changed compileSdkVersion 22 to 21 and buildToolsVersion '22.0.1' to 21.1.2. I'm having Rendering Problems for API 22. I have tried changing the versi..

Difference between HashSet and HashMap?

Apart from the fact that HashSet does not allow duplicate values, what is the difference between HashMap and HashSet? I mean implementation wise? It's a little bit vague because both use hash tables ..

How to delete empty folders using windows command prompt?

I need to delete all empty folders from my application folder using windows command prompt? How can I create a bat file like that? Please help me...

Case insensitive 'in'

I love using the expression if 'MICHAEL89' in USERNAMES: ... where USERNAMES is a list. Is there any way to match items with case insensitivity or do I need to use a custom method? Just wond..

Changing background color of selected item in recyclerview

How to change the background color of only selected view in my recycle view example?only the background color of clicked itemview needs to be changed. Only one selected item must be displayed with bac..

How to choose the right bean scope?

I noticed that there are different bean scopes like: @RequestScoped @ViewScoped @FlowScoped @SessionScoped @ApplicationScoped What is the purpose of each? How do I choose a proper scope for my bean..

How can I convert a Word document to PDF?

How can I convert a Word document to PDF where the document contains various things, such as tables. When trying to use iText, the original document looks different to the converted PDF. Is there an o..

What is the time complexity of indexing, inserting and removing from common data structures?

There is no summary available of the big O notation for operations on the most common data structures including arrays, linked lists, hash tables etc...

Set a button group's width to 100% and make buttons equal width?

I'm using Bootstrap, and I'd like to set an entire btn-group to have a width of 100% of its parent element. I'd also like the inner buttons to take equal widths. As it is, I can't achieve either. I'..

How do I remove/delete a folder that is not empty?

I am getting an 'access is denied' error when I attempt to delete a folder that is not empty. I used the following command in my attempt: os.remove("/folder_name"). What is the most effective way of..

How to initialize log4j properly?

After adding log4j to my application I get the following output every time I execute my application: log4j:WARN No appenders could be found for logger (slideselector.facedata.FaceDataParser). log4j:..

casting Object array to Integer array error

What's wrong with the following code? Object[] a = new Object[1]; Integer b=1; a[0]=b; Integer[] c = (Integer[]) a; The code has the following error at the last line : Exception in thread "main..

Select rows from a data frame based on values in a vector

I have data similar to this: dt <- structure(list(fct = structure(c(1L, 2L, 3L, 4L, 3L, 4L, 1L, 2L, 3L, 1L, 2L, 3L, 2L, 3L, 4L), .Label = c("a", "b", "c", "d"), class = "factor"), X = c(2L, 4L, 3L..

Where is PATH_MAX defined in Linux?

Which header file should I invoke with #include to be able to use PATH_MAX as an int for sizing a string? I want to be able to declare: char *current_path[PATH_MAX]; But when I do so my compiler (..

What's onCreate(Bundle savedInstanceState)

Can anyone help me to know about the Bundle savedInstanceState in onCreate(Bundle savedInstanceState) I am newbie in Android. I try to understand it from But I am not able to un..

PIL image to array (numpy array to array) - Python

I have a .jpg image that I would like to convert to Python array, because I implemented treatment routines handling plain Python arrays. It seems that PIL images support conversion to numpy array, a..

Add more than one parameter in Twig path

How to add more than one parameter in Twig path? Say you have this route : article_show: pattern: /article/{slug} defaults: { _controller: AcmeArticleBundle:Article:show } You can do this ..

Turn off axes in subplots

I have the following code: import matplotlib.pyplot as plt import matplotlib.image as mpimg import as cm img = mpimg.imread("lena.jpg") f, axarr = plt.subplots(2, 2) axarr[0,0].imshow..

How to detect if a string contains at least a number?

How to detect if a string contains at least a number (digit) in SQL server 2005?..

How to find which version of TensorFlow is installed in my system?

I need to find which version of TensorFlow I have installed. I'm using Ubuntu 16.04 Long Term Support. ..

Export SQL query data to Excel

I have a query that returns a very large data set. I cannot copy and paste it into Excel which I usually do. I have been doing some research on how to export directly to an Excel sheet. I am running S..

How do I convert NSMutableArray to NSArray?

How do I convert NSMutableArray to NSArray in objective-c?..

javascript regex - look behind alternative?

Here is a regex that works fine in most regex implementations: (?<!filename)\.js$ This matches .js for a string which ends with .js except for filename.js Javascript doesn't have regex lookbehi..

How can I send an xml body using requests library?

def request(): #encoded_xml = urllib.urlencode({'XML': read_xml()}) #encoded_xml = read_xml() headers = {'Authorization': AUTH_TOKEN,\ 'developerToken': DEVELOPER_TOKEN,\ ..

How to connect TFS in Visual Studio code

I'm new to VS code. So far it seems very nice and much lighter than VS. How could I connect my existing TFS server to VS code (my TFS must stay on premises - company requirements). I read that this ca..

MySQL Join Where Not Exists

I have a MySQL query that joins two tables Voters Households They join on voters.household_id and Now what I need to do is to modify it where the voter table is joined to a third t..

estimating of testing effort as a percentage of development time

Does anyone use a rule of thumb basis to estimate the effort required for testing as a percentage of the effort required for development? And if so what percentage do you use?..

Given an RGB value, how do I create a tint (or shade)?

Given an RGB value, like 168, 0, 255, how do I create tints (make it lighter) and shades (make it darker) of the color?..

How to make Twitter bootstrap modal full screen

<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-body"> <%= image_tag "Background.jpg" %&..

How to insert spaces/tabs in text using HTML/CSS

Possible ways: <pre> ... </pre> or style="white-space:pre" Anything else?..

Using filesystem in node.js with async / await

I would like to use async/await with some filesystem operations. Normally async/await works fine because I use babel-plugin-syntax-async-functions. But with this code I run into the if case where nam..

It says that TypeError: document.getElementById(...) is null

Althought I pushed a parameter to getElementById I wonder from where is this 'is null' error coming from? TypeError: document.getElementById(...) is null [Break On This Error] document.getElemen..

Get the last 4 characters of a string

I have the following string: "aaaabbbb" How can I get the last four characters and store them in a string using Python?..

Error handling in getJSON calls

How can you handle errors in a getJSON call? Im trying to reference a cross-domain script service using jsonp, how do you register an error method? ..

Java HashMap: How to get a key and value by index?

I am trying to use a HashMap to map a unique string to a string ArrayList like this: HashMap<String, ArrayList<String>> Basically, I want to be able to access the keys by number, not by..

How to "properly" print a list?

So I have a list: ['x', 3, 'b'] And I want the output to be: [x, 3, b] How can I do this in python? If I do str(['x', 3, 'b']), I get one with quotes, but I don't want quotes...

How do I remove a CLOSE_WAIT socket connection

I have written a small program that interacts with a server on a specific port. The program works fine, but: Once the program terminated unexpectedly, and ever since that socket connection is shown i..

iOS JavaScript bridge

I'm working on an app where I'm going to use both HTML5 in UIWebView and native iOS framework together. I know that I can implement communication between JavaScript and Objective-C. Are there any libr..

Joining pandas dataframes by column names

I have two dataframes with the following column names: frame_1: event_id, date, time, county_ID frame_2: countyid, state I would like to get a dataframe with the following columns by joining (left..

How to add an element to the beginning of an OrderedDict?

I have this: d1 = OrderedDict([('a', '1'), ('b', '2')]) If I do this: d1.update({'c':'3'}) Then I get this: OrderedDict([('a', '1'), ('b', '2'), ('c', '3')]) but I want this: [('c', '3'), ('..

How to convert password into md5 in jquery?

Actually i am creating changepassword page. and this is my function of checking old password is match with the existing password or not. And that password is stored in MD5 in database so i want to fir..

expected assignment or function call: no-unused-expressions ReactJS

class Game extends Component { constructor() { super() this.state = { speed: 0 } //firebaseInit() } render() { return ( <div> <h1>T..

Batch file FOR /f tokens

Can anyone please explain exactly how the following code works, line by line. I'm really lost. I've been trying to learn how to use the FOR command but I don't understand this. @echo off for /f "tok..

Get the real width and height of an image with JavaScript? (in Safari/Chrome)

I am creating a jQuery plugin. How do I get the real image width and height with Javascript in Safari? The following works with Firefox 3, IE7 and Opera 9: var pic = $("img") // need to remove the..

Error during installing HAXM, VT-X not working

I am an entry-level Android software developer. I recently heard about HAXM that support emulator in rendering graphics more smoothly. I downloaded appropriate file HAXM file for Windows 7 64 bit, unp..

kill -3 to get java thread dump

I am using kill -3 command to see the JVM's thread dump in unix. But where can I find the output of this kill command? I am lost!!..

How to Add a Dotted Underline Beneath HTML Text

How do you underline html text so that the line beneath the text is dotted rather than the standard underline? Preferably, I would like to do this without using a separate CSS file. I'm a novice at ht..

How can I know when an EditText loses focus?

I need to catch when an EditText loses focus, I've searched other questions but I didn't find an answer. I used OnFocusChangeListener like this OnFocusChangeListener foco = new OnFocusChangeListener..

How do I get PHP errors to display?

I have checked my PHP ini file (php.ini) and display_errors is set and also error reporting is E_ALL. I have restarted my Apache webserver. I have even put these lines at the top of my script, and it..

Reading a column from CSV file using JAVA

Hi I am trying to read a CSV File called test.csv in JAVA . Below is my code : import; import; public class InsertValuesIntoTestDb { @SuppressWarnings..

How to force the input date format to dd/mm/yyyy?

I have a little problem. I am developing a web system and the form field type date is giving me a headache. The system will be for Brazil only users, then the date format should be dd/mm/yyyy. When ac..

IOS 7 Navigation Bar text and arrow color

I want to set background for Navigation Bar to be black and all colors inside it to be white. So, I used this code : [[UINavigationBar appearance] setTitleTextAttributes: [NSDictionary dictiona..

How do I write the 'cd' command in a makefile?

For example, I have something like this in my makefile: all: cd some_directory But when I typed make I saw only 'cd some_directory', like in the echo command...

Redirect to a page/URL after alert button is pressed

i have referred to this two questions call php page under Javascript function and Go to URL after OK button in alert is pressed. i want to redirect to my index.php after an alert box is called. my ale..

How to create virtual column using MySQL SELECT?

If I do SELECT a AS b and b is not a column in the table, would query create the "virtual" column? in fact, I need to incorporate some virtual column into the query and process some information into ..

AngularJS $http, CORS and http authentication

Because using CORS and http authentication with AngularJS can be tricky I edited the question to share one learned lesson. First I want to thank igorzg. His answer helped me a lot. The scenario is the..

What's the best way to get the current URL in Spring MVC?

I'd like to create URLs based on the URL used by the client for the active request. Is there anything smarter than taking the current HttpServletRequest object and it's getParameter...() methods to re..

Early exit from function?

I have a function: function myfunction() { if (a == 'stop') // How can I stop the function here? } Is there something like exit() in JavaScript?..

SQL Server 2012 can't start because of a login failure

I recently installed Microsoft SQL Server 2012 on a fresh Windows 7 installation, but whenever I want to run the server, I get the following error: Error 1069: The service did not start due to a l..

how can I check if a file exists?

I want to check to see if a file exists and if it does, I want to open it and read the 1st line, If the file doesn't exist or if the file has no contents then I want to fail silently without letting ..

Python: can't assign to literal

My task is to write a program that asks the user to enter 5 names which it stores in a list. Next, it picks one of these names at random and declares that person as the winner. The only issue is that ..

What exactly does the "u" do? "git push -u origin master" vs "git push origin master"

I'm apparently terrible at using git, despite my best attempts to understand it. From for git push: -u --set-upstream For every branch that is up to date or successfully pus..

Comparing Dates in Oracle SQL

I'm trying to get it to display the number of employees that are hired after June 20, 1994, Select employee_id, count(*) From Employee Where to_char(employee_date_hired, 'DD-MON-YY') > 31-DEC-95; ..

what does Error "Thread 1:EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)" mean?

I got this error: Thread 1:EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0) How can I solve this? The code works normally, but in the calculator when I click the only equal button, it give..

How do I make this executable via double click?

First off I'm using Mac. Next, I need to execute this "" we will call it. Everytime I need to execute it I have to open Terminal and type: cd /Users/Jacob/Documents/folderWithFileInIt bash fi..

Float and double datatype in Java

The float data type is a single-precision 32-bit IEEE 754 floating point and the double data type is a double-precision 64-bit IEEE 754 floating point. What does it mean? And when should I use float ..

Could not find the main class, program will exit

I made an executable jar with the command prompt in Windows 7 using the jar cvfm MyJarName.jar manifest.txt *.class which created the .jar file. But when I attempt to open it, I get a pop-up window..

How to write DataFrame to postgres table?

There is DataFrame.to_sql method, but it works only for mysql, sqlite and oracle databases. I cant pass to this method postgres connection or sqlalchemy engine...

Tooltip on image

I am using the tooltip. But I want that on image tag, like when I mouseover the image then the tooltip should work. I have tried but not working for me on image tag...

Convert string date to timestamp in Python

How to convert a string in the format "%d/%m/%Y" to timestamp? "01/12/2011" -> 1322697600 ..

Parallel foreach with asynchronous lambda

I would like to handle a collection in parallel, but I'm having trouble implementing it and I'm therefore hoping for some help. The trouble arises if I want to call a method marked async in C#, withi..

Python initializing a list of lists

Possible Duplicate: List of lists changes reflected across sublists unexpectedly I intend to initialize a list of list with length of n. x = [[]] * n However, this somehow links the lists together..

PHP Redirect to another page after form submit

I have read all your posts about inserting headers into a php form file in order to redirect the user to another URL AFTER the form is submitted - but I can't figure out how to do it. Below is my cod..

How to extract the n-th elements from a list of tuples?

I'm trying to obtain the n-th elements from a list of tuples. I have something like: elements = [(1,1,1),(2,3,7),(3,5,10)] I wish to extract only the second elements of each tuple into a list: se..

open_basedir restriction in effect. File(/) is not within the allowed path(s):

I'm getting this error on an avatar upload on my site. I've never gotten it before and nothing was changed recently for me to begin getting this error... Warning: is_writable() [

Using Python Requests: Sessions, Cookies, and POST

I am trying to scrape some selling data using the StubHub API. An example of this data seen here: You'll notice that if you tr..

Docker compose port mapping

I have a docker-compose yml file as in below version: '2' services: nodejs: build: context: . dockerfile: DockerFile ports: - "4000:4000" links: - redis expo..

How to run .sql file in Oracle SQL developer tool to import database?

I have exported database from Oracle SQL developer tool into .sql file. Now I want to run this file which is of size 500+ MB. I read about running scripts here, but I didn't understand the way. Is th..

Bash: Strip trailing linebreak from output

When I execute commands in Bash (or to be specific, wc -l < log.txt), the output contains a linebreak after it. How do I get rid of it?..

How to insert values into the database table using VBA in MS access

I've started to use access recently. I am trying to insert a few rows into the database; however, I am stuck as it is throwing an error: Too few parameters. I have a table test with only one co..

How do I compare two strings in python?

I have two strings like string1="abc def ghi" and string2="def ghi abc" How to get that this two string are same without breaking the words?..

Android ADB stop application command like "force-stop" for non rooted device

I'm trying to stop application on Android 2.3.7 device. But in this version of Android I can't use "force-stop" command. Do you know any other ways to close application on non rooted device?..

Linux: command to open URL in default browser

What command we have to execute (from Java, but that should not matter) on Linux (different common distributions) to open a given URL in the default browser?..

How to Sign an Already Compiled Apk

I've decoded an APK with apktool (as the original source code was lost) so I could fix some issues with the layout xml files. I've then rebuilt it back up with apktool and when I tried to install it o..

Calling Java from Python

What is the best way to call java from python? (jython and RPC are not an option for me). I've heard of JCC: a C++ code generator for calling Java from C++/Python ..

Text blinking jQuery

What is an easy way to make text blinking in jQuery and a way to stop it? Must work for IE, FF and Chrome. Thanks..

Extract names of objects from list

I have a list of objects. How do I grab the name of just one object from the list? As in: LIST <- list(A=1:5, B=1:10) LIST$A$A) #function I hope exists "A" #yay! it..

Hide/Show Action Bar Option Menu Item for different fragments

I have a Sherlock Fragment Activity in which there are 3 Fragments. Fragment A, Fragment B, Fragment C are three fragments. I want to show a done option menu in Fragment B only. And the activity is ..

How do I get textual contents from BLOB in Oracle SQL

I am trying to see from an SQL console what is inside an Oracle BLOB. I know it contains a somewhat large body of text and I want to just see the text, but the following query only indicates that the..

How do I subscribe to all topics of a MQTT broker

I want to connect a client which will monitor all the topics of the broker to respond to the events when I don't know what are names of topic...

Returning data from Axios API

I am trying to use a Node.JS application to make and receive API requests. It does a get request to another server using Axios with data it receives from an API call it receives. The second snippet is..

Can't create handler inside thread that has not called Looper.prepare() inside AsyncTask for ProgressDialog

I don't understand why I'm getting this error. I'm using AsyncTask to run some processes in the background. I have: protected void onPreExecute() { connectionProgressDialog = new ProgressDialog..

How do I convert NSInteger to NSString datatype?

How does one convert NSInteger to the NSString datatype? I tried the following, where month is an NSInteger: NSString *inStr = [NSString stringWithFormat:@"%d", [month intValue]]; ..

How to add a classname/id to React-Bootstrap Component?

Suppose we are using Row from React-Bootstrap... How do we style it without using a wrapper or inner element: <Row> <div className='some-style'> ... </Row> Ideally, we could ju..

Cannot serve WCF services in IIS on Windows 8

When I try to serve a WCF service on IIS in a Windows 8 machine, I get the well known error The page you are requesting cannot be served because of the extension configuration. If the page is a sc..

get all characters to right of last dash

I have the following: string test = "9586-202-10072" How would I get all characters to the right of the final - so 10072. The number of characters is always different to the right of the last dash...

stdlib and colored output in C

I am making a simple application which requires colored output. How can I make my output colored like emacs and bash do? I don't care about Windows, as my application is only for UNIX systems...

"%%" and "%/%" for the remainder and the quotient

I am wondering how and why the operator %% and %/% are for the remainder and the quotient. Is there any reason or history that R developer had given them the meaning they have? > 0 %/% 10 [1] 0 ..

using awk with column value conditions

I'm learning awk from The AWK Programming Language and I have a problem with one of the examples. If I wanted to print $3 if $2 is equal to a value (e.g.1), I was using this command which works fine:..

Validating input using java.util.Scanner

I'm taking user input from using a java.util.Scanner. I need to validate the input for things like: It must be a non-negative number It must be an alphabetical letter ... etc What's the ..

How to compare two dates in php

How to compare two dates in php if dates are in format '03_01_12' and '31_12_11' . I am using this code: $date1=date('d_m_y'); $date2='31_12_11'; if(strtotime($date1) < strtotime($date2)) echo..

show dbs gives "Not Authorized to execute command" error

I've spent some time trying to figure out what is wrong but as I could not find out, I decided to ask here. I am running MongoDB(Windows 64-bit 2008 R2+) version 3.2.3 on Windows 8, the paths are : ..

What does [object Object] mean? (JavaScript)

One of my alerts is giving the following result: [object Object] What does this mean exactly? (This was an alert of some jQuery object.)..

Radio Buttons ng-checked with ng-model

In my HTML page, I have two sets of Boolean based radio buttons: Labeled: "Yes" and "No" / Values: True and False respectively. I'm populating a full form from a PostgreSQL database table to allow the..

How to debug heap corruption errors?

I am debugging a (native) multi-threaded C++ application under Visual Studio 2008. On seemingly random occasions, I get a "Windows has triggered a break point..." error with a note that this..

How to call a method defined in an AngularJS directive?

I have a directive, here is the code : .directive('map', function() { return { restrict: 'E', replace: true, template: '<div></div>', link: function($..

How to get records randomly from the oracle database?

I need to select rows randomly from an Oracle DB. Ex: Assume a table with 100 rows, how I can randomly return 20 of those records from the entire 100 rows. ..

Steps to send a https request to a rest service in Node js

What are the steps to send a https request in node js to a rest service? I have an api exposed like

How to check not in array element

I am trying to check if an element is not in array than want to redirect page: My code is as below: $id = $access_data['Privilege']['id']; if(!in_array($id,$user_access_arr)) { $this->Session..

How to create a DB for MongoDB container on start up?

I am working with Docker and I have a stack with PHP, MySQL, Apache and Redis. I need to add MongoDB now so I was checking the Dockerfile for the latest version and also the file ..

JavaScript data grid for millions of rows

I need to present a large number of rows of data (ie. millions of rows) to the user in a grid using JavaScript. The user shouldn't see pages or view only finite amounts of data at a time. Rather, it..

How can I get a list of all open named pipes in Windows?

Is there an easy way to test whether your named pipe is working correctly? I want to make sure that the data I'm sending from my app is actually being sent. Is there a quick and easy way to get a list..

Adding a Scrollable JTextArea (Java)

I am trying to add a scroll bar to a JTextArea. Would someone please tell me what I did wrong with the code below? JFrame frame = new JFrame ("Test"); JTextArea textArea = new JTextArea ("Test"); JS..

How to escape regular expression special characters using javascript?

I need to escape the regular expression special characters using java script.How can i achieve this?Any help should be appreciated. Thanks for your quick reply.But i need to escape all the special ..

How can I make a float top with CSS?

I know that CSS only supports left and right values for the float property, but is there a technique to implement a floating top? I will try to explain. I have the following code: <div style="floa..

Clear History and Reload Page on Login/Logout Using Ionic Framework

I am new to mobile application development with Ionic. On login and logout I need to reload the page, in order to refresh the data, however, $state.go('mainPage') takes the user back to the view witho..

Passing an array as an argument to a function in C

I wrote a function containing array as argument, and call it by passing value of array as follows. void arraytest(int a[]) { // changed the array a a[0]=a[0]+a[1]; a[1]=a[0]-a[1]; a[0..

How to build a JSON array from mysql database

Okay I have been racking my brain trying to build a JSON array from mysql. The array MUST be in the following format. I am using fullcalendar and want to make the events on the calendar dynamic. Below..

How to get the background color code of an element in hex?

How do I get the background color code of an element? _x000D_ _x000D_ console.log($(".div").css("background-color"));_x000D_ <script src="

How to delete shared preferences data from App in Android

How do I delete SharedPreferences data for my application? I'm creating an application that uses a lot of web services to sync data. For testing purposes, I need to wipe out some SharedPreferences va..

How can I hide an HTML table row <tr> so that it takes up no space?

How can I hide an HTML table row <tr> so that it takes up no space? I have several <tr>'s set to style="display:none;", but they still affect the size of the table and the table's border ..

Mean per group in a data.frame

I have a data.frame and I need to calculate the mean per group (i.e. per Month, below). Name Month Rate1 Rate2 Aira 1 12 23 Aira 2 18 73 Aira 3 ..

I want to load another HTML page after a specific amount of time

I have one html page "form1.html" which has an animated image. I want to load another page "form2.html" after 5 seconds. How do I do this?..

What's the difference between Perl's backticks, system, and exec?

Can someone please help me? In Perl, what is the difference between: exec "command"; and system("command"); and print `command`; Are there other ways to run shell commands too?..

Set focus to field in dynamically loaded DIV

What is the proper method to set the focus to a specific field within a dynamically loaded DIV? $("#display").load("?control=msgs"); // loads the HTML into the DIV $('#display').fadeIn("fast"); // di..

How do I copy a hash in Ruby?

I'll admit that I'm a bit of a ruby newbie (writing rake scripts, now). In most languages, copy constructors are easy to find. Half an hour of searching didn't find it in ruby. I want to create a copy..

resize font to fit in a div (on one line)

There have been similar questions asked, but the solutions do mesh with what I'm trying to do. Basically, I have an article with a title (<h1>). I don't want to control the length of the title..

gpg: no valid OpenPGP data found

I am trying to install Jenkins on Ubuntu 13.10 and I am getting the above mentioned error when i try to run the following command: wget -q -O - | s..

jQuery select child element by class with unknown path

I am trying to figure out the syntax for selecting a nth-child of an element by its class, however I don't know the exact path to the element. I can't do $('parent > child > grandchild > here..

Postgresql, update if row with some unique value exists, else insert

I have a URLs table. They contain (id int primary key, url character varying unique, content character varying, last analyzed date). I want to create trigger or something(rule may be), so each ..

Regex empty string or email

I found a lot of Regex email validation in SO but I did not find any that will accept an empty string. Is this possible through Regex only? Accepting either empty string or email only? I want to hav..

SQLite Query in Android to count rows

I'm trying to create a simple Login form, where I compare the login id and password entered at the login screen with that stored in the database. I'm using the following query: final String DATABASE..

SQL Server query to find all current database names

I need a SQL query to find the names of existing databases...

Access item in a list of lists

If I have a list of lists and just want to manipulate an individual item in that list, how would I go about doing that? For example: List1 = [[10,13,17],[3,5,1],[13,11,12]] What if I want to take..

What is the difference between signed and unsigned variables?

I have seen these mentioned in the context of C and C++, but what is the difference between signed and unsigned variables? ..

Permission denied when launch python script via bash

# ./scripts/ bash: ./scripts/ Permission denied has chmod 600 # ls -l ./scripts/ -rw------- 1 ubuntu ubuntu 661 2011-04-27 ..

Count cells that contain any text

I want to count the cells that contain anything within a range. Any cell that contain text, or numbers or something else should do a plus one in my result-cell. I found this function, countif(range;..

Get screenshot on Windows with Python?

I am creating a Beta Testers reporting module so they can send in thier comments on my software, but I would like to have the option to include a screenshot with the report. How do I take a screenshot..

Try-catch-finally-return clarification

By reading all the questions already asked in this forum related to the topic above (see title), I thoroughly understand that finally gets always called. (except from System.exit and infinite loops). ..

How to make exe files from a node.js app?

I have a node app that I wrote, that I run as follows: node.exe app.js inputArg Is there some way I can package this into a .exe by itself? So I can just do something like this? App.exe inputArg I..

when exactly are we supposed to use "public static final String"?

I have seen much code where people write public static final String mystring = ... and then just use a value. Why do they have to do that? Why do they have to initialize the value as final prior to u..

Should IBOutlets be strong or weak under ARC?

I am developing exclusively for iOS 5 using ARC. Should IBOutlets to UIViews (and subclasses) be strong or weak? The following: @property (nonatomic, weak) IBOutlet UIButton *button; Would get rid..

Python: import cx_Oracle ImportError: No module named cx_Oracle error is thown

I try to write a script in .py for oracle connectivity: #!/usr/bin/python import cx_Oracle connstr='username/pwd@database' conn = cx_Oracle.connect(connstr) curs = conn.cursor() curs.execute('sele..

Upload Image using POST form data in Python-requests

I'm working with wechat APIs ... here I've to upload an image to wechat's server using this API url = 'http://file.api.we..

How to use random in BATCH script?

How to use random in BATCH script?..

Rounding a double value to x number of decimal places in swift

Can anyone tell me how to round a double value to x number of decimal places in Swift? I have: var totalWorkTimeInHours = (totalWorkTime/60/60) With totalWorkTime being an NSTimeInterval (double)..

How Can I Resolve:"can not open 'git-upload-pack' " error in eclipse?

I am building an android app with the facebook api and I need to import the facebook android sdk. When I want to import this file from github it throws the .."can not list the available branches..'can..