Smack is an XMPP (Jabber) client library written in Java for Android and Java SE. It provides a simple API allowing developers to write clients for XMPP services.
I get an error after updating from my last project. Not a problem in my code but I'm having trouble with build.gradle. How can I fix it?
build.gradle code here:
apply plugin: 'android'
android {
..
Is there a nice simple method of delaying a function call whilst letting the thread continue executing?
e.g.
public void foo()
{
// Do stuff!
// Delayed call to bar() after x number of ms
..
I have always initialized my strings to NULL, with the thinking that NULL means the absence of a value and "" or String.Empty is a valid value. I have seen more examples lately of code wher..
Is there any library which will help me to handle logging in my Node.Js application? All I want to do is, I want to write all logs into a File and also I need an options like rolling out the file afte..
When should I store the Subscription instances and invoke unsubscribe() during the NgOnDestroy life cycle and when can I simply ignore them?
Saving all subscriptions introduces a lot of mess into comp..
Before you think this is a duplicate question, I believe I have a unique, even if it is somewhat dim-witted, case.
A few days ago, I upgraded the version of MySQL on my Ubuntu 10.04 server to 5.3.3 (..
I use Clickatell to send SMSes to clients' mobile phones.
Is there a standardised regular expression for all valid mobile phone numbers, e.g. +27 123 4567? I'd roll my own, but I'm worried about miss..
I am seeing the following error:
Origin http://localhost:8080 is not allowed by Access-Control-Allow-Origin
with this code:
var http = new getXMLHttpRequestObject();
var url = "http://gdata.youtub..
I know this isn't right, but for the sake of illustration I'd like to do something like this:
<%= Html.Button("Action", "Controller") %>
My goal is to make an HTML button that will call my MV..
I have the following array.
var arr = [1,0,2];
I would like to remove the last element i.e. 2.
I used arr.slice(-1); but it doesn't remove the value...
I'm trying to find the best way to switch between the two python compilers, 2.7 to 3.3.
I ran the python script from the cmd like this:
python ex1.py
Where do I set the "python" environment in t..
When I have a link that is wired-up with a jQuery or JavaScript event such as:
<a href="#">My Link</a>
How do I prevent the page from scrolling to the top? When I remove the href attri..
Does text input element not have a change event? When I attach a change event handler to a text input it is not being fired. Keyup is fired, but keyup is not sufficient for detecting a change as there..
I want to write a batch job that when executed will grab all the files in the C:\Test\Log folder and move them to a new directory in the C:\Test. This new directory will have a name called "Backup-" a..
If I have a HTML file on disk, How can I read it all at once in to a String variable at run time? Then I need to do some processing on that string variable.
Some html file like this:
<html>
..
Is this piece of code valid (and defined behavior)?
int &nullReference = *(int*)0;
Both g++ and clang++ compile it without any warning, even when using -Wall, -Wextra, -std=c++98, -pedantic, -W..
I'm trying the new Android Studio. I've exported a project from eclipse, using the build gradle option. I've then imported it in Android Studio. The R.java file under gen has a j in a little red circl..
I have a list:
my_list = ['abc-123', 'def-456', 'ghi-789', 'abc-456']
and want to search for items that contain the string 'abc'. How can I do that?
if 'abc' in my_list:
would check if 'abc' exi..
There is one very bad limit in PHP: if you call some function a1() that calls a2(), that calls a3... so when a99() will call a100() you will see
Fatal error: Maximum function nesting level of '100..
I got the following error while testing some code:
SQLException: Invalid column index
What exactly does that mean?
Is there an online document explaining what all the Oracle error codes and s..
This is a copy of someone else's question on another forum that was never answered, so I thought I'd re-ask it here, as I have the same issue. (See http://geekple.com/blogs/feeds/Xgzu7/posts/35170306..
I am trying to use simple jQuery UI. I've included everything and I have this simple script:
<script>
$(function() {
$( "#slider" ).slider();
});
</script>
and
<div id="slid..
I am receiving only one notification and if there comes another notification, it replaces the previous one and here is my code
private static void generateNotification(Context context, String message..
I have a design that implements a dark blue UITextField, as the placeholder text is by default a dark grey colour I can barely make out what the place holder text says.
I've googled the problem of co..
I created an application with spring + hibernate, but I always get this error. This is my first application with hibernate, I read some guides but I can not solve this problem. Where am I doing wrong?..
Is there any way to pass class as a parameter in Java and fire some methods from that class?
void main()
{
callClass(that.class)
}
void callClass(???? classObject)
{
classObject.somefunction..
I was given this chunk of code to place in my html page but I know nothing about javascript so I have no idea where to place it and what kind of tag to place it in.
$('input[type=radio]').change(func..
I want to compare two strings for equality when either or both can be null.
So, I can't simply call .equals() as it can contain null values.
The code I have tried so far :
boolean compare(String str1,..
With unixODBC you can use a simple command line utility called "isql" to test your connection and permissions of some queries. Without having to write extra code or install libs or bloated programs, i..
I'm trying to figure out the easiest way to edit text files in the console (PowerShell in my case). I'm using Windows 7 64 bit. It galls me that I can't just type edit filename.txt to edit a file. T..
Let's say I have a default text input without any CSS
<input type="text" />
I want to change its border color to red so I add an style
<input type="text" style="border-color:red" />
..
I currently have a small php script that searches a database based on user input. There is an html file that has one field that is used for entry of search strings into the database. Essentially, you ..
I've read all the answers on to this questions and none of the solutions seem to work.
Also, I am getting the vibe that triggering keypress with special characters does not work at all. Can someone ..
How can I connect my Android emulator to the internet, e.g. to use the browser? I've found lots of advice on what do to when your connected through a proxy, but that's not the case here, my machine (W..
<div onclick="test(this)">
Test
<div id="child">child</div>
</div>
I want to change the style of the child div when the parent div is clicked. How do I reference it?..
I am using Eclipse Android plugins to build a project, but I am
getting this error in the console window:
[2010-02-03 10:31:14 - androidVNC]Error generating final archive:
Debug certificate expired o..
Spark 1.4.1
I encounter a situation where grouping by a dataframe, then counting and filtering on the 'count' column raises the exception below
import sqlContext.implicits._
import org.apache.spark..
There is a package I have to deal with which installs assemblies straight into the GAC (e.g. somewhere deep in %windows%/assembly).
How do I exorcise the actual assembly (the DLL) from the GAC into..
Select * from [User] U
where U.DateCreated = '2014-02-07'
but in the database the user was created on 2014-02-07 12:30:47.220 and when I only put '2014-02-07'
It does not show any data..
I have created an application and with an event I manage to add notification in android notification bar. Now I need sample how to remove that notification from notification bar on an event ?? ..
I'm using the following code in body section.
<center><a href="contact.html" class="button large hpbottom">Get Started</a></center>
Is there any alternative for <center>..
When I try to center a <ul> the text in the <li> centers but the bullet points stay on the far left of the page. Is there any way to get the bullet points to stay with the text when it is ..
I'm newbie.
I want to change text of TextView While click on it.
My code:
val text: TextView = findViewById(R.id.android_text) as TextView
text.setOnClickListener {
text.setText(g..
How can I add label to my marker if my markers are populated on ajax success each result.
map.gmap('addMarker', { 'position': new google.maps.LatLng(result.latitude, result.longitude) });
I tried l..
Why am I getting this and many more errors of this kind? I am adding a link to the repo as well as key code snippets below. I think I have a basic misunderstanding of how the dependency and "include" ..
I've been working on an assignment where I have to read in some csv files from a directory "specdata". The files are very similar in that there are 332 titled 001.csv - 332.csv. They have consistent c..
A script takes a URL, parses it for the required fields, and redirects its output to be saved in a file, file.txt. The output is saved on a new line each time a field has been found.
file.txt
A Cat..
I can add streams or extra elements, like this:
Stream stream = Stream.concat(stream1, Stream.concat(stream2, Stream.of(element));
And I can add new stuff as I go, like this:
Stream stream = Strea..
I have a MongoDB collection with documents in the following format:
{
"_id" : ObjectId("4e8ae86d08101908e1000001"),
"name" : ["Name"],
"zipcode" : ["2223"]
}
{
"_id" : ObjectId("4e8ae86d08101..
I have a storage folder on a network in which all users will store their active data on a server. Now that server is going to be replaced by a new one due to place problem so I need to copy sub folder..
In straight up javascript (i.e., no extensions such as jQuery, etc.), is there a way to determine a child node's index inside of its parent node without iterating over and comparing all children nodes..
I'm trying to connect to an FTP server which allows anonymous access, I don't know how to specify the appropriate username/password required to do this though.
I've tried using anonymous/anonymous as..
What format do I use for Date/Time when writing to an XML file using .NET? Do I simply use DateTime.ToString(), or do I have to use a specific format?..
I'm new to Angular and I'm coming from the Ember community. Trying to use the new Angular-CLI based off of Ember-CLI.
I need to know the best way to handle SASS in a new Angular project. I tried usi..
Is there a way to get the path of main class of the running java program.
structure is
D:/
|---Project
|------bin
|------src
I want to get the path as D:\Project\bin\.
I tried Syste..
I have a dataset which looks like this one below. I am trying to make a barplot with the grouping variable gender, with all the variables side by side on the x axis (grouped by gender as filler with d..
I am trying to achieve a dropBox sync and need to compare the dates of two files. One is on my dropBox account and one is on my iPhone.
I came up with the following, but I get unexpected results. I ..
I'm trying to drop my database and create a new one through the command line.
I log in using psql -U username and then do a \connect template1, followed by a DROP DATABASE databasename;.
I get the e..
I'm using the jQuery DatePicker control for the first time. I've got it working on my form, but it's about twice as big as I would like, and about 1.5 times as big as the demo on the jQuery UI page. I..
I was wondering if using:
System.getProperty("user.dir");
to get the absolute path of a folder is the best way to go about it? I am looking to pass my application onto other computers and I need a ..
I have a bitmap taken of a Base64 String from my remote database, (encodedImage is the string representing the image with Base64):
profileImage = (ImageView)findViewById(R.id.profileImage);
byte[] i..
What declarations I have to make in order to be able to use Excel objects and constants from my Access 2007 VBA script?
Dim wb As Workbook
or
Set objExcelApp = New Excel.Application
or
.Border..
I have a project, in which some JavaScript var is evaluated. Because the string needs to be escaped (single quotes only), I have written the exact same code in a test function. I have the following bi..
I have to count all the values in a matrix (2-d array) that are greater than 200.
The code I wrote down for this is:
za=0
p31 = numpy.asarray(o31)
for i in range(o31.size[0]):
for j in ..
I can't understand this error:
In this call to method SetVolume, Volume = 2055786000 and size = 93552000. Volume is an Integer property, and size is also Integer, as you can see.
The class is a pa..
I'm done with my class project which I coded using Python. I'm working on the extra credit part i.e. GUI development - Windows platform.
I need something simple, easy to use, possibly drag-and-drop G..
In keeping with the "There's only one obvious way to do it", how do you get the magnitude of a vector (1D array) in Numpy?
def mag(x):
return math.sqrt(sum(i**2 for i in x))
The above works, b..
Apparently xrange is faster but I have no idea why it's faster (and no proof besides the anecdotal so far that it is faster) or what besides that is different about
for i in range(0, 20):
for i in xr..
What is the correct way to cast an Int to an enum in Java given the following enum?
public enum MyEnum
{
EnumValue1,
EnumValue2
}
MyEnum enumValue = (MyEnum) x; //Doesn't work???
..
How can I easily find out the direct shared object dependencies of a Linux binary in ELF format?
I'm aware of the ldd tool, but that appears to output all dependencies of a binary, including the depe..
From the man page:
Deletes all stale tracking branches under <name>.
These stale branches have already been removed from the remote repository
referenced by <name>, but are still locally..
To be honest, I've tried to turn a dirty trick on IIS and just when I thought that I was going to get away with it, I realized my workaround doesn't work. Here's what I've tried to do:
1) I have ASP...
I am currently reading the book C Programming Language by Ritchie & Kernighan. And I am pretty confused about the usage of EOF in the getchar() function.
First, I want to know why the value of E..
I have an ASP.net application where Users aren't able to successfully complete certain actions, for reasons, I'm assuming, can only be related to losing their session (which is where I maintain their ..
Whenever I try to run my app in Xcode 6 Beta 4 I am getting the error:
The file "MyApp.app" couldn't be opened because you don't have permission to view it.
This error appears no matter what simula..
Is there a way to find out what branch a commit comes from given its SHA-1 hash value?
Bonus points if you can tell me how to accomplish this using Ruby Grit...
I am trying to compile some sources using a makefile. In the makefile there is a bunch of commands that need to be ran as sudo.
When I compile the sources from a terminal all goes fine and the make ..
I'm new on the android system.
Is this correct, the android 2.2.1 WIFI only detects non-ad hoc wireless network?
I was wondering if there's a way to connect my android to an ad hoc network set-up from..
In a forms model, I used to get the current logged-in user by:
Page.CurrentUser
How do I get the current user inside a controller class in ASP.NET MVC?..
In Java, given a java.net.URL or a String in the form of http://www.example.com/some/path/to/a/file.xml , what is the easiest way to get the file name, minus the extension? So, in this example, I'm lo..
I am taking input from an excel sheet using Poi.jar and wanted to know how to check if a cell is empty or not.
Right now I m using the below code.
cell = myRow.getCell(3);
if (cell != null) {
ce..
What is the fastest way to export files (blobs) stored in a SQL Server table into a file on the hard drive? I have over 2.5 TB of files (90 kb avg) stored as varbinary and I need to extract each one ..
OS: Mac OS X 10.7.5
Python Ver: 2.7.5
I have installed setuptools 1.0 with ez_setup.py from https://pypi.python.org/pypi/setuptools
Then I download pip.1.4.1 pkg from https://pypi.python.org/pypi/pi..
When you use the up key in a Linux terminal, you can use previous commands again. Great feature. However, I started logging mysql into mysql with the sensitive details in the command.
How can I delet..
I'm getting the error:
Extension methods must be defined in a non-generic static class
On the line:
public class LinqHelper
Here is the helper class, based on Mark Gavells code. I'm really c..
Is it possible to use strings as indices in an array in python?
For example:
myArray = []
myArray["john"] = "johns value"
myArray["jeff"] = "jeffs value"
print myArray["john"]
..
Maybe this is obvious, but I don't know how to declare class properties in Objective-C.
I need to cache per-class a dictionary and wonder how put it in the class...
if(stopwatch >= track[song].duration)
track[song].duration finds the duration of a soundcloud track.
I am looking to create a stopwatch function that starts counting milliseconds when you click ..
I'm trying to implement a horizontal multilevel dropdown navigation menu. Immediately below (vertically) the menu, I've got a YouTube video embedded via iframe. If I hover over one of the main level n..
I am not expert with jQuery but I have tried to create a little script for my application. I want to check all checkboxes but it isn't working correctly.
First I tried to use attr and after that I tr..
I'm writing a simple import application and need to read a CSV file, show result in a DataGrid and show corrupted lines of the CSV file in another grid. For example, show the lines that are shorter th..
I'm stuck: I'm trying to submit a form using AJAX, but I can't find a way to send multiple data fields via my AJAX call.
$(document).ready(function() {
$("#btnSubmit").click(function() {
var s..
I'm using spring mvc. And I can't get param from url when method = post. But when I change method to GET, so I can get all param.
This is my form:
<form method="POST" action="http://localhost:808..
I am trying to implement a feature in an App that shows an alert when the internet connection is not available.
The alert has two actions (OK and Settings), whenever a user clicks on settings, I want ..
I'm installing mingw-w64 on Windows and there are two options: win32 threads and posix threads. I know what is the difference between win32 threads and pthreads but I don't understand what is the diff..
Audio autoplay is working in Mozilla, Microsoft Edge and old Google Chrome as well but not in new Google Chrome.
They have blocked the autoplay. is there any way to make it audio autoplay in Google Ch..
I'm looking for a multiple axis line chart similar to the one in the image below, (which is a javascript chart made by amcharts).
Does excel have an option to draw charts line these? Note there are 3..
I am getting the following errors while trying my first spring project:
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be fo..
SQL Server 2005/2008 Express edition has the limitation of 4 GB per database. As far as I known the database engine considers data only, thus excluding log files, unused space, and index size.
Gettin..
How do I convert 'timeStamp' to date after I get the count in java?
My current code is as follows:
public class GetCurrentDateTime {
public int data() {
int count = 0;
java.sql...
In Java, I want to convert a double to an integer, I know if you do this:
double x = 1.5;
int y = (int)x;
you get y=1. If you do this:
int y = (int)Math.round(x);
You'll likely get 2. However, I..
Is there a "computationally" quick way to get the count of an iterator?
int i = 0;
for ( ; some_iterator.hasNext() ; ++i ) some_iterator.next();
... seems like a waste of CPU cycles...
I have a small and simple file in *.XLS with only one sheet, on this sheet just many cells with small text on number. (file size 24Kb)
But I made a lot of changes, copy and paste, extend formula, sav..
I've had instances of our Java code catch a NullPointerException, but when I try to log the StackTrace (which basically ends up calling Throwable.printStackTrace() ), all I get is:
java.lang.NullPoin..
I'm trying to make a table, and the way Pandas formats its indices is exactly what I'm looking for. That said, I don't want the actual data, and I can't figure out how to get Pandas to print out just ..
Say I want to print html from inside a script tag.
A source like this
<div>foo</div>
<script>
print('<div>Print this after the script tag</div>');
</script>
<d..
I am new in Android Studio. After setup,
When I am trying to import an application I am getting that error So that gradle not able to build.
Error:Could not initialize class org.codehaus.groovy.runt..
I have a div like this <div class="xyz"></div> and all the content in that div is in the css. How do I make that div into a link? I tried wrapping the a tag around it, but that didn't see..
I created a horizontal menu using a HTML lists and CSS. Everything works as it should except when you hover over the links. You see, I created a bold hover state for the links, and now the menu links ..
In my android app i want to get user current location every few minute interval and update in to my center server using web service.
Currently i am using Fused Location Provide for get user current lo..
I'm trying to chose between REST and JSON-RPC for developing an API for a web application. How do they compare?
Update 2015: I have found REST easier to develop and use for an API which is served ..
I need to pass a resource ID to a method in one of my classes. It needs to use both the id that the reference points to and also it needs the string. How should I best achieve this?
For example:
R.d..
Has anyone an idea how many tcp-socket connections are possible on a modern standard root server? (There is in general less traffic on each connection, but all the connections have to be up all the ti..
I have an existing array to which I want to add a value.
I'm trying to achieve that using array_push() to no avail.
Below is my code:
$data = array(
"dog" => "cat"
);
array_push($data['cat'..
I would like to send email through php code hosted locally.
<?php
$email = "[email protected]";
$titre = "My subject";
$message = "Text message !";
mail($email, $titre, $message);
?>
..
Listening to Scott Hanselman's interview with the Stack Overflow team (part 1 and 2), he was adamant that the SQL server and application server should be on separate machines. Is this just to make su..
I am trying to install Java 8.
What I have done so far:
installed the latest version of Eclipse
downloaded and installed Java SE Runtime Environment 8 http://www.oracle.com/technetwork/java/javase/..
Git push hangs everytime I try to push to github. I am using Cygwin and Windows 7. Git functions fine locally tracking branches, providing status, setting global user.name and user.email and allowing ..
This is what I want the output to look like:
Employee Emp# Manager Mgr#
BLAKE 7698 KING 7839
CLARK 7782 KING 7839
JONES 7566 KING 7839
MARTIN 7654 BLAKE 7698
A..
I've got a DataFrame who's index is just datetime.time and there's no method in DataFrame.Index and datetime.time to shift the time. datetime.time has replace but that'll only work on individual item..
i have:
for i in range(2,n):
if(something):
do something
else:
do something else
i = 2 **restart the loop
But that doesn't seem to work. Is there a way to restart that ..
I am using a HTML form to submit to a jQuery validation which then sends information to a PHP processing page through ajax.
Everything works 100% apart from when everything comes back true I can't ge..
Here's a portion of my table (it's a form):
Those are just two <td>'s in a <tr>. I'm trying to get Description up top, to the top of the table cell, rather than resting on the bottom.
..
I have a config file that I need to load as part of the execution of a dll I am writing.
The problem I am having is that the place I put the dll and config file is not the "current location" when the..
I have a REST service that reads a file and sends it to another console application after converting it to Byte array and then to Base64 string. This part works, but when the same stream is received a..
I need to center an unordered list of unknown width, while still keeping the list-items left aligned.
Achieve the same result as this:
HTML
<div>
<ul>
<li></li>
..
I recieve "7+" or "5+" or "+5" from XML and wants to extract only the number from string using Regex.
e.g Regex.Match() function
stringThatHaveCharacters = stringThatHaveCharacters.Trim();
..
Is there any way to have a subquery return multiple columns in oracle db? (I know this specific sql will result in an error, but it sums up what I want pretty well)
select
a.x,
( select b.y, ..
Anaconda (listed as "Python 3.6.0 (Anaconda 4.3.1 64 bit)" ) is in my programs and features list, but there is seeming no Anaconda Navigator desktop app, as their seems to be no icon on my desktop and..
I am using MySQL 5.1.56, MyISAM. My table looks like this:
CREATE TABLE IF NOT EXISTS `my_table` (
`number` int(11) NOT NULL,
`name` varchar(50) NOT NULL,
`money` int(11) NOT NULL,
PRIMARY KE..
Lately I decided to learn how to use the log4j2 logger. I downloaded required jar files, created library, xml comfiguration file and tried to use it. Unfortunately i get this statement in console (Ecl..
I have some dates in a json files, and I am searching for those who corresponds to today's date :
import os
import time
from datetime import datetime
from pytz import timezone
input_file = file(FI..
My code works perfectly: every time an item in Navigation Drawer is clicked the item is selected.
Of course I want to start the app with a default fragment (home), but Navigation Drawer doesn't have ..
I need to set validation that user must fill / select all details in a page. If any fields are empty wanna show Toast message to fill. Now I need set validation for RadioButton in the RadioGroup. I tr..
In SQL I write a SELECT statement to fetch data between two dates, using between and
Ex:
select *
from xxx
where dates between '2012-10-26' and '2012-10-27'
But the rows returned are for 26th o..
All,
I'm getting an error from some of my code that I downloaded. Here is the code:
/*----------------------------------------------------------------------*/
/* wl_Alert v 1.1
/* description: Handl..
I am working on a project, but I cannot use any existing java data structures (ie, ArraysList, trees, etc)
I can only use arrays. Therefore, I need to dynamically update an array with new memory.
I ..
i just installed sql server 2008 r2 and SQL Server Management Studio.
After installation i found that the SQL Server Management Studio has not been installed.
i wanted to install SQL Server Managemen..
I am coding an SEO tool in C# for doing keyword research. I need to make calls to Google Adword keyword tool. Now I know some tools which are doing the same already.
I just need to decipher what they..
Are there any good libraries for streaming live video using Java? Ideally both ends of the pipe should be written in Java but I am mostly concerned about the video player. What software would you reco..
I have a problem while calling a webservice. I have a .NET web service on the server, and I am using KSOAP2 (ksoap2-j2se-full-2.1.2) in Android. While running the program I got an runtime exception li..
I am new to Python and want to read keyboard input into an array. The python doc does not describe arrays well. Also I think I have some hiccups with the for loop in Python.
I am giving the C code sn..
I tried the following command to extract audio from video:
ffmpeg -i Sample.avi -vn -ar 44100 -ac 2 -ab 192k -f mp3 Sample.mp3
but I get the following output
libavutil 50.15. 1 / 50.15. 1
liba..
I'm writing a program which allows the user to input his data then outputs it. Its 3/4 correct but when it arrives at outputting the address it only prints a word lets say only 'Archbishop' from 'Arch..
I have a column in excel, wherein I have all the website url values. My question is I want to turn the url values to active links. There are about 200 entries in that column with different urls in all..
What it the difference between running two commands:
foo = FooModel()
and
bar = BarModel.objects.create()
Does the second one immediately create a BarModel in the database, while for FooModel, t..
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..
I have forked a repository, then I made some changes and it looks like I've messed up everything.
I wish to start it again from scratch, using the current upstream/master as the base for my work.
S..
How to create a directory and give permission in single command in Linux?
I have to create lots of folder with full permission 777.
Commands
mkdir path/foldername
chmod 777 path/foldername
I don't l..
My first PhoneGap application includes 2 HTML files.
The first one is named index.html which uses index.js. This file will display a list item. When I click an item in that list, it brings me to det..
I am doing a tutorial and am getting this error:
Fatal error: Class 'MySQLi' not found (LONG URL) on line 8
The code on line 8 is:
$mysqli = new MySQLi($db_server, $db_user, $db_pass, $db_name)..
I have a data frame that has columns a, b, and c. I'd like to add a new column d between b and c.
I know I could just add d at the end by using cbind but how can I insert it in between two columns? ..
I have created a demo using JavaScript for Flickr photo search API.
Now I am converting it to the AngularJs.
I have searched on internet and found below configuration.
Configuration:
myApp.config(..
I am trying to create a simple ledger and on the far right of the "Book" it totals any debit/credit that I input. But instead of leaving the unused rows blank, it keeps repeating the latest total to t..
I am trying to set the text color using css in a jinja2 template. In the following code I want to set the output string to print in a specific font color if the variable contains a string. Everytim..
I have an Asus Zenfone 5. I enabled USB debugging but on conne?ting my phone to the computer, it shows no Android device could be detected. What can I do?..
How can I remove a line (or lines) of a matplotlib axes in such a way as it actually gets garbage collected and releases the memory back? The below code appears to delete the line, but never releases..
I'm trying to use cURL in a script and get it to not show the progress bar.
I've tried the -s, -silent, -S, and -quiet options, but none of them work.
Here's a typical command I've tried:
curl -s ..
I could not find this anywhere. I fetch some JSON from an API that returns standard JSON dates. You can see the format by running this code in a JavaScript console:
> new Date().toJSON();
"2010-10..
I've got a simple hello world example that I'm trying to compile on OS X, named hw.cpp:
#include <iostream>
#include <string>
using namespace std;
int main() {
cout << "Hello worl..
I am trying to get a specific line from a text file.
So far, online I have only seen stuff like sed, (I can only use the sh -not bash or sed or anything like that). I need to do this only using a bas..
How can I make button become a link only and have a popup in bootstrap 3?
code
<a href="" data-toggle="modal" data-target=".bannerformmodal">Load me</a>
<div class="modal fade banne..
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..
I want to make "grammatically correct" lists using CSS. This is what I have so far:
The <li> tags are displayed horizontally with commas after them.
li { display: inline; list-style-type: none..
Is there a way to make CardView only have corner radius at the top?
<android.support.v7.widget.CardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schem..
I am attempting to learn the very basics of Python using the guide "Learn Python the hard way" by Zed A. Shaw. The problem that I am having is that I can run Python scripts, but only when using .\ in ..
Description
I am using Docker version 1.12.5 on Windows 10 via Hyper-V and want to use container executables as commands in the current path. I built a Docker image that is running fine, but I have a..
I'm trying to plot a figure without tickmarks or numbers on either of the axes (I use axes in the traditional sense, not the matplotlib nomenclature!). An issue I have come across is where matplotlib ..
When writing shell programs, we often use /bin/sh and /bin/bash. I usually use bash, but I don't know what's the difference between them.
What's main difference between bash and sh?
What do we need..
I want to start debug mode for my application. But I need to start the debug mode from command prompt. Is it possible ? And will the procedure vary between tomcat 5.5 to tomcat 6.?..
I am trying to install express framework using npm command but getting following error.
error message is
E:\myFindings\nodejs_programs\node>npm install -g express
npm http GET https://registry..
I am very new to android development, and have only read and completed the first guide in the android development site. The problem I have been having is that I can not put a picture in an activity. I..
This does not work, should it? Or can you stop the error if another line could do the same:
function doTheHighlightning(searchTerms) {
// loop through input array of search terms
myArray = se..
I have worked with Java for a quite a long time, and I was wondering how the function System.out.print() works.
Here is my doubt:
Being a function, it has a declaration somewhere in the io package. ..
I asked a similar question to this earlier this week but I'm still not understanding how to get a list of all installed applications and then pick one to run.
I've tried:
Intent intent = new Inten..
I have just installed IE9 beta and on a specific site I created (HTML5) IE9 jumps to compatibility mode unless I manually tell it not to. I have tried removing several parts of the website but no chan..
I'm trying to set up an application from a third party, which requires a supporting website hosted in my local IIS. I've created a website exactly as explained in their install guide, but am having so..
I want to set up user name & password authentication for my MongoDB instance, so that any remote access will ask for the user name & password. I tried the tutorial from the MongoDB site and d..
Hey, I'm working on a web app that has a login dialog that works like this:
User clicks "login"
Login form HTML is loaded with AJAX and displayed in DIV on page
User enters user/pass in fields and c..