I am trying to POST data to my API. I have a model with an image field where:
image = models.ImageField()
I have an image on my local box, which I am trying to send. Am I sending it correctly?
{
..
I'm building a fairly simple application, research, in my Django project that uses Django-CMS. (It's my first ground-up attempt at a project/application.) It's main purpose is to store various intel..
Before saving model I'm re-size a picture. But how can I check if new picture added or just description updated, so I can skip rescaling every time the model is saved?
class Model(model.Model):
i..
In my model I have :
class Alias(MyBaseModel):
remote_image = models.URLField(max_length=500, null=True, help_text="A URL that is downloaded and cached for the image. Only
used when the alias is..
Ok, I've tried about near everything and I cannot get this to work.
I have a Django model with an ImageField on it
I have code that downloads an image via HTTP (tested and works)
The image is saved ..
I followed this small "tutorial" on how to add a scrollbar to an ItemsControl, and it works in Designer view, but not when I compile and execute the program (only the first few items show up, and no s..
I'm implementing some algorithms to teach myself about graphs and how to work with them. What would you recommend is the best way to do that in Java? I was thinking something like this:
public class ..
In regards to the answer for this question Passing DataContext into Action(), how do I return a value from action(db)?
SimpleUsing.DoUsing(db => {
// do whatever with db
});
Should be more li..
Based on an associative array in a Bash script, I need to iterate over it to get the key and value.
#!/bin/bash
declare -A array
array[foo]=bar
array[bar]=foo
I actually don't understand how to ge..
I am creating a table using Vue.js and I want to define an onClick event for each row that passes contactID. Here is the code:
<tr v-for="item in items" class="static"
v-bind:class="{'evenRo..
I am creating a figure in Matplotlib like this:
from matplotlib import pyplot as plt
fig = plt.figure()
plt.plot(data)
fig.suptitle('test title')
plt.xlabel('xlabel')
plt.ylabel('ylabel')
fig.savefi..
I am trying to debug stored procedures in SQL Server Management Studio 2008. I want to insert some print statements to test some IF-statements that I know are wrong.
In order to do debugging, I tried..
I started some work on a new feature and after coding for a bit, I decided this feature should be on its own branch.
How do I move the existing uncommitted changes to a new branch and reset my curre..
I'm new to GitHub. Today I met some issue when I was trying to push my code to GitHub.
Pushing to [email protected]:519ebayproject/519ebayproject.git
To g[email protected]:519ebayproject/519ebayproject.git
..
How can I find which Hive version I am using from the command prompt. Below is the details-
I am using Putty to connect to hive table and access records in the tables. So what I did is- I opened Putt..
I am having a problem where I am trying to use array of data to render a <ul> element. In the code below the console.log's are working fine, but the list items aren't appearing.
var Main = Rea..
I'm trying to extract the attributes of a anchor tag (<a>). So far I have this expression:
(?<name>\b\w+\b)\s*=\s*("(?<value>[^"]*)"|'(?<value>[^']*)'|(?<value>[^"'<&..
I have a situation in which I want to print all the exception caught in catch block using logger.
try {
File file = new File("C:\\className").mkdir();
fh = new FileHandler("C:\\class..
A new problem has arisen for me as I tried to run my script on a different PHP Server.
ON my old server the following code appears to work fine - even when no s parameter is declared.
<?php
if..
What event system for Python do you use? I'm already aware of pydispatcher, but I was wondering what else can be found, or is commonly used?
I'm not interested in event managers that are part of larg..
I put a string array elements is a map where elements of string array is key and frequency of word is value, e.g.:
String[] args = {"if","it","is","to","be","it","is","up","me","to","delegate"};
..
There are two application servers and a switch. When i access application by using application server ip it works fine. However if i use switch ip in my url Bad request error throws up only for firefo..
I have a page with a document.onkeydown event handler, and I'm loading it inside an iframe in another page. I have to click inside the iframe to get the content page to start "listening".
Is there s..
I'm making an web-app in angular 4 and there is a question i came up with.
It's the following:
I use a property called currentLesson. This property has a variable number from 1 to 6.
In my component..
I have packed my Electron application using the following command:
asar pack app app.asar
Now, I need to unpack it and get the whole code back. Is there any way to do so?..
According to the official documentation, os.path is a module. Thus, what is the preferred way of importing it?
# Should I always import it explicitly?
import os.path
Or...
# Is importing os enough..
I have some issues with Vagrant shared folders, my base system is Ubuntu 13.10 desktop.
I do not understand why I have this error is something that is not right configured ? Is a NFS issue or Virtual..
How can I merge two arrays (one with string => value pairs and another with int => value pairs) while keeping the string/int keys? None of them will ever overlap (because one has only strings and the ..
This is from SQL Server 2008, ssms
When I create a table, it creates under dbo.
I would like to create it under a different schema, but when I use the 'New Table' dialog, I can never find the field ..
I want to set background drawable of a view. There are two methods for this (as far as I see): setBackground and setBackgroundDrawable.
When I use setBackground, it says it has been added in API lev..
In C# it would be like this:
table
.GroupBy(row => row.SomeColumn)
.Select(group => group
.OrderBy(row => row.AnotherColumn)
.First()
)
Linq-To-Sql translates it to ..
I get a strange error using json_decode(). It decode correctly the data (I saw it using print_r), but when I try to access to info inside the array I get:
Fatal error: Cannot use object of type stdCl..
How can I change my default xampp localhost c:xampp/htdoc to another folder i.e. c:/alan? When I use the IP address I should be able to view my website file in C:/alan.
Thanks for helping me...
In C#, I might do something like this:
System.Net.WebClient w = new System.Net.WebClient();
w.Credentials = new System.Net.NetworkCredential(username, auth, domain);
string webpage = w.DownloadString..
In my app I need to change the bottom navigation bar color. I watched many post but cant find with the solution. I am using appCompat library.
v21/styles.xml
<style name="AppTheme" parent="Them..
I'm trying to use Process.Start with redirected I/O to call PowerShell.exe with a string, and to get the output back, all in UTF-8. But I don't seem to be able to make this work.
What I've tried:
P..
When i run this code.
#include <stdio.h>
void moo(int a, int *b);
int main()
{
int x;
int *y;
x = 1;
y = &x;
printf("Address of x = %d, value of x = %d\n", &x, ..
I am trying to get an AngularJS 1.2 RC2 app up and running. Currently, I've been using the Angular Seed project to try and get my app up and running. Unfortunately, the Angular Seed project uses v1.0...
I am using SQL Server 2008 R2 Standard (version 10.50.1600.1) for my production website and
SQL Server Express edition with Advanced Services (v10.50.1600.1) for my localhost as a database.
Few days..
How do I get rid of the extra padding in the new Toolbar with Android SDK API version 21 (the support library)?
I am talking about the red arrows on this picture:
Here is the code I am using:
<..
Using VS2012 working on a VB.NET WPF application. I have a simple MusicPlayer tutorial app I am using to learn WPF. I am converting a C# version of the tutorial to VB.NET step by step.
It has 2 c..
Just trying to figure out how to use many multiple cases for a Java switch statement. Here's an example of what I'm trying to do:
switch (variable)
{
case 5..100:
doSomething();
break..
I know its possible to cast a list of items from one type to another (given that your object has a public static explicit operator method to do the casting) one at a time as follows:
List<Y> Li..
I'm using Firebase for a web app. It's written in plain Javascript using no external libraries.
I can "push" and retrieve data with '.on("child_added")', but '.remove()' does not work the way it says..
GNU gdb Fedora (6.8-37.el5)
Kernal 2.6.18-164.el5
I am trying to debug my application. However, everytime I pass the binary to the gdb it says:
(no debugging symbols found)
Here is the file ou..
I wrote android code that shows a pop-up dialog but I want to change the background color from black to white , and then the color of the writing.
This is the dialog's code:
mPrefs = PreferenceMana..
I have some data called stations which is an array containing objects.
stations : [
{call:'station one',frequency:'000'},
{call:'station two',frequency:'001'}
]
I'd like to render a ui componen..
In Excel Pivot table report there is possibility for user intervention by inserting "Calculated Field" so that user can further manipulate the report. This seems like best approach compared to using f..
I am looking for the best way to check if a Com Object exists.
Here is the code that I have; I'd like to improve the last line:
$ie = New-Object -ComObject InternetExplorer.Application
$ie.Navigate(..
I am trying to make a modal with a body that will scroll when the content becomes too large. However, I want the modal to be responsive to the screen size. When I set the max-height to 40% it has no e..
I have difficulties changing the text size of the tabs of design library tablayout (android.support.design.widget.TabLayout).
I managed to change it by assigning tabTextAppearance in TabLayout
app:..
I need a bash command that will convert a string to something that is escaped. Here's an example:
echo "hello\world" | escape | someprog
Where the escape command makes "hello\world" into "hello\\\..
I have a remote Git server, here is the scenario which I want to perform:
For each bug/feature I create a different Git branch
I keep on committing my code in that Git branch with un-official Git me..
Does any one know how to convert special characters to HTML in Javascript?
Example:
& (ampersand) becomes &.
" (double quote) becomes " when ENT_NOQUOTES is not set.
' (single qu..
Drawing a line on the HTML5 canvas is quite straightforward using the context.moveTo() and context.lineTo() functions.
I'm not quite sure if it's possible to draw a dot i.e. color a single pixel. The..
I have a question about JUnit assertEquals to test double values. Reading the API doc I can see:
@Deprecated
public static void assertEquals(double expected, double actual)
Deprecated. Use assertEqu..
I have to test out my new GA account on my local machine.
Will this work just by copying the standard snippet supplied by Google onto the page ?
I don't want to spend 24 hours waiting to see if it..
I am new to YAML and have been searching for ways to parse a YAML file and use/access the data from the parsed YAML.
I have come across explanations on how to parse the YAML file, for example, the P..
I'm finding it tricky to resize images to make them responsive.
I'm developing a php application to automatically convert a website to a responsive version. I'm a little stuck on the images.
I've su..
The following is my CREATE TABLE script:
create table EMPLOYEES
(EmpID char(4) unique Not null,
Ename varchar(10),
Job varchar(9),
MGR char(4),
Hiredat..
What's the simplest way to add a click event handler to a canvas element that will return the x and y coordinates of the click (relative to the canvas element)?
No legacy browser compatibility requir..
I have a strange error. I'm experimenting with a .NET 4.5 Web API, Entity Framework and MS SQL Server. I've already created the database and set up the correct primary and foreign keys and relationshi..
My CUDA program crashed during execution, before memory was flushed. As a result, device memory remained occupied.
I'm running on a GTX 580, for which nvidia-smi --gpu-reset is not supported.
Placin..
so I am getting this in logcat:
java.lang.RuntimeException: Parcelable encountered IOException writing serializable object (name = com.resources.student_list.Student)
I know this means that my stud..
I need to find a commit in Git by a given hash, SHA. For example, if I have the "a2c25061" hash, and I need to get the author and the committer of this commit.
What is the command to get that?..
Okay after hours of research and still using DB::select I have to ask this question. Because I am about to trough my computer away ;).
I want to get the last input of a user (base on the timestamp). ..
I have a small Angular2 project based on the Angular2 Seed project that I am trying to upgrade to Angular2 RC5.
My project has a few features, one of them called home. Home component uses a child co..
I have the following dictionary in python:
d = {'1': 'one', '3': 'three', '2': 'two', '5': 'five', '4': 'four'}
I need a way to find if a value such as "one" or "two" exists in this dictionary.
F..
I keep getting this error mesage when trying to add a breakpoint in gdb.
I've used these commands to compile:
gcc -g main.c utmpib2.c -o main.o
and:
cc -g main.c utmpib2.c -o main.o
and also:
g++ -g..
If I use tel: I should write the international phone code, like that.
<a href="tel:+6494461709">61709</a>
So far, so good, but I can't find information on how to write a cell phone numb..
I'm trying to use dynamic variable names (I'm not sure what they're actually called) But pretty much like this:
for($i=0; $i<=2; $i++) {
$("file" . $i) = file($filelist[$i]);
}
var_dump($file..
I think (actually I KNOW!) I'm doing something wrong here I am trying to populate some values into HashMap and add each hasmap to a list which will be added to a JSON object:
JSONObject json = new JS..
Here is the Format for RESTful call:
HEADERS:
Content-Type: application/json;charset=UTF-8
Authorization: Bearer Rc7JE8P7XUgSCPogjhdsVLMfITqQQrjg
REQUEST:
GET https://api.example.com/1/r..
I want to use Gradle 1.10 instead of 1.9. I cannot seem to find where to change this.
If I put this:
task wrapper(type: Wrapper) {
gradleVersion = '1.10'
}
in my build.gradle and rebuild, it i..
If I do the following:
import subprocess
from cStringIO import StringIO
subprocess.Popen(['grep','f'],stdout=subprocess.PIPE,stdin=StringIO('one\ntwo\nthree\nfour\nfive\nsix\n')).communicate()[0]
I..
I have been trying to add background image to a div class using CSS, but I didn't have any success.
HTML code:
<header id="masthead" class="site-header" role="banner"&..
I have been trying to get all rows from the SQLite database. But I got only last row from the following codes.
FileChooser class:
public ArrayList<String> readFileFromSQLite() {
fileName =..
I managed to configure and schedule a Quartz job using JobStoreTX persistent store in Spring. I do not use Spring's Quartz jobs, because I need to schedule them dynamically, at run time, and all exam..
so, i'm trying to push some files to /system on android device (zte)
I've rooted, connected with ADB,
adb remount -> I get permission denied
adb shell su -> I'm able to access shell and create folde..
I want to change every value in a hash so as to add '%' before and after the value so
{ :a=>'a' , :b=>'b' }
must be changed to
{ :a=>'%a%' , :b=>'%b%' }
What's the best way to do thi..
I am trying to parse url-encoded strings that are made up of key=value pairs separated by either & or &.
The following will only match the first occurrence, breaking apart the keys and v..
I have a decimal column in a table defined as decimal(8,3). I would like to include this column in a Select statement, convert it to a Varchar and only display two decimal places. I can't seem to find..
Is it possible to have an optional route parameter in the Angular 2 route? I tried the Angular 1.x syntax in RouteConfig but received below error:
"ORIGINAL EXCEPTION: Path "/user/:id?" contains ..
I collect a few corner cases and brain teasers and would always like to hear more. The page only really covers C# language bits and bobs, but I also find core .NET things interesting too. For example,..
How can I check whether a option already exist in select by JQuery?
I want to dynamically add options into select and so I need to check whether the option is already exist to prevent duplication...
All I'm trying to do is download some JSON and deserialize it into an object. I haven't got as far as downloading the JSON yet.
Almost every single HttpClient example I can find, including those on t..
Initially, the table "MyTable" has been defined in the following way:
CREATE TABLE IF NOT EXISTS `MyTable` (
`Col1` smallint(6) NOT NULL AUTO_INCREMENT,
`Col2` smallint(6) DEFAULT NULL,
`Col3` ..
How can i call a jQuery function from javascript?
//jquery
$(function() {
function my_fun(){
/.. some operations ../
}
});
//just js
function js_fun () {
..
I have a view that I want to create a table from in SQL Enterprise Manager, but I always get an error when I run this query:
CREATE TABLE A
AS
(SELECT top 10 FROM dbo.myView)
So far the error is: ..
I have a text file which contains a table comprised of numbers e.g:
5 10 6
6 20 1
7 30 4
8 40 3
9 23 1
4 13 6
if for example I want the numbers contained only in the second column, how do i extract ..
I'm trying to keep the legend of one layer (smooth) and remove the legend of the other (point). I have tried shutting off the legends with guides(colour = FALSE) and geom_point(aes(color = vs), show.l..
I'm trying to create a simple Bash script to check if the website is down and for some reason the "and" operator doesn't work:
#!/usr/bin/env bash
WEBSITE=domain.com
SUBJECT="$WEBSITE DOWN!"
EMAILID..
I would like to zoom in/out an UIImage object when the user performs the standard pinch action on my application. I'm currently using a UIImageView to display my image, if that detail helps in any way..
Please am trying to implement a filter on my listview. But whenever the text change, the list disappears.Please Help
Here are my codes. The adapter class.
package com.talagbe.schymn;
import java.ut..
I am trying to produce an all-in-one delete/insert/update trigger. I get two "incorrect syntax near AFTER at the second and third AFTERS and a syntax error near the last END.
CREATE TRIGGER trig_all..
I am trying to launch chrome with an URL, the browser launches and it does nothing after that.
I am seeing the below error after 1 minute:
Unable to open browser with url: 'https://www.google.com' ..
I am reading an development guide of Facebook Developers at here
It says that I must use keytool to export the signature for my app such as:
keytool -exportcert -alias androiddebugkey -keystore ~/...
I have a bit of an issue with a function running in chrome that works properly in Safari, both webkit browsers...
I need to customize a variable in a function for Chrome, but not for Safari.
Sadly, ..
I have, in my naivety, set up a git submodule and treated it like a Subversion external - i.e. it's now full of changes that I've just realized haven't been committed or pushed anywhere.
Is there som..
On my page I have a set of div elements that should be connected with lines like I showed in the image below. I know that with a canvas I can draw lines between these elements, but is it possible to d..
I'm attempting to justify a navbar (make the navbar contents stretch) in Bootstrap 3. I've added margin: 0 auto; max-width: 1000px; to the nav* classes, and also attempted to add a container element a..
How do I identify empty textboxes using jQuery? I would like to do it using selectors if it is at all possible. Also, I must select on id since in the real code where I want to use this I don't want t..
How, in Yii, to get the current page's URL. For example:
http://www.yoursite.com/your_yii_application/?lg=pl&id=15
but excluding the $GET_['lg'] (without parsing the string manually)?
I mean, ..
I've just installed ubuntu docker image, when I execute "ifconfig" it says there's no such command, I tried apt-get install by there's no package named "ifconfig"(I can install some other images).
So..
I want to change default text on button that is "Choose File" when we use input="file".
How can I do this? Also as you can see in image button is on left side of text. How can I put it on right sid..
I'm trying to install some node packages through npm, but it won't go.
I've already tried to install/unistall/update node, but nothing seems to work.
I'm using ubuntu 12.04 - Here is how i'm trying t..
I'm making a Windows application, which you need to log into first.
The account details consist of username and password, and they need to be saved locally.
It's just a matter of security, so other p..
Just started with the playground. I'm trying to create a simple app.
I've created a date object like this:
var date = NSDate()
How can I get the current hour? In other languages I can do something..
I have this UIImageView and I have the values of its max height and max width. What I want to achieve is that I want to take the image (with any aspect ratio and any resolution) and I want it to fit i..
When I try to open my Visual Studio project I get the following error:
Asp.Net has not been registered on the webserver you need to manually configure your webserver for Asp.net 4.0.
Update:
N..
I was confused with usage of %c and %s in the following C program
#include <stdio.h>
void main()
{
char name[]="siva";
printf("%s\n",name);
printf("%c\n..
I'm in the process of converting my projects to OSGI bundles using maven and eclipse. Maven builds the stuff just fine, only I get the above error now within Eclipse. How can I find out which project ..
I need to find an element position in an std::vector to use it for referencing an element in another vector:
int find( const vector<type>& where, int searchParameter )
{
for( int i = 0;..
I am working on Django project with virtualenv and connect it to local postgres database. when i run the project is says,
ImportError: No module named psycopg2.extensions
then i used this command t..
In Twitter bootstrap, looking at the modals documentation. I wasn't able to figure out if there is a way to listen to the close event of the modal and execute a function.
e.g. lets take this modal as..
I have a 100 lines, 3 years old python scraper that now bug. Starting lines are:
import urllib, re, os, sys, time # line 1: import modules
os.chdir(os.path.dirname(sys.argv[0])) # line 2: all work..
These StackOverflow questions here, here, and here all say the same thing, but I can't get it to run in SSMS or SQLFiddle
CREATE TABLE #Names
(
Name1 VARCHAR(100),
Name2 VARCHAR(100)
)
..
I tried to update MySQL from 5.1 to 5.5 in CentOS 6.2. The following is the process I did:
1. rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm
2. yum install libmysqlclient15 --enablerepo=we..
I've seen questions on how to prefix zeros here in SO. But not the other way!
Can you guys suggest me how to remove the leading zeros in alphanumeric text? Are there any built-in APIs or do I need to..
I wish to all know how the tables in my database are related to each other (i.e PK/FK/UK) and hence i created a database diagram of all my tables in SQL Server. The diagram that was created was not ea..
$a = 'how are you';
if (strpos($a,'are') !== false) {
echo 'true';
}
In PHP, we can use the code above to check if a string contain specific words, but how can I do the same function in JavaScri..
Sorry if this question has already been asked here before, I could not find a suitable answer.
I am wanting to create a JavaScript sleep/delay/wait function that I can call anywhere in the script, li..
Code:
import urllib2 as u
import os as o
inn = 'dword.txt'
w = open(inn)
z = w.readline()
b = w.readline()
c = w.readline()
x = w.readline()
m = w.readline()
def Dict(Let, Mod):
global str
in..
Lately, I've been trying to learn C++ from this website. Unfortunately whenever I try to run one of the code samples, I see that program open for about a half second and then immediately close. Is the..
How can I send a GET request using the Spring RestTemplate?
Other questions have used POST, but I need to use GET.
When I run this, the program continues to work, but it seems that the network is clog..
var a = [1, 2, 3];
var b = [3, 2, 1];
var c = new Array(1, 2, 3);
alert(a == b + "|" + b == c);
demo
How can I check these array for equality and get a method which returns true if they are equal?..
I have created a self-signed SSL certificate for the localhost CN. Firefox accepts this certificate after initially complaining about it, as expected. Chrome and IE, however, refuse to accept it, even..
I need to get the index value of the minimum value in my arraylist in Java. MY arraylist holds several floats, and I'm trying to think of a way I can get the index number of the smallest float so I ca..
If I had a URL such as
http://localhost/search.php?year=2008
How would I write a JavaScript function to grab the variable year and see if it contains anything?
I know it can be done with location...
I am having a very strange problem with git and github. When I try and push, I am getting:
git push -u origin master
ERROR: Repository not found.
fatal: The remote end hung up unexpectedly
I added ..
I am using ASP.NET Web API: http://xyzdomain.com:16845/api/returns/returns
How do I send a POST request to the endpoint using Postman Chrome extension, given Items is a collection:
[
{
"Items"..
I've noticed this pattern in a lot of Android apps and games recently: when clicking the back button to "exit" the application, a Toast comes up with a message similar to "Please click BACK again to e..
Difference between UTF-8 and UTF-16?
Why do we need these?
MessageDigest md = MessageDigest.getInstance("SHA-256");
String text = "This is some text";
md.update(text.getBytes("UTF-8")); // Change th..
I am trying to search for a string 0.49 (with dot) using the command
grep -r "0.49" *
But what happening is that I am also getting unwanted results which contains the string such as 0449, 0949 etc,..
Can anyone tell me why we set random state to zero in splitting train and test set.
X_train, X_test, y_train, y_test = \
train_test_split(X, y, test_size=0.30, random_state=0)
I have seen situati..
I have an ajax call passing data to a page which then returns a value.
I have retrieved the successful call from the page but i have coded it so that it raises an error in the asp. How do i retrieve ..
I'm trying fetch data via REST with angular 2 HttpClient. I'm following the angular tutorial here https://angular.io/tutorial/toh-pt6 and under the Heroes and HTTP section you'll see this snippet of c..
I need a unique identifier in .NET (cannot use GUID as it is too long for this case).
Do people think that the algorithm used here is a good candidate or do you have any other suggestions?..
From terminal window:
When I use the rm command it can only remove files.
When I use the rmdir command it only removes empty folders.
If I have a directory nested with files and folders within f..
I am linking on an intranet page to a local file on a shared drive:
<a href="file:///s:/test.xls"> Test</a>
This works in IE and Firefox with an addon called local link.
How can..
I need to create a CSS stylesheet class dynamically in JavaScript and assign it to some HTML elements like - div, table, span, tr, etc and to some controls like asp:Textbox, Dropdownlist and datalist...
How to prevent background scrolling when Bootstrap 3 modal open on mobile platforms? On desktop browsers the background is prevented from scrolling and works as it should.
On mobile browsers (Safari..
I already have purchased SSL certificate and i have received certificate and a .pem file as a private key? from the supplier; now i need to convert this .pem key into .key for bitnami Redmine Apache w..
I want my program to open a file if it exists, or else create the file. I'm trying the following code but I'm getting a debug assertion at freopen.c. Would I be better off using fclose and then fopen ..
Code:
d = {'a': 0, 'b': 1, 'c': 2}
l = d.keys()
print l
This prints ['a', 'c', 'b']. I'm unsure of how the method keys() determines the order of the keywords within l. However, I'd like to be able..
After digging around for Visual Studio IDE 2015 update 3 offline installer, aka ISO file, I found it and I am sharing the url.
And, I know this may be posted elsewhere. But I also do know that many p..
What the difference between
-Xms4096m
-Xmx2048M
-XX:MaxPermSize=712M
I am getting confused of this two -Xmx2048M and -XX:MaxPermSize=712M
and will happen if I use -Xmx2048M or -Xmx2048m..
I have DataFrame with column Sales.
How can I split it into 2 based on Sales value?
First DataFrame will have data with 'Sales' < s and second with 'Sales' >= s ..
I am using the bootstrap Dropdown component in my application like this:
<div class="btn-group">
<button class="btn">Please Select From List</button>
<button class="btn d..
We are brand new to Java, Spring, and Spring Security, but not new to development. We've been able to create a Spring Security-based Thymeleaf login page that uses a JNDI datasource to connect to our ..
Is it possible to make chrome extension that interacts with sqlite database similarly as firefox extension? Could you give me some advise or link where is more info about developing chrome extension i..
I am using Python 2.7 and trying to use dateutil as follows:
from dateutil import parser as _date_parser
However, I get the following error:
Traceback (most recent call last):
File "<pyshell#..
what is the best way to check if a Data Table has a null value in it ?
Most of the time in our scenario, one column will have all null values.
(This datatable is returned by a 3rd party application ..
I'm using an amazon Ubuntu EC2 instance which is only has a command line interface. I want to setup UI for that server to access using remote desktop tools. Is there any way to apply GUI to the EC2 in..
Usually we can define a variable for a C++ struct, as in
struct foo {
int bar;
};
Can we also define functions for a struct? How would we use those functions?..
I have the following recursion code, at each node I call sql query to get the nodes belong to the parent node.
here is the error:
Exception RuntimeError: 'maximum recursion depth exceeded' in <..
I have an MVC4 project with language selection:
en
nl
fr
de
1 main part with:
About
Common (for the menu)
Contact
Faq
Home
And 3 areas:
Admin
Customers
Shop
In each area I have at least on..
I am loading an aspx web page in an iframe. The content in the Iframe can be of more height than the iframe's height. The iframe should not have scroll bars.
I have a wrapper div tag inside the ifram..
Two questions about using a question mark "?" and colon ":" operator within the parentheses of a print function: What do they do? Also, does anyone know the standard term for them or where I can find..
How can a JavaScript function in JSP be called during page load without using
<body onload="disableView()">
I have to call this function in a few JSP's on page load but JSP's are divided into..
The bottom-up approach (to dynamic programming) consists in first looking at the "smaller" subproblems, and then solve the larger subproblems using the solution to the smaller problems.
The top-down ..
I have a slider that can be pulled up and then it shows a map. I can move the slider up and down to hide or show the map. When the map is on front, I can handle touch events on that map. Everytime I t..
After updating to Snow Lion I started receiving these errors in Flash Builder / Eclipse when trying to use SVN:
Failed to load JavaHL Library.
These are the errors that were encountered:
no libsvnja..
Here's my scenario:
Let's say I have a stored procedure in which I need to call another stored procedure on a set of specific ids; is there a way to do this?
i.e. instead of needing to do this:
exe..
I'm writing a program to check if something is a file or is a directory. Is there a better way to do it than this?
#include <stdio.h>
#include <sys/types.h>
#include <dirent.h>
#in..
Currently I have a paragraph heading and an image to its right, on the same line:
<div class="paragraphs">
<div class="row">
<div class="span4">
<div class="content-h..
In Ruby some methods have a question mark (?) that ask a question like include? that ask if the object in question is included, this then returns a true/false.
But why do some methods have exclamatio..
I have d1="11" and d2="07". I want to convert d1 and d2 to integers and perform d1-d2. How do I do this in UNIX?
d1 - d2 currently returns "11-07" as result for me...
I am attempting to embed a youtube video, however, I have not discovered a way to keep the bar at the top from showing when the mouse hovers over it. For my purposes it is important that users are not..
When we create a table in MySQL with a VARCHAR column, we have to set the length for it. But for TEXT type we don't have to provide the length.
What are the differences between VARCHAR and TEXT?..
Basically just trying to add text to an input field that already contains a value.. the trigger being a button..
Before we click button, form field would look like.. (user inputted some data)
[This ..
So I recently stumbled upon this great library for handling HTTP requests in Python; found here http://docs.python-requests.org/en/latest/index.html.
I love working with it, but I can't figure out ho..
I've gone through the iBook from Apple, and couldn't find any definition of it:
Can someone explain the structure of dispatch_after?
dispatch_after(<#when: dispatch_time_t#>, <#queue: dispa..
I know that you can't (at least not easily) restore a SQL Server 2012 backup on SQL Server 2008. But how does it work for SQL Server 2014 to SQL Server 2012 ?
On database level there is the property ..
Below is the VBA code. Sheet2 contains all of the values in general format. After running the code, values in column 'C' of Sheet3 contain exponential values for numbers which are 13 or more digits...
From today, when I tried to run an app in NetBeans on a 2.3.3 Android platform, it shows me that:
Failed to allocate memory: 8
This application has requested the Runtime to terminate it in an..
I am using EF Code First with EF 5 in VS 2012. I use PM update-database command and I have a simple seed method to fill some tables with sample data.
I would like to delete and recreate my x.mdb. The..
I'm embedding a Flash video into an HTML and would like the user to have to click it to begin playing. According to the Adobe <object> / <embed> element documentation, there are variety of..
I would like to compile my Java program in Eclipse but not to run it. I can't understand how to do it.
How can I compile a Java program to .class files in Eclipse without running it?..
I am following this link to integrate Google sign-in in my android app.https://developers.google.com/identity/sign-in/android/start-integrating
As given in last step on the above given page we have t..
I am trying just to display a div when user press a button, seems to be easy, but after spent a lot of time I am getting really crazy with this. My code is
My fiddle: http://jsfiddle.net/jmhostalet/..
I want to access my current working directory using java.
My code :
String current = new java.io.File( "." ).getCanonicalPath();
System.out.println("Current dir:"+current);
String currentD..
Okay--I know this is a really elementary issue, but I can't figure it out. This is a question regarding Laravel.
Basically, I have my stylesheets embedded in my default layout view. I'm currently jus..