Typography — in digital development — includes the creation, formatting, organization, arrangement, rendering, legibility, and readability of visual type on a device. This often extends beyond letterforms, numerals, and punctuation to include iconography, text layout, and more.
I need to add responsive design features to my web application using Twitter Bootstrap. I just want the responsive behavior, I'm not interested in the typography, components or any other stuff include..
I've created a site using the Zurb Foundation 3 grid. Each page has a large h1:
_x000D_
_x000D_
body {_x000D_
font-size: 100%_x000D_
}_x000D_
_x000D_
/* Headers */_x000D_
_x000D_
h1 {_x000D_
font..
I've been trying to show a "Do you want to exit?" type of dialog when the user attempts to exit an Activity.
However I can't find the appropriate API hooks. Activity.onUserLeaveHint() initially lo..
I have a dictionary and am trying to write it to a file.
exDict = {1:1, 2:2, 3:3}
with open('file.txt', 'r') as file:
file.write(exDict)
I then have the error
file.write(exDict)
TypeError: mus..
<input name="txtId" type="text" size="20" />
or
<input name="txtId" type="text" style="width: 150px;" />
Which one is optimal cross-browser code?
Of course it depends on requirements..
I'm trying to enter some UTF-8 characters into a LaTeX file in TextMate (which says its default encoding is UTF-8), but LaTeX doesn't seem to understand them.
Running cat my_file.tex shows the charac..
Possible Duplicate:
Number formatting: how to convert 1 to "01", 2 to "02", etc.?
How can I convert int to string using the following scheme?
1 converts to 0001
123 converts to 0123
Of ..
Every time that I try to import an Excel file into SQL Server I'm getting a particular error. When I try to edit the mappings the default value for all numerical fields is float. None of the fields ..
I have a div box (called flux) with a variable amount of content inside.
This divbox has overflow set to auto.
Now, what I am trying to do, is, when the use scroll to the bottom of this DIV-box, load..
I need to implement a horizontal listview in my Android application. I did a bit of research and came across How can I make a horizontal ListView in Android? and Horizontal ListView in Android? howeve..
I need to write a function that takes
a list of numbers and multiplies them together. Example:
[1,2,3,4,5,6] will give me 1*2*3*4*5*6. I could really use your help...
How can I find out what data type some variable is holding? (e.g. int, string, char, etc.)
I have something like this now:
using System;
using System.Collections.Generic;
using System.Linq;
using Sy..
Is there an easy way (without listing them all separately) in jquery to select all form elements and only form elements.
I can't use children() etc because the form contains other HTML.
E.g:
$("fo..
I'm trying to push to a two-dimensional array without it messing up, currently My array is:
var myArray = [
[1,1,1,1,1],
[1,1,1,1,1],
[1,1,1,1,1]
]
And my code I'm trying is:
var r = 3; //start fr..
I'm trying to test if a DOM element exists, and if it does exist delete it, and if it doesn't exist create it.
var duskdawnkey = localStorage["duskdawnkey"];
var iframe = document.createElement("ifra..
This is the traceback on my windows system.
Traceback (most recent call last):
File "D:\AMD\workspace\steelrumors\manage.py", line 9, in <module>
django.setup()
File "D:\AMD\Django\dja..
I have a problem using Laravel 5. When I run "php aritsan migrate", I got this error
**************************************
* Application In Production! *
************************************..
I am receiving the following error at certain times on asp.net website.
Sys.WebForms.PageRequestManagerServerErrorException:
Validation of viewstate MAC failed.
If this application is hosted by ..
here's a quick question:
How do you make a window pop up for your error handling in php?
Is javascript the only way to do this or is there a way to do this in PHP?
i have a PHP-file, and one of the ..
I'd like to create a div with an arbitrary size, then display something on top of that div. What is the best way to position and size the overlay exactly as the div below in css?..
I want to get headerless CSV data from the output of a query to MySQL on the command line. I'm running this query on a different machine from the MySQL server, so all those Google answers with "INTO O..
I am able to run a sample hadoop program from the command prompt and am trying to run the same program from Eclipse, so that I can debug it and understand it better.
For the command line program, som..
I am new to git.
I have done a clone of remote repo as follows
git clone https://[email protected]/repo.git
then I did
git checkout master
made some changes and committed these changes t..
This is my first experience of developing an ios app. I am trying to Post some data using Facebook graph api. I am constantly getting the following error:
The operation couldn’t be completed. (NSUR..
I was following the tutorial on o7planning and got stuck at step 6:
http://o7planning.org/en/10169/java-servlet-tutorial
It's just a simple project that show HelloWorld but for some reason I keep gett..
How to close a window using jQuery for all browser compatibility?
<input type="button"
name="backButton"
value="Close"
style="background-color:#245f91; color:#fff;font-weig..
I've been fiddling with this for a while but it won't work and I can't figure out why. Please help. Here is what I have:
<html>
<head>
<title>lala</title>
</head>
&l..
I did my document in an ISO-standard. It does not support umlaut alphabets, such as ä and ö. I need them. The document gets compiled without UTF8, but not with UTF8. More precisely, the document doe..
I need to commit the folder after adding some new files to that folder. When I tried this in TortoiseSVN, it was working properly (committed successfully), but while trying this by using the svn commi..
I've got a win32 project that I've loaded into Visual Studio 2005. I'd like to be able to print things to the Visual Studio output window, but I can't for the life of me work out how. I've tried 'prin..
I am trying to assign the user_id with the current user but it give me this error
SQLSTATE[HY000]: General error: 1364 Field 'user_id' doesn't have a
default value (SQL: insert into `posts` (`update..
So I'm writing a stored procedure in MS SQL Server 2008. It's a really long query and I have to write it dynamically, so I create a variable called @Query and make it of type NVARCHAR(MAX). Now, I hav..
Can you round a number in javascript to 1 character after the decimal point (properly rounded)?
I tried the *10, round, /10 but it leaves two decimals at the end of the int...
I need to make sure that a certain <input> field only takes numbers as value.
The input is not part of a form. Hence it doesn't get submitted, so validating during submission is not an option. I..
I'm using codeigniter framework to develop one music cms. i have 3 tables in mysql database, Currently im working in "Album" Table and "Model, Controller". i want to SELECT "Album" Table 1 and JOIN "A..
I have a backup server that automatically backs up my live site, both files and database.
On the live site, the text looks fine, but when you view the mirrored version of it, it displays '?' within s..
I am developing a character count for my textarea on this website. Right now, it says NaN because it seems to not find the length of how many characters are in the field, which at the beginning is 0, ..
We have an old ASP.NET MVC 3 Web Application, building in VS2010, that fails to compile, since last week's security update.
The problem is that the reference to System.Web.Mvc.dll is broken.
When I..
I am trying to print the last part of a string before a certain character.
I'm not quite sure whether to use the string .split() method or string slicing or maybe something else.
Here is some ..
I have installed a latest maven-3.0.4 on Windows 7:
The installation details are as follows:
Installation Path :
C:\apache-maven-3.0.4
Environment Variables are:
M2_HOME C:\apache-maven-3.0...
Is there a C++ Standard Template Library class that provides efficient string concatenation functionality, similar to C#'s StringBuilder or Java's StringBuffer?..
Can anyone tell me what is the color code for transparency in CSS like white = "#FFFFFF"? As I am using following code, to convert the color codes into int:
Color color = ColorTranslator.FromHtml(hex..
I find it odd that input type="date" is still not supported in Firefox after all of this time. In fact, I don't think they added in much (if any) of the HTML 5 new types on an input element. Not s..
ls /home/user/new/*.txt prints all txt files in that directory. However it prints the output as follows:
[me@comp]$ ls /home/user/new/*.txt
/home/user/new/file1.txt /home/user/new/file2.txt /ho..
There are a couple parts to this question. I am not opposed to using a jQuery plugin if anyone knows of one that will accomplish what I want done.
Q1 - How do I convert minutes into hours and vise ve..
I have a Ubuntu server running Apache2 with PHP 5. In the php.ini I set display_errors = On and error_reporting = E_ALL | E_STRICT, but PHP is still not displaying error messages. I'm also using Apa..
I started to learn Android Studio from yesterday. I try to echo out simple "Hello World":
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:id="@+id/activity_main"
xmlns..
The following is my Windows service code. When I am debugging the code, I am getting the error/ exception:
The type initializer for 'CSMessageUtility.CSDetails' threw an exception.
using System;..
I would like to create a .txt file and write to it, and if the file already exists I just want to append some more lines:
string path = @"E:\AppServ\Example.txt";
if (!File.Exists(path))
{
File.C..
I have a long string.
string s1 = "'99024','99050','99070','99143','99173','99191','99201','99202','99203','99204','99211','99212','99213','99214','99215','99217','99218','99219','99221','99222','992..
I have some code that LIMITs data to display only 4 items per page. The column I'm using has about 20-30 items, so I need to make those spread out across the pages.
On the first page, I have:
$..
I have been trying to plot a time series graph from a CSV file. I have managed to read the file and converted the data from string to date using strptime and stored in a list. When I tried plotting a ..
In R, I have am running the following script:
> 1:6 %in% 0:36
[1] TRUE TRUE TRUE TRUE TRUE TRUE
Which is clearly producing a logical vector. I have read the documentation but can't seem to find..
Sorry for the simple question, but I'm having a hard time finding the answer.
When I compare 2 lists, I want to know if they are "equal" in that they have the same contents, but in different order.
..
I was wondering if someone can show me how to use the format method for Java Strings.
For instance If I want the width of all my output to be the same
For instance, Suppose I always want my output to..
I am trying to compare two arrays with each other. I tried this code and got the following errors.
static bool ArraysEqual(Array a1, Array a2)
{
if (a1 == a2)
return true;
if (a1 == ..
In which circumstances is window.console.log defined in Internet Explorer 9?
Even when window.console.log is defined, window.console.log.apply and window.console.log.call are undefined. Why is this?
..
It may be a duplicate but i am facing some problem to convert the image into Base64 for sending it for Http Post. I have tried this code but it gave me wrong encoded string.
public static void main(..
I have this basic query i want to perform but an error keeps coming up. Probably due to my newness to laravel.
here is the code:
$userRecord = $this->where('email', $email)->where('password',..
I really would appreciate your help.
Probably it's a quite simple problem to solve - but I'm not the one .. ;-)
I have two tables in SQL Server:
article
prices
Now I want to select a certain set..
(It's probably a dumb question due to my limited knowledge with Docker or mysql administration, but since I spent a whole evening on this issue, I dare to ask it.)
In a nutshell
I want to run mysql ..
I have these nested divs and I need the main container to expand (in height) to accommodate the DIVs inside
<!-- head -->
...
<!-- /head -->
<body class="main">
..
I have BitmapImage in C#. I need to do operations on image. For example grayscaling, adding text on image, etc.
I have found function in stackoverflow for grayscaling which accepts Bitmap and returns..
In my program, user inputs number n, and then inputs n number of strings, which get stored in a list.
I need to code such that if a certain list index exists, then run a function.
This is made more ..
I'd like to load the value as it is.
I have two dimension.xml files, one in /res/values/dimension.xml and the other one in /res/values-sw360dp/dimension.xml.
From source code I'd like to do somethin..
All of a sudden I keep getting a MetadataException on instantiating my generated ObjectContext class. The connection string in App.Config looks correct - hasn't changed since last it worked - and I've..
After the server PHP upgrade I am getting the following error with PHP Version 5.6.2 on Apache 2.0
A PHP Error was encountered
Severity: Notice
Message: Only variable references should be returned by..
I have a website that does inserts into this table below. I need to do some manual inserts but I wasn't sure how do pass in the equivalent of DateTime.Now in C#.
I am running this below from the q..
How do I multiply each element of a given column of my dataframe with a scalar?
(I have tried looking on SO, but cannot seem to find the right solution)
Doing something like:
df['quantity'] *= -1 #..
In my code I have the following to run a remote script.
ssh [email protected] "sh /home/user/backup_mysql.sh"
For some reason it keeps 255'ing on me. Any ideas?
I can SSH into the box just fine..
I have installed docker-compose using the command
sudo apt install docker-compose
It installed docker-compose version 1.8.0 and build unknown
I need the latest version of docker-compose or at least..
With nodejs I want to parse a .csv file of 10000 records and do some operation on each row. I tried using http://www.adaltas.com/projects/node-csv. I couldnt get this to pause at each row. This just r..
The following query:
SELECT
year, id, rate
FROM h
WHERE year BETWEEN 2000 AND 2009
AND id IN (SELECT rid FROM table2)
GROUP BY id, year
ORDER BY id, rate DESC
yields:
year id rate
2006 p01 ..
I know similar questions have already been asked.
But, I believe my issue is due to a mistake I have previously made and therefore is different: let me explain.
Everything was working smoothly, as I..
If I run the command cat file | grep pattern, I get many lines of output. How do you concatenate all lines into one line, effectively replacing each "\n" with "\" " (end with " followed by space)?
ca..
I am used to Resharper where I can search for files, not the content, but the filename, which makes it quick to open new files.
Is this feature implemented in Visual Studio Code and is there a shortc..
I have a use case where I occasionally want to copy a single file from my host machine to the Vagrant guest.
I don't want to do so via traditional provisioners (Puppet / Chef) because this is often a..
I would like do something like that.
list_of_urls = ['http://www.google.fr/', 'http://www.google.fr/',
'http://www.google.cn/', 'http://www.google.com/',
'http://www..
How can I limit my post-build events to running only for one type of build?
I'm using the events to copy DLL files to a local IIS virtual directory, but I don't want this happening on the build serve..
I would like to know what would be the best way to parse an XML file using shellscript ?
Should one do it by hand ?
Does third tiers library exist ?
If you already made it if you could let me know..
I'd like to store a JavaScript object in HTML5 localStorage, but my object is apparently being converted to a string.
I can store and retrieve primitive JavaScript types and arrays using localStorage..
grep is used to search within a file to see if any line matches a given regular expression. However, I have this situation - I want to write a regular expression that will match the filename itself (a..
i'm looking to place a value from a text box lets say "12" to a certain place in a string temp variable. Then I want to place another value after that say "10" but with a : in between like a time. Bot..
I am working with web apps, and I am wondering if there is a way to open a link in an app-type window using HTML? Something like this:
<a href="link" target="_app">My App</a>
..
Having a Linux Bash on Windows 10 is pretty cool, but as far as I've got to struggle with the not-so-good terminal provided from Microsoft I'm gonna get stuck with Ubuntu for everything.
Anyway, is t..
I am using Express with Node and I have a requirement in which the user can request the URL as: http://myhost/fruit/apple/red.
Such a request will return a JSON response.
The JSON data, before t..
I have a need to convert Pixels to Points in C#. I've seen some complicated explanations about the topic, but can't seem to locate a simple formula. Let's assume a standard 96dpi, how do I calulate th..
In bash I want to return file name (and the path to the file) for every file of type .php|.html|.js containing the case-insensitive string "document.cookie" | "setcookie"
How would I do that?..
How could I convert an XLS file to a CSV file on the windows command line.
The machine has Microsoft Office 2000 installed. I'm open to installing OpenOffice if it's not possible using Microsoft Offi..
I am trying to import requests module, but I got this error
my python version is 3.4 running on ubuntu 14.04
>>> import requests
Traceback (most recent call last):
File "/usr/local/lib/pyt..
Python says I need 4 bytes for a format code of "BH":
struct.error: unpack requires a string argument of length 4
Here is the code, I am putting in 3 bytes as I think is needed:
major, minor = str..
Not many are aware of this feature, but Python's functions (and methods) can have attributes. Behold:
>>> def foo(x):
... pass
...
>>> foo.score = 10
>>> dir(foo)
..
I am trying to make a MKV video with a MPEG4 video codec and AC3 audio codec available to be played online using Mozilla or Chrome. I have tried multiple methods including native HTML5, which plays ba..
I have a directory of pictures that I want to loop through and do some file calculations on. It might just be lack of sleep, but how would I use PHP to look in a given directory, and loop through each..
I was trying out jquery with this example:
$(document).ready(function(){
$("button").mouseover(function(){
$("p#44.test").css("background-color","yellow");
$("p#44.test").hide..
I'm using the following jar files:
dom4j-1.6.1.jar
poi-3.9-20121203.jar
poi-ooxml-3.9-20121203.jar
poi-ooxml-schemas-3.9-20121203.jar
xmlbeans-2.3.0.jar
Code:
package ExcelTest;
import java.io.Fi..
I never use CTE with recursion. I was just reading an article on it. This article shows employee info with the help of Sql server CTE and recursion. It is basically showing employees and their manager..
I am using java to call a url that returns a JSON object:
url = new URL("my URl");
urlInputStream = url.openConnection().getInputStream();
How can I convert the response into string form and parse ..
I am using jQuery and jQuery-ui and want to animate various attributes on various objects.
For the sake of explaining the issue here I've simplified it to one div that changes from blue to red when ..
In my Ruby on Rails application I tried to upload an image through the POSTMAN REST client in Base64 format. When I POST the image I am getting a 406 Not Acceptable Response. When I checked my databas..
I need to somehow retrieve the client's IP address using JavaScript; no server side code, not even SSI.
However, I'm not against using a free 3rd party script/service...
Now that .NET v3.5 SP1 has been released (along with VS2008 SP1), we now have access to the .NET entity framework.
My question is this. When trying to decide between using the Entity Framework and L..
I have two pages with HTML forms. The first page has a submission form, and the second page has an acknowledgement form. The first form offers a choice of many controls, while the second page displays..
There is a VERY similar question to mine but in my case I don't have any duplicate jars in my build path, so the solution does not work for me. I've searched google for a couple of hours now, but non..
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 working on an application and one design approach involves extremely heavy use of the instanceof operator. While I know that OO design generally tries to avoid using instanceof, that is a differe..
Instead of writing my components inside a class, I'd like to use the function syntax.
How do I override componentDidMount, componentWillMount inside function components?
Is it even possible?
const gri..
I'm running a Ubuntu Docker container. I have a Norwegian keyboard and need to use Norwegian characters (øæå).
My Terminal character encoding is set to UTF-8 and I'm connected to my container usin..
Is there a way to obtain the post data itself? I know spring handles binding post data to java objects. But, given two fields that I want to process, how can I obtain that data?
For example, suppose ..
I add an API with following script in let's say http://www.test.com:
<script src="http://apiendpoint.com/api/v1/api.js"></script>
<div id="api" data-apikey="LA59CJI9HZ-KIJK4I5-3CKJC"&..
I just started developing PHP projects on my mac (using PDT) and was wondering where localhost is located? How does Mac OS X serve websites, I haven't changed any settings during the installation of P..
Possible Duplicate:
Why navigator.appCodeName returning Mozilla?
When I get the PHP server variable HTTP_USER_AGENT with this code:
<?php
$useragent = $_SERVER ['HTTP_USER_AGENT'];
..
I'm trying to install SQL Server 2012 Developer Edition and I can get to the point where it's doing the Installation Rule Checks but one of the rules keep failing:
'Prior Visual Studio 2010 instances..
Ok everyone knows that to hide a keyboard you need to implement:
InputMethodManager imm = (InputMethodManager) getSystemService(INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(getCurrentFocus().ge..
From what I've ready you should be able to use the 'value' property of a file input field to get the currently set path of that field. But when I do this:
$('#fileinput').value()
I get 'undefined..
I am finding a textbox by its ID. I need to get the content which is already there inside the text box. For that I am using the gettext() method, but it is returning the ID value.
The content in the t..
I'm developing some Application which allows select image from SD Card, save it into database and set this value for ImageView. I need to know way for converting uri to string and string to uri. Now I..
I have a library and a console application that uses a library. The library has a folder with source and header files.
My project is in a child/inner directory but that library directory that I want ..
Given this function, I want to replace the color with a random color generator.
document.overlay = GPolyline.fromEncoded({
color: "#0000FF",
weight: 10,
points: encoded_points,
zoomFa..
I have some websites I built times ago, that use jquery mouse events...I just got an ipad and i noticed that all the mouse over events are translated in clicks...so for instance i have to do two click..
I have an interesting challenge - I need to run a check on the following data in Excel:
| A - B - C - D |
|------|------|------|------|
| 36 | 0 | 0 | x |
| 0 | 600 | 700 ..
In C#/.NET TimeSpan has TotalDays, TotalMinutes, etc. but I can't figure out a formula for total months difference. Variable days per month and leap years keep throwing me off. How can I get TotalMont..
What I want is to start counting time somewhere in my code and then get the passed time, to measure the time it took to execute few function. I think I'm using the timeit module wrong, but the docs ar..
I have a list of changed files in git repository. There is one file I don't wanna commit for the current moment. Can I do:
git commit -a
To commit all files and then somehow remove that file from c..
I'm using logback in my current project.
It offers six levels of logging: TRACE DEBUG INFO WARN ERROR OFF
I'm looking for a rule of thumb to determine the log level for common activities...
I'm running Docker under Vagrant under OS X 10.8.4 (Mountain Lion), and whenever I try to delete a saved image, I get an error:
$ docker rmi some-image-id
2013/07/15 hh:mm:ss unexpected JSON input
..
Quick and short of it is I'm having problems summarizing count and aggregate functions with conditions on the same factor.
Suppose I have this dataframe:
library(dplyr)
df = tbl_df(data.frame(
..
I've got a basic HTML form from which I can grab a bit of information that I'm examining in Firebug.
My only issues is that I'm trying to base64 encode the file data before it's sent to the server whe..
I just got started with ReactJS and am a little stuck on a problem that I have.
My application is essentially a list with filters and a button to change the layout.
At the moment I'm using three c..
I am trying to use Gson to deserialize a json string returned from my webservice
The structure would be returned as TypeDTO[].
where TypeDTO is like
int id;
String name;
ArrayList<ItemDTO> i..
I am using Tomcat 7 in Eclipse on Windows. When starting Tomcat, I am getting the following info message:
The APR based Apache Tomcat Native library which allows optimal performance in production ..
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 am using webpack to manage a reactjs project. I want to load images in javascript by webpack file-loader. Below is the webpack.config.js:
const webpack = require('webpack');
const path = require('pa..
I was wondering how I would get the name of the current user in JavaScript as part of an HTML document.
In Java, one would type System.getProperty("user.name"); to achieve this. What is the alternati..
I got this list:
words = ['how', 'much', 'is[br]', 'the', 'fish[br]', 'no', 'really']
What I would like is to replace [br] with some fantastic value similar to <br /> and thus getting..
I'm building an HTML UI with some text elements, such as tab names, which look bad when selected. Unfortunately, it's very easy for a user to double-click a tab name, which selects it by default in ma..
I have tab delimited files with several columns. I want to count the frequency of occurrence of the different values in a column for all the files in a folder and sort them in decreasing order of coun..
I have gone through similar cases listed here but it doesn't seem to work.
I was using MySQL Workbench to establish a connection with my database which is hosted on another server. Tried a few times ..
This seems like a ridiculously easy question... but I'm not seeing the easy answer I was expecting.
So, how do I get the value at an nth row of a given column in Pandas? (I am particularly interested..
I am trying to, somewhat clone the design of an activity from a set of slides on Android UI design. However I am having a problem with a very simple task.
I have created the layout as shown in the im..
I have a batch script that outputs a file, and I'm trying to ensure that each time the script is executed, no existing files are overwritten, so I'm trying to put a timestamp on it.
Currently I have ..
Is there any way to open the browse for files dialog box when a <a href> link is clicked using javascript? It should function like a normal browse for files button and give the names/list of fil..
I am attempting to link an application with g++ on this Debian lenny system. ld is complaining it cannot find specified libraries. The specific example here is ImageMagick, but I am having similar pro..
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..
When I press TAB in nano editor, the cursor will jump with 8 spaces like this:
def square(x):
return x * x
def cube(y):
return y * y * y
how can I set the tab stop width to 4 spaces..
I have
var q = db.Games.Where(t => t.StartDate >= DateTime.Now).OrderBy(d => d.StartDate);
But it compares including time part of DateTime. I really don't need it.
How to do it without t..
How can I add external library into a project built by Qt Creator RC1 (version 0.9.2)? For example, the win32 function EnumProcesses() requires Psapi.lib to be added in the project to build...
I'm showing an input box using AlertDialog. The EditText inside the dialog itself is automatically focused when I call AlertDialog.show(), but the soft keyboard is not automatically shown.
How do I m..
What is the best way to have a enum type represent a set of strings?
I tried this:
enum Strings{
STRING_ONE("ONE"), STRING_TWO("TWO")
}
How can I then use them as Strings?..
I have searched the internet for days now on how to implement a video streaming feature from an android phone to another android phone over a WiFi connection but I can't seem to find anything useful. ..
I am looking for a quick way to type in a time and then python convert it into other timezones ( maybe up to 10 different timezones )
Sorry. I am not familar with time in python at all, if someone co..
I have just created a very simple chrome extension and it works fine. But when I converted to .crx file and try to open it with chrome, nothing happens. my chrome browser version is 19.0.1081.2 dev-m...
In my application, I get the current location's latitude and longitude when application is open, but not when the application is closed.
I am using Service class to get the current location latitude ..
I'm trying to set up gradle to launch the bootRun process with various spring profiles enabled.
My current bootRun configuration looks like:
bootRun {
// pass command line options from gradle t..
I would like to read a CSV in spark and convert it as DataFrame and store it in HDFS with df.registerTempTable("table_name")
I have tried:
scala> val df = sqlContext.load("hdfs:///csv/file/dir/f..
I've read various articles about mocking vs stubbing in testing, including Martin Fowler's Mocks Aren't Stubs, but still don't understand the difference...
A project I'm working on uses multiple threads to do work on a collection of files. Each thread can add files to the list of files to be processed, so I put together (what I thought was) a thread-safe..
I am trying to process a user entered text by removing stopwords using nltk toolkit, but with stopword-removal the words like 'and', 'or', 'not' gets removed. I want these words to be present after st..
What is the best way to perform an alphanumeric check on an INPUT field in JSP? I have attached my current code
function validateCode() {
var TCode = document.getElementById("TCode").val..
I'm in my local computer's master branch of a cloned master-branch of a repo from a remote server.
I updated a file, and I want to revert back to the original version from the remote master branch.
..
I have just installed a third party app on my Windows Server 2008 server
and I get the
ActiveX Component can't create object
message when I try to access using a CreateObject in VBScript.
It i..
I'm building a PHP script that feeds JSON data to another script. My script builds data into a large associative array, and then outputs the data using json_encode. Here is an example script:
$data =..
I'm coming from a relational database background and trying to work with amazon's DynamoDB
I have a table with a hash key "DataID" and a range "CreatedAt" and a bunch of items in it.
I'm trying to g..
I want to react when somebody shakes the iPhone. I don't particularly care how they shake it, just that it was waved vigorously about for a split second. Does anyone know how to detect this?..
Trying to learn GitHub at the moment and doing this Git essentials tutorial over at nettuts. I'm on the lesson about making commits.
The teacher types git commit and it opens VIM as his editor (I'd a..
What is the grant option/trick I need to give to the current user ("userA") to allow him to change a object's owner which belongs by another user ("userC")?
More precisely, the contact table is owned..
I have a cron job that runs every 10 minutes and updates the content-type and x-amz-meta. But since yesterday it seems like after the cron job run, Amazon is not picking up the changes made (refreshin..
Many Java applications that use shell scripts to configure their environment use the JAVA_HOME environment variable to start the correct version of Java, locate JRE JARs, and so on.
In macOS X 10.6, ..
I have two tables, one has primary key other has it as a foreign key.
I want to pull data from the primary table, only if the secondary table does not have an entry containing it's key. Sort of an op..
I am trying hard to compare two floating point numbers within a bash script. I have to variables, e.g.
let num1=3.17648e-22
let num2=1.5
Now, I just want do a simple comparison of these two numbers:
..
I have internal server errors on my POST requests. How can I debug them ? Is it something to set up in php.ini ? THe file is really big and the word 'error' is met there many-many times...
I'm trying to get the document object of an iframe, but none of the examples I've googled seem to help. My code looks like this:
<html>
<head>
<script>
func..
Possible Duplicate:
How do I replace the first instance of a string in .NET?
Let's say I have the string:
string s = "Hello world.";
how can I replace the first o in the word Hello for l..
I am using SQL Server 2008.
I have the following:
select convert(varchar(20),fmdate) from Sery
How do I convert the date to string such that it show as MM/DD/YYYY..
I've been playing around with scraping data from web pages using VBS/VBA.
If it were Javascript I'd be away as its easy, but it doesn't seem to be quite as straight forward in VBS/VBA.
This is an ex..
I am using Html.fromHtml to view html in a TextView.
Spanned result = Html.fromHtml(mNews.getTitle());
...
...
mNewsTitle.setText(result);
But Html.fromHtml is now deprecated in Android N+
What/Ho..
I've got a jar that loads great with java web start when I browse through the IP address of the server.
Once I try the server name instead I get the following exception:
com.sun.deploy.net.FailedDow..
I've got a form that can optionally be pre-populated via facebook connect. Once a user connects, their name and email are automatically filled in. The problem is that this doesn't trigger the remote..
I am trying to get an address based on the long/lat. it appears that something like this should work?
Geocoder myLocation = Geocoder(Locale.getDefault());
List myList = myLocation.getFromLocatio..
I have spent the best part of two days "faffing" about with code samples and etc., trying to read a very large JSON file into an array in c# so I can later split it up into a 2d array for processing.
..
The reason for interfaces truly eludes me. From what I understand, it is kind of a work around for the non-existent multi-inheritance which doesn't exist in C# (or so I was told).
All I see is, you p..