I have been searching the web looking for a definition for declarative and imperative programming that would shed some light for me. However, the language used at some of the resources that I have fou..
In R, I am using ccf or acf to compute the pair-wise cross-correlation function so that I can find out which shift gives me the maximum value. From the looks of it, R gives me a normalized sequence of..
I need to copy files using Windows command-line (available on XP Pro or later by default) and show progress during the process.
The progress indicator could be in a terminal or a GUI window. It is in..
I have a small problem here.I need to convert a string read from console into each character of string. For example string: "aabbab" I want to this string into array of string.How would I do that? ..
From what I've read in the past, you're encouraged not to change the priority of your Windows applications programmatically, and if you do, you should never change them to 'Realtime'.
What does the 'R..
I have installed rewrite_module and modified php.ini on Apache.
I create rewrite.php and .htaccess files, but it's not working.
My filesystem folders like:
/var/www/html
/var/www/html/test
/var/www..
I am trying to use the jQuery dialog UI library in order to position a dialog next to some text when it is hovered over. The jQuery dialog takes a position parameter which is measured from the top le..
How can i get all the results from elastic search as the results only display limit to 10 only. ihave got a query like:
@data = Athlete.search :load => true do
size 15
query do..
I am trying to center two images side by side, but for some reason it always displays the images beneath each other. Does anyone know how I could get them centered and next to each other?
Thanks!
HT..
I've got some links that I want to select class and id at the same time.
This is because I've got 2 different behaviours. When a class of links got one class name they behave in one way, when the sam..
For this two imports;
import sun.misc.BASE64Encoder;
import sun.misc.BASE64Decoder;
I got this error:
Access restriction: The type BASE64Decoder is not accessible due to restriction on required li..
I'm new to Modals, I have a Form and when the user clicks submit, It will show a Modal confirming if the user wants to submit, the modal also contains the user input from the form fields. I searched a..
I have a condition in a silverlight application that compares 2 strings, for some reason when I use == it returns false while .Equals() returns true.
Here is the code:
if (((ListBoxItem)lstBaseMenu...
I would like to get the path to the execution directory of a Windows Forms application. (That is, the directory in which the executable is located.)
Does anyone know of a built-in method in .NET to d..
I'm trying to do one of those standard spring mvc hello world applications but with the twist that I'd like to map the controller to the root. (for example: http://numberformat.wordpress.com/2009/09/0..
I'm taking user input from System.in 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 ..
Code
var cool = new Array(3);
cool[setAll] = 42; //cool[setAll] is just a pseudo selector..
alert(cool);
Result
A alert message:
42,42,42
How do I change/set all values of an array to a specifi..
It's easy to get the value of a key from a .NET generic Dictionary:
Dictionary<int, string> greek = new Dictionary<int, string>();
greek.Add(1, "Alpha");
greek.Add(2, "Beta");
string seco..
I have a program which writes a user's highscore to a text file. The file is named by the user when they choose a playername.
If the file with that specific username already exists, then the program..
How can I run a windows batch file but hiding the command window? I dont want cmd.exe to be visible on screen when the file is being executed. Is this possible?..
A very newbish question, but say I have data like this:
test_data <-
data.frame(
var0 = 100 + c(0, cumsum(runif(49, -20, 20))),
var1 = 150 + c(0, cumsum(runif(49, -10, 10))),
date = ..
I have a batch file that does a bunch of things and at the end needs to open up a web browser to a page. Is there a way to, in essence, call ShellExecute on a http to open the web page?
Windows Comma..
I want to trigger one event on page load complete using javascript/jquery.
Is there any way to trigger event or call a simple function once page loading fully completes.
Please suggest folks if you ..
I get this error when using WAMP:
Fatal error: Call to undefined function: ldap_connect()
I have already edited the php.ini folder and enabled php_ldap.dll.
For some reason only some of the ext..
After significant refactoring in my MVC 4 application, and Razor shows this error while debugging Views:
The name 'model' does not exist in the current context.
This is the offending line of cod..
I am looking for the simplest way to do a check. I have a variable that can be equal to "" or null. Is there just one function that can check if it's not "" or null?..
Say I have a variable $test and it's defined as: $test = 'cheese'
I want to output cheesey, which I can do like this:
echo $test . 'y'
But I would prefer to simplify the code to something more lik..
I'm trying to make my code more readable, so I decided to use some short IF statements.
Here's my code which doesn't work ("not a statement"):
jXPanel6.isVisible() ? jXPanel6.setVisible(true) : jXP..
Is there a way to search, from a string, a line containing another string and retrieve the entire line?
For example:
string =
qwertyuiop
asdfghjkl
zxcvbnm
token qwerty
asdfghj..
How do I use underscore library inside angularjs controllers?
On this post: AngularJS limitTo by last 2 records
somebody suggested to assign an _ variable to the rootScope so that the library will b..
I am creating bag of words representation of the sentence. Then taking the words that exist in the sentence to compare to the file "vectors.txt", in order to get their embedding vectors. After getting..
I cannot understand what is going wrong here.
data.train <- read.table("Assign2.WineComplete.csv",sep=",",header=T)
# Building decision tree
Train <- data.frame(residual.sugar=data.train$resid..
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:
javax.net.ssl.SSLProtocolException: handshake alert: unrecognized..
I just upgraded to Android Studio 0.2.8 and I am getting an error that says "Default Activity not found" when I try to edit the run configurations.
When I launch Android Studio I get this error "Acce..
I have a text file with this information in my server:
Data1
Data2
Data3
.
.
.
DataN
How do I read all the information from the text file (line by line) using PHP?..
I am having a problem at a Java program. Exception in thread "main"
java.lang.NullPointerException
at twoten.TwoTenB.<init>(TwoTenB.java:29)
at javapractice.JavaPractice.main(JavaPractice.java:..
I have a table with structure:
id(INT PK), title(VARCHAR), date(DATE)
How do I select all distinct titles with their earliest date?
Apparently, SELECT DISTINCT title, MIN(date) FROM table doesn't wo..
Should methods in a Java interface be declared with or without the public access modifier?
Technically it doesn't matter, of course. A class method that implements an interface is always public. But ..
When I updated the Hibernate version from 3.6.8 to 4.0.0, I got a warning about deprecated method buildSessionFactory() in this line:
private static final SessionFactory sessionFactory =
new..
I have the following Vertex struct in a Graph class:
struct Vertex
{
string country;
string city;
double lon;
double lat;
vector<edge> *adj;
Vertex(string country, stri..
I'm trying to run two AsyncTasks at the same time. (Platform is Android 1.5, HTC Hero.)
However, only the first gets executed. Here's a simple snippet to describe my problem:
public class AndroidJunk..
I have cloned a github repository and made no changes locally. Github repository moved forward with commits on the same branch.
How do I find a diff between my local repository and the original gith..
OK I'm new to android dev's and Java, so I'm having problems with on click method here's my code. I know I've gotta be close, thanks in advance. All I want my button to do is, when its clicked on the ..
My script has code like this
echo '<p class="wdfb_login_button"><fb:login-button scope="' .
Wdfb_Permissions::get_permissions() . '" redirect-url="' .
wdfb_get_login_redirect() . '..
I have a Windows service written in C# using Visual Studio 2010 and targeting the full .NET Framework 4. When I run from a Debug build the service runs as expected. However, when I run it from a Rel..
I had a plugin installed in Visual Studio 2008, and it created some extra dockable windows. I have uninstalled it, and I can't get rid of the windows it created - I close them, but they always come b..
I have a large dataframe with 423244 lines. I want to split this in to 4. I tried the following code which gave an error? ValueError: array split does not result in an equal division
for item in np.s..
I'm having problems executing a function.
Here's what I did:
Create a function using SQL Server Management Studio. It was successfully created.
I then tried executing the newly created function and..
In JSX, how do you reference a value from props from inside a quoted attribute value?
For example:
<img className="image" src="images/{this.props.image}" />
The resulting HTML output is:
&l..
I have a controller which generates a string containing html markup. When it displays on views, it is displayed as a simple string containing all tags.
I tried to use an Html helper to encode/decode t..
if I have set text in textview in such way, which is not problem:
tv.setText("" + ANS[i]);
this simply getting from this way.
String a = tv.getText().toString();
int A = Integer.parseI..
I have a small app in c#, it has a DataGridView that gets filled using:
grid.DataSource = MyDatasource array;
MyClass hold the structure for the columns, it looks something like this:
class MyDatas..
How can I use regular expressions in Excel and take advantage of Excel's powerful grid-like setup for data manipulation?
In-cell function to return a matched pattern or replaced value in a string.
S..
Good day all,
I have a form that has a password field:
<input type="password" name="password" size="30" />
Naturally, the input text will be replaced by (*).
So if the user typed 123 the bo..
I'm trying to use fetch in React Native to grab information from the Product Hunt API. I've obtained the proper Access Token and have saved it to State, but don't seem to be able to pass it along with..
I am a computer science student learning Java, so I do some work at home and at college on a mixture of Linux and Windows. I have a problem after copying a new project into the Eclipse workspace. The ..
I am new to WAMP and I have just installed it today.
The setup went well and localhost seems to work, but when I try to access phpMyAdmin I get this error:
Forbidden
You don't have permission t..
I'm doing a loop through few input elements of 'checkbox' type. After that, I'm adding values and checked attributes to an array. This is my code:
var stuff = {};
$('form input[type=checkbox]').each(..
I'm using the Owl Carousel on my site. According to their documentation, this piece of JavaScript should work:
<script>
$("#intro").owlCarousel({
// Most important owl features
//Autoplay
aut..
<a href="gohere.aspx" class="my-link">Click me</a>
I did
$('.my-link').attr('disabled', true);
but it didn't work
Is there an easy way to disable the hyperlink using jquery? Remove ..
Say I have the following CSS and HTML code:
_x000D_
_x000D_
#header {_x000D_
height: 150px;_x000D_
}_x000D_
<div id="header">_x000D_
<h1>Header title</h1>_x000D_
Header conten..
Can any one tell me what is a the best way to convert a multipart file (org.springframework.web.multipart.MultipartFile) to File (java.io.File) ?
In my spring mvc web project i'm getting uploaded fi..
I've been getting up to speed with R in the last month.
Here is my question:
What is a good way to assign colors to categorical variables in ggplot2 that have stable mapping? I need consistent color..
How can I get all sub-directories of a given directory without files, .(current directory) or ..(parent directory)
and then use each directory in a function?..
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 this snipped in my page:
$('#category_sorting_form_save').click(function(){
var elements = $("#category_sorting_elements > div");
$.each(elements, function(key, value) {
con..
This version of Android Studio cannot open this project, please retry with Android Studio 3.4 or newer.
but my android studio version is 3.2.1 and there is no new update from Google..
I want to connect a BindingSource to a list of class objects and then objects value to a ComboBox.
Can anyone suggest how to do it?
public class Country
{
public string Name { get; set; }
pub..
I am getting chunks of HTML codes from HTTP calls. I put the HTML blocks in a variable and insert it on my page with[innerHTML] but i can not style the inserted HTML block. Does anyone have any sugges..
I got an array (see below for one object in the array) that I need to sort by firstname using JavaScript.
How can I do it?
var user = {
bio: null,
email: "[email protected]",
firstname: "Anna..
I'm an ex Pascal guy, currently learning C#.
My question is the following:
Is the code below faster than making a switch?
int a = 5;
if (a == 1)
{
....
}
else if(a == 2)
{
....
}
else if(a ..
I am trying to make pagination for my site. (http://anuntorhei.md)
CODE:
var someVar = 50;
function someStupidFunction() {
if (objJson.length > 50) {
document.getElemen..
I have a transparent png image "foo.png"
and I've opened another image with
im = Image.open("foo2.png");
now what i need is to merge foo.png with foo2.png.
( foo.png contains some text and I want..
I'm running a Tomcat 5.5 instance (port: 8089) on Windows 7.
The server runs correctly if I open http://localhost:8089/ but it gives me an error (Connection refused) on http://192.168.1.100:8089/
I ..
How do you open IIS (Internet Information Services) Manager using Windows 10?
I have installed the developer preview of Windows 10 and can't seem to find IIS Manager? It is not in Control Panel > Ad..
How do you use the CSS content property to add HTML entities?
Using something like this just prints to the screen instead of the non-breaking space:
.breadcrumbs a:before {
content: '..
I have both TypeScript and HTML files in my project, in both files tabs are converted to spaces.
I want to turn the auto-conversion off and make sure that my project has only tabs.
Edit:
With this set..
I have a scenario where a user wants to apply several filters to a Pandas DataFrame or Series object. Essentially, I want to efficiently chain a bunch of filtering (comparison operations) together th..
Suppose I have two DataFrames like so:
left = pd.DataFrame({'key1': ['foo', 'bar'], 'lval': [1, 2]})
right = pd.DataFrame({'key2': ['foo', 'bar'], 'rval': [4, 5]})
I want to merge them, so I try s..
I have a pandas data frame like this:
admit gpa gre rank
0 3.61 380 3
1 3.67 660 3
1 3.19 640 4
0 2.93 520 4
Now I want to get a list of rows in pandas like: ..
I have been trying to build a code using maven. But I am stuck with an error.
The code is available on this github repo. google-play-crawler
My system configurations as shown by maven is followning:
..
I am calculating the number of days between the 'from' and 'to' date. For example, if the from date is 13/04/2010 and the to date is 15/04/2010 the result should be
How do I get the result using Jav..
I have a Python module installed on my system and I'd like to be able to see what functions/classes/methods are available in it.
I want to call the help function on each one. In Ruby I can do somethin..
EDIT 2014-02-07: Eclipse Luna is here, and support for Tomcat 8 is included in the bundled WTP : ) Happy days!
Tomcat 8 is still in development, but you can get it here. Now there is a RC version on ..
I found some websites that claim to verify if email addresses are valid. Is it possible to check if an email address is valid using just PHP?
<?php
if($_POST['email'] != ''){
// The e..
I am trying to create a map of strings to strings. Below is what I've tried but neither method works. What's wrong with it?
public class Data
{
private final Map<String, String> data = new ..
Code is:
const foo = (foo: string) => {
const result = []
result.push(foo)
}
I get the following TS error:
[ts] Argument of type 'string' is not assignable to parameter of type 'never'.
..
I'm trying execute following query:
String query = "select entity, entity.id from Site entity";
List resultList = entityManager.createQuery(query).getResultList();
And take exception:
[...]
Cause..
I am using Bootstrap.
I have a text which contains 2 or 3 iframes based embed videos.
This data is fetched from database.
How can I make these iframes responsive?
Example Code:
<div class="row..
I am looking for a command in R which is equivalent of this SQL statement. I want this to be a very simple basic solution without using complex functions OR dplyr type of packages.
Select count(*) as..
I wrote a program in Java that uses a special font that by default doesn't exist on any operating system.
Is it possible in Java to add this special font to the operation system? For example, in Wind..
I often see something similar to this below in PHP scripts using MySQL
query("SET NAMES utf8");
I have never had to do this for any project yet so I have a couple basic questions about it.
I..
I am running a program that I've written in Java in Eclipse. The program has a very deep level of recursion for very large inputs. For smaller inputs the program runs fine however when large inputs ar..
I have installed Jupyter on Windows 10, Python 3.x via
$ pip install jupyter
The installation works fine, even though I did restart the terminal.
But trying to run
$ jupyter notebook
gives the follo..
I understand that to drop a column you use df.drop('column name', axis=1). Is there a way to drop a column using a numerical index instead of the column name?..
This does not compile, any suggestion appreciated.
...
List<Object> list = getList();
return (List<Customer>) list;
Compiler says: cannot cast List<Object> to List<Custome..
I set the path for the tomcat and set all variables like
JAVA_HOME=C:\Program Files (x86)\Java\jdk1.6.0_22
CATALINA_HOME=G:\springwork\server\apache-tomcat-6.0.29
CLASSPATH=G:\springwork\server\apac..
I'm getting a compile error at the following method.
public static boolean isValidPasswd(String passwd) {
String reg = "^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?=.*[~#;:?/@&!\"'%*=¬.,-])(?=[^\\s]..
I'm trying to cast a CHARACTER VARYING column to a DATE but I need a date format like this : DD/MM/YYYY. I use the following SQL query :
ALTER TABLE test
ALTER COLUMN date TYPE DATE using to_date(da..
I have a problem using RANK() in SQL Server.
Here’s my code:
SELECT contendernum,
totals,
RANK() OVER (PARTITION BY ContenderNum ORDER BY totals ASC) AS xRank
FROM (
SELECT Conte..
I've got list of objects. I want to find one (first or whatever) object in this list that has attribute (or method result - whatever) equal to value.
What's is the best way to find it?
Here's test cas..
I have a table which contains 'NULL' values which are of type 'Datetime'. Now i have to convert those into empty string but when when i use convert function
ISNULL( [Accrued Out of Default] ,'' )
h..
Edit: Here's a JSfiddle
Edit2: The error is on this line: <input type="button" value="totalbandwidthresult" onclick="javascript:totalbandwidth();">
Trying to have a button perform a calculat..
I need to take an image and save it after some process. The figure looks fine when I display it, but after saving the figure, I got some white space around the saved image. I have tried the 'tight' op..
I have a stupid java logging problem: I'm loading the logging configuration from my app configuration file - but it just doesn't log anything after reading the file (which looks pretty much like the e..
When I execute npm install I get this error
npm ERR! Error: EPERM: operation not permitted, rename C:\projects******\node_modules\react-async-script' -> 'C:\projects*******\node_modules.react-asy..
I've seen plenty of encryption/decryption tutorials and examples on the net in C# that use the System.Security.Cryptography.RSACryptoServiceProvider, but what I'm hoping to be able to do is:
Create ..
I have one figure which contains many subplots.
fig = plt.figure(num=None, figsize=(26, 12), dpi=80, facecolor='w', edgecolor='k')
fig.canvas.set_window_title('Window Title')
# Returns the Axes inst..
Is it possible to turn on/off power supplies from USB manually with Linux?
There's this external USB cooling fan (the kind you use to cool yourself off, not the PC), and it would be nice to be able t..
For simplicity, assume all relevant fields are NOT NULL.
You can do:
SELECT
table1.this, table2.that, table2.somethingelse
FROM
table1, table2
WHERE
table1.foreignkey = table2.primarykey..
How to ask confirmation from user before he leaves the page as in gmail?
I searched for this question in various places, but all that they mention is the use of javascript window.unload & window...
I have setup gunicorn with 3 workers 30 worker connections and using eventlet worker class. It is setup behind Nginx. After every few requests, I see this in the logs.
[ERROR] gunicorn.error: WORKER ..
If I have an array like this:
1 4 9 16 9 7 4 9 11
What is the best way to reverse the array so that it looks like this:
11 9 4 7 9 16 9 4 1
I have the code below, but I feel it is a little ted..
I want to extract the MSI of an EXE setup to publish over a network.
For example, using Universal Extractor, but it doesn't work for Java Runtime Environment...
I see that Ansible provide some pre-defined variables that we can use in playbooks and template files. For example, the host ip address is ansible_eth0.ipv4.address. Googleing and searching the docs I..
I tried to run my Hello World application in Android Studio. I got the following error:
Emulator: ERROR: x86 emulation currently requires hardware
acceleration!
Please ensure Intel HAXM is properly i..
PrinterLabel = Printer + PrinterNumber
If Floors = 1 And (PrinterLabel) > 127 Then
Wscript.Echo "Invalid Printer11 Selection "
Wscript.Quit
End If
If Floors = 2 And PrinterLabel >..
In Java, \' denotes a single quotation mark (single quote) character, and \" denotes a double quotation mark (double quote) character.
So, String s = "I\'m a human."; works well.
However, String s =..
I've imported a project from Eclipse to Android studio. It utilizes a custom view:
xmlns:app="http://schemas.android.com/apk/res-auto"
I get errors in the lines below from activity_ro.xml f..
I'm getting error:
Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation '='"
I tried changing both tables manually to utf8_general_ci,IMPLICIT but I'..
I'm struggling to understand the difference between shell_exec() and exec()...
I've always used exec() to execute server side commands, when would I use shell_exec()?
Is shell_exec() just a shorthan..
I'm looking to pass two or more parameters to a thread in VB 2008.
The following method (modified) works fine without parameters, and my status bar gets updated very cool-y.
But I can't seem to make ..
May I know what is the difference between C# and .NET? When I think of C#, right away I would say it is a .NET language, but when I search for job posts, they require candidates to have C# and .NET ex..
I have Strings that are put into an ArrayList randomly.
private ArrayList<String> teamsName = new ArrayList<String>();
String[] helper;
For example:
teamsName.add(helper[0]) where hel..
The text is correctly displayed in Chrome. I want it to display this way in all browsers. How can I do this?
I was able to fix this in Safari with -webkit-font-smoothing: antialiased;
Chrome:
Fire..
I develop a package in R and when I check and build it in my local computer it works properly. But when I tried it in CRAN, I get a package dependencies error. My package depends on two functions of o..
I understand that I can specify system properties to Tomcat by passing arguments with the -D parameter, for example "-Dmy.prop=value".
I am wondering if there is a cleaner way of doing this by specif..
I have a simple html multi select drop down list:
<select id="transactionType" multiple="multiple" size="10">
<option value="ALLOC">ALLOC</option>
<option value="LOAD1">LO..
I am a newbie to Java. I am trying to dynamically choose the file location to save the outcome of my project (to be initiated at the very start of my project). I worked around with a few FileDialog ex..
This is the result of the finger command (Today(Monday) when I (Vidya) logged in)
sekic1083 [6:14am] [/home/vidya] -> finger
Name Tty Idle Login Time Where
Felix pts/0 -..
This would mean that the class was initialized, but the variables were not set.
A sample Class:
public class User {
String id = null;
String name = null;
public String getId() {
..
I have the Python code:
from multiprocessing import Process
def f(name):
print 'hello', name
if __name__ == '__main__':
for i in range(0, MAX_PROCESSES):
p = Process(target=f, args=..
Alright, I know how to print variables and strings. But how can I print something like "My string" card.price (it is my variable). I mean, here is my code:
print "I have " (and here I would like to p..
I am experimenting with the support library's recyclerview and cards. I have a recyclerview of cards. Each card has an 'x' icon at the top right corner to remove it:
The card xml, list_item.xml:
&..
I'm currently using <a> tags with jQuery to initiate things like click events, etc.
Example is <a href="#" class="someclass">Text</a>
But I hate how the '#' makes the page jump to..
I am working on a branch in git. When I do
git checkout <commit id>
(commit id obtained from git log ), it is getting committed to that particular change but branch is changed to <No-branc..
Specifically, how does it differ from the default ( async: true ) ?
In what circumstances would I want to explicit set async to false, and does it have something to do with preventing other events o..
When running a JUnit test, using IntelliJ IDEA, I get
How can I correct this?
Using SDK 1.7
Module language level is 1.7
Maven build works fine. (That's why I believe this in IDEA configuration..
How do I get user's IP in django?
I have a view like this:
# Create your views
from django.contrib.gis.utils import GeoIP
from django.template import RequestContext
from django.shortcuts import ren..
I won't get into all the details of why I need this, but users must be able to launch PowerShell as a service account and when PowerShell loads it needs to run a script. I already can launch PowerShel..
I'm trying to create a table where each cell has a background color with white space between them. But I seem to be having trouble doing this.
I tried setting td margins but it seems to have no effec..
I've got code similar to the following...
<p><label>Do you have buffet facilities?</label>
<asp:RadioButtonList ID="blnBuffetMealFacilities:chk" runat="server">
<asp:..
This is probably a pretty simple question. In C# I'm trying to write a simple method, called my "DebugWrite" method, to write out any exceptions caught within my program to a text file stored locally..
I need to create a repo named carboncake.
I tried this:
Cloned the gitosis-admin repository to my local machine
$ git clone [email protected]:repositories/gitosis-admin.git
$ cd gitosis-admin
$ ..
Is there anyway to remove activity label bar and label itself which is set by default from application label?
I'd like to have whole layout from my design and need to remove the label bar and label w..
Is there any alternative way to copy the data from Excel sheet and paste it into a table using Oracle SQL Developer!?
For now I am using (PL/SQL Developer) by writing (for update) at the end of the s..
I have an application that I just would like to use in portrait mode, so I have defined
android:screenOrientation="portrait" in the manifest XML. This works OK for the HTC Magic phone (and prevents or..
I have a common UIViewController that all my UIViewsControllers extend to reuse some common operations.
I want to set up a segue on this "Common" UIViewController so that all the other UIViewControll..
I have a simple web service call, generated by a .NET (C#) 2.0 windows app, via the web service proxy generated by Visual Studio, for a web service also written in C# (2.0). This has worked for severa..
Is there a API for Google Keep? I want to make a windows 8 app for Google Keep, so that it synchronizes with your phone.
I looked into the Drive SDK because Google Keep is a extension of Google Driv..
I have the following folder structure.
application
+-- app
¦ +-- folder
¦ +-- file.py
+-- app2
+-- some_folder
+-- some_file.py
I want to import some functions from file.py ..
I have a <div id="content"> want to load url: http://vnexpress.net content into
my code:
<html>
<head>
<script type="text/javascript">
$(document).rea..
The canonical way to return multiple values in languages that support it is often tupling.
Option: Using a tuple
Consider this trivial example:
def f(x):
y0 = x + 1
y1 = x * 3
y2 = y0 ** y3
re..
In the oracle documentation I found:
-Xmxsize Specifies the maximum size (in bytes) of the memory allocation pool in bytes ... The default
value is chosen at runtime based on system configuratio..
To launch programs from my Python-scripts, I'm using the following method:
def execute(command):
process = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
..
Basic jquery question. I have an option element as below.
<option class='select_continent' value='7'>Antarctica</option>
jquery
$(".select_continent").click(function () {
alert(th..
Currently I am using a service to perform an action, namely
retrieve data from the server and then store the data on the server itself.
Instead of this, I want to put the data into local storage inst..
I have a datatable that I'm converting into a List, serializing it and passing it to my view using a viewmodel.
My viewmodel looks like this:
public class AddressModel
{
public string Addresses ..
I have a huge jQuery application, and I'm using the below two methods for click events.
First method
HTML
<div id="myDiv">Some Content</div>
jQuery
$('#myDiv').click(function(){
..
I have a Bootstrap modal which is launched from a link. For about 3 seconds it just sits there blank, while the AJAX query fetches the data from the database. How can I implement some sort of a loadin..
I am building a project with OpenCV in C#. It requires a dll file called cvextern.dll. but, when adding this file as a reference, this message appears :-
a reference "cvextern.dll" can't be added, Pl..
Possible Duplicate:
Convert JS object to JSON string
I have a JSON object in JS, and I would like to convert it to string. Is it a function for this?
Thanks in advance,..
I have excel data in following format.
Date Amount
03-Jan-13 430.00
25-Jan-13 96.00
10-Jan-13 440.00
28-Feb-13 72.10
28-Feb-13 72.30
I need to sum the amount field only if the..
I am using annotations to configure my spring environment like this:
@Configuration
...
@PropertySource("classpath:/config/default.properties")
...
public class GeneralApplicationConfiguration implem..
My question is related to the answer found in this post by user Consultuning on Oct 22 '09 at 18:31:
mysql query to dynamically convert row data to columns
It appears that Consultuning's answer cont..
So I have an NSArray "myArray" with NSNumbers and NSStrings. I need them in another UIView so i go like this:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPa..
How can I call a stored procedure from command line?
I have a procedure:
CREATE DEFINER=`root`@`localhost` PROCEDURE `insertEvent`(IN `dateTimeIN` DATETIME)
NO SQL
BEGIN
SET @eventIDOut = NU..
I know that PHP is compiled to byte code before it is run on the server, and then that byte code can be cached so that the whole script doesn't have to be re-interpreted with every web access.
But ca..
I am looking for a hibernate criteria to get following:
Dokument.class
is mapped to Role
roleId
Role.class
has a ContactPerson
contactId
Contact.class
FirstName
LastName
I want to search for First..
I'm using a MySql database with a Java program, now I want to give the program to somebody else.
How to export the MySql database structure without the data in it, just the structure?..
I ported my Android app to honeycomb and I did a big refactor in order to use fragments. In my previous version, when I pressed the Home button I used to do a ACTIVITY_CLEAR_TOP in order to reset the ..
Is there a way to have an auto_incrementing BIGINT ID for a table.
It can be defined like so
id bigint auto_increment
but that has no effect (it does not increment automatically).
I would like to i..
I have tomcat 5.5 installed, running and verifiable at http://localhost:8080/. The Tomcat menu option appears in the Eclipse menu bar and I can start and stop Tomcat from there. In Eclipse, it does no..
Is there a simple way to delete all tracking branches whose remote equivalent no longer exists?
Example:
Branches (local and remote)
master
origin/master
origin/bug-fix-a
origin/bug-fix-b
origin/b..
I was asked to build a java system that will have the ability to load new code (expansions) while running.
How do I re-load a jar file while my code is running? or how do I load a new jar?
Obviously..
I want to use a full-height app using flexbox. I found what I want using old flexbox layout module (display: box; and other things) in this link: CSS3 Flexbox full-height app and overflow
This is a c..
I've created a JSFiddle with a dropdown navbar using angular-ui-boostrap's module "ui.bootstrap.dropdownToggle": http://jsfiddle.net/mhu23/2pmz5/
<div class="navbar navbar-fixed-top">
<div c..
I am looking to create an effect like this, but my website has a dynamic background-color. Note that this example uses a white overlay, which does not work with different backgrounds.
p {
width: ..