I'm trying to create a simple Caesar Cipher function in Python that shifts letters based on input from the user and creates a final, new string at the end. The only problem is that the final cipher te..
I have this problem where I have set an image to display another image when the mouse hovers over, however the first image still appears and the new one doesn't change height and width and overlaps th..
I need to select data from MySQL database between the 1st day of the current month and current day.
select*from table_name
where date between "1st day of current month" and "current day"
Can someo..
I am trying to get the current workspace of my Jenkins build using a Groovy pipeline script:
node('master') {
// PULL IN ENVIRONMENT VARIABLES
// Jenkins makes these variables available for e..
I use multiple workspaces with Eclipse. I recently noticed that some of my workspaces have a lot of cruft in them from software packages that I installed and then later removed. As far as I can tell, ..
Are there any alternatives to the code below:
startFromLine = 141978 # or whatever line I need to jump to
urlsfile = open(filename, "rb", 0)
linesCounter = 1
for line in urlsfile:
if linesCoun..
I'm trying to convert a query to an array with the method toArray() but it doesn't work for the query builder. Any ideas for convert it?
Example
DB::table('user')->where('name',=,'Jhon')->get(..
I know it's an easy way of doing it but i didn't find it neither here nor on google.
So i was curious if there is a way to install multiple packages using pip.
Something like:
pip install progra1..
I have some source code that was compiled on Windows. I am converting it to run on Red Hat Linux.
The source code has included the <windows.h> header file and the programmer has used the Sleep..
I need to close the current fxml window by code in the controller
I know stage.close() or stage.hide() do this in fx
how to implement this in fxml? I tried
private void on_btnClose_clicked(Acti..
So I have these two problems for a homework assignment and I'm stuck on the second one.
Use a Python Set Comprehension (Python's equivalent of Set Builder notation) to generate a set of all of the ..
Is there a way to statically/globally request a copy of the ApplicationContext in a Spring application?
Assuming the main class starts up and initializes the application context, does it need to pass..
Currently I am working on a python project that contains sub modules and uses numpy/scipy. Ipython is used as interactive console. Unfortunately I am not very happy with workflow that I am using right..
Can any one give a working example for history.replaceState? This is what w3.org says:
history . replaceState(data, title [, url ] )
Updates the current entry in the session history to have..
During one of my interview, I was asked "If we can instantiate an abstract class?"
My reply was "No. we can't". But, interviewer told me "Wrong, we can."
I argued a bit on this. Then he told me to ..
Can someone explain to me the difference between map and flatMap and what is a good use case for each?
What does "flatten the results" mean?
What is it good for?..
certificate is valid
xcode 5
iOS 7
Code Sign error: No codesigning identities found: No codesigning
identities (i.e. certificate and private key pairs) that match the
provisioning profile sp..
I was having a look at $(Configuration),$(ProjectDir) etc. in Visual Studio 2008 for Prebuild events.
Is there a link to all of these variables with a definition for each one of them?..
I have got a problem with a CSS3 animation.
.child {
opacity: 0;
display: none;
-webkit-transition: opacity 0.5s ease-in-out;
-moz-transition: opacity 0.5s ease-in-out;
transit..
I'm using Google Sheets for a daily dashboard. What I need is to change the background color of cell B5 based on the value of another cell - C5. If C5 is greater than 80% then the background color i..
I have Hudson as continuous integration server and I want to use option 'Publish JUnit test result report'. But I don't use xUnit tools for testing, instead of that i have shell scripts which run test..
I'm trying to write powershell script which hides user from exchange lists.
I was able to find following command:
Set-Mailbox -Identity [user id here] -HiddenFromAddressListsEnabled $true
And it doe..
This assembly is in the GAC: Microsoft.SqlServer.Management.RegisteredServers.dll
How can I add a reference to this assembly in Visual Studio?
I can view the file in c:\windows\assembly\..
I see variables defined with this type but I don't know where it comes from, nor what is its purpose. Why not use int or unsigned int? (What about other "similar" types? Void_t, etc)...
I have real difficulties with enabling mbstring extension on my localhost.
I'm using XAMPP 1.7.4, for Windows, which has PHP 5.3.5, and tried to edit my php.ini file according to the documentation a..
I've been looking for a way to terminate a PowerShell (PS1) script when an unrecoverable error occurs within a function. For example:
function foo() {
# Do stuff that causes an error
$host.Ex..
Since I don't use storyboards to create my views, I was wondering if there's the "Use Safe Area Guides" option programmatically or something like that.
I've tried to anchor my views to
view.safeAr..
I am using Laravel 4.2 with docker. I setup it on local. It worked without any problem but when I am trying to setup online using same procedure then I am getting error
pull access denied for <pro..
On my old Mac running Snow Leopard, I could type "ios" into spotlight and it would start up the iPhone/iPad emulator by itself.
I have since had to get a new machine running Lion. I have installed Xc..
According to the documentation, it's possible to define multiple args for the flag --build-arg, but I can't find out how. I tried the following:
docker build -t essearch/ess-elasticsearch:1.7.6 --bui..
How do I connect to mongodb with node.js?
I have the node-mongodb-native driver.
There's apparently 0 documentation.
Is it something like this?
var mongo = require('mongodb/lib/mongodb');
var Db=..
I am calling a SQL Server stored procedure from my C# code:
using (SqlConnection conn = new SqlConnection(connstring))
{
conn.Open();
using (SqlCommand cmd = new SqlCommand("InsertQuerySPROC", ..
I have a simple Python script that I want to stop executing if a condition is met.
For example:
done = True
if done:
# quit/stop/exit
else:
# do other stuff
Essentially, I am looking for s..
I want to remove JSON element or one whole row from JSON.
I have following JSON string:
{
"result":[
{
"FirstName": "Test1",
"LastName": "User",
},
{
..
I have been working on a web app and for part of it I need to open a new window. I have this working on all browsers, my sticking point is with Google Chrome.
Chrome seems to ignore the window featur..
I'm new to PHP and MySQL and ran into a little trouble with a learning project I'm working on.
Whenever I try to create a table
CREATE TABLE transactions(
id int NOT NULL AUTO_INCREMENT,
location va..
I have a problem splitting single column values to multiple column values.
For Example:
Name
------------
abcd efgh
ijk lmn opq
asd j. asdjja
asb (asdfas) asd
asd
and I need the output something l..
I'm trying to display a png image on a <button> element in HTML.
The button is the same size as the image, and the image is shown but for some reason not in the center - so it's impossible to se..
Possible Duplicate:
Calculate age in JavaScript
In some point of my JS code I have jquery date object which is person's birth date. I want to calculate person's age based on his birth date...
I'm looking for a super easy method to create a two column format to display some data on a webpage. How can i achieve the same format as:
<table>
<tr>
<td>AAA</td&g..
I imported my already working project on another computer and it started to download dependencies.
Apparently my internet connection crashed and now I get the following:
>Build errors for c..
I had built a website with React.js and webpack.
I want to use Google fonts in the webpage, so I put the link in the section.
Google Fonts
<link href="https://fonts.googleapis.com/css?family=Bu..
Node.js version 0.10 was released today and introduced setImmediate. The API changes documentation suggests using it when doing recursive nextTick calls.
From what MDN says it seems very similar to ..
When I attempt to use a static method from within the body of the class, and define the static method using the built-in staticmethod function as a decorator, like this:
class Klass(object):
@st..
I'm a programming noob so please bear with me.
I'm trying to read numbers from a text file into an array. The text file, "somenumbers.txt" simply holds 16 numbers as so "5623125698541159".
#include ..
I have a simple POST script that I need to return to the page that was doing the Posting.
Is there any way to do it like this?
if($done)
{
//go to page
}
..
How can I remove some specific elements from a numpy array? Say I have
import numpy as np
a = np.array([1,2,3,4,5,6,7,8,9])
I then want to remove 3,4,7 from a. All I know is the index of the value..
I'm trying to configure my e-mail on Jenkins/Hudson, and I constantly receive the error:
java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be
non-empty
I've seen..
I have an option in my application where users can deactivate their profiles. Only admin can activate them again.
I have a class ActivateProfile with two methods
userExist(userName) that checks if ..
So I am trying to start an assignment, my professor gives us a Main.cpp, Main.h, Scanner.cpp, Scanner.h, and some other utilities.
My job is to create a Similarity class to compare documents using th..
So I'm pretty stumped on how to convert a string into an int using the try/except function. Does anyone know a simple function on how to do this? I feel like I'm still a little hazy on string and ints..
Using Python 2.7, I have this list:
qs = [{u'a': 15L, u'b': 9L, u'a': 16L}]
I'd like to extract values out of it.
i.e. [15, 9, 16]
So I tried:
result_list = [int(v) for k,v in qs.items()]
But..
I'm looking to make my code more readable as well as use tooling like IDE code inspection and/or static code analysis (FindBugs and Sonar) to avoid NullPointerExceptions. Many of the tools seem incom..
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..
So I was wondering if it would be possible to store data coming in from a form as a session variable.
Heres what I have so far, but I don't know what to put for the Form Action.
Thanks for looking!..
Is it possible to set the size of the background image with CSS?
I want to do something like:
background: url('bg.gif') top repeat-y;
background-size: 490px;
But it seems it's totally wrong to do ..
According to AngularJS doc, calls to $http return the following:
Returns a promise object with the standard then method and two http specific methods: success and error. The then method takes two ..
I'm after a definitive reference to what ASP.NET code is required to disabled browsers from caching the page. There are many ways to affect the HTTP headers and meta tags and I get the impression diff..
Does anyone know the safest width and height for the BODY when viewing any web page on the iPad? I want to avoid the scrollbars as much as possible.
Thanks.
Erik..
I have a PHP script that needs to make responses with HTTP response codes (status-codes), like HTTP 200 OK, or some 4XX or 5XX code.
How can I do this in PHP?..
Let's say that I have a class Suit and four subclasses of suit: Heart, Spade, Diamond, Club.
class Suit:
...
class Heart(Suit):
...
class Spade(Suit):
...
class Diamond(Suit):
...
class C..
We can access array elements using a for-of loop:
for (const j of [1, 2, 3, 4, 5]) {
console.log(j);
}
How can I modify this code to access the current index too? I want to achieve this using for..
void mi_start_curr_serv(void){
#if 0
//stmt
#endif
}
I'm getting an error as "error: expected declaration or statement at end of input" in my compiler. I could not find any error with the above..
Lets say you have an array that is rendered in a ul with an li for each element and a property on the controller called selectedIndex. What would be the best way to add a class to the li with the inde..
Even though initializing variables in python is not necessary, my professor still wants us to do it for practice. I wrote my program and it worked fine, but after I tried to initialize some of the var..
I would like to embed a SELECT inside a COUNT, but I can't find any examples.
#pseudosql
SELECT a AS current_a, COUNT(*) AS b,
COUNT( SELECT FROM t WHERE a = current_a AND c = 'const' ) as d,
f..
This is the effect I'm trying to achieve with Bootstrap 3 carousel
Instead of just showing one frame at a time, it displays N frames slide by side. Then when you slide (or when it auto slides), it ..
I am using the Scanner methods nextInt() and nextLine() for reading input.
It looks like this:
System.out.println("Enter numerical value");
int option;
option = input.nextInt(); // Read numeric..
I got a container div containing three child divs (vary in content) - each as tall as the tallest one. I managed this by setting the container to display:table and the child divs to display:table-cell..
I've taken a look at the list of surveys taken on scala-lang.org and noticed a curious question: "Can you name all the uses of “_”?". Can you? If yes, please do so here. Explanatory examples are a..
I have a question about HTTPS and HTTP Authentication credentials.
Suppose I secure a URL with HTTP Authentication:
<Directory /var/www/webcallback>
AuthType Basic
AuthName "Restricted Area"
A..
Is there an easy way to get a time very precisely?
I need to calculate some delays between method calls. More specifically, I want to calculate the speed of scrolling in an UIScrollView...
Newbie to ASP.net MVC 4 and trying to make sense of Razor. If I wanted to just display some text in my .cshtml page, can I use
<label class="LabelCSSTop">Introduction</label>
or shoul..
I have a folder structure as follows:
mydomain.com
->Folder-A
->Folder-B
I have a string from Database that is '../Folder-B/image1.jpg', which points to an image in Folder-B.
Inside a s..
VS2010 had the feature that viewing a file would automatically cause Solution Explorer to scroll to that file.
With VS2012, viewing different files from within the IDE no longer scrolls and select th..
I'm trying to use the POST method in jQuery to make a data request. So this is the code in the html page:
<form>
Title : <input type="text" size="40" name="title"/>
<input type="button..
Previous I issued a question on how to change Maven project vesion from command line which lead me to a new issue.
Previously I was able to get the version number since the version was stored as a pro..
I must be missing some basic thing about cookies. On localhost, when I set a cookie on server side and specify the domain explicitly as localhost (or .localhost). the cookie does not seem to be accept..
I recently installed Python 2.7.3 on a CentOS machine by compiling from source. Python 2.7.3 is installed at /opt/python2.7 and when I installed it I just changed /usr/bin/python to point to the new v..
I'm writing an import utility that is using phone numbers as a unique key within the import.
I need to check that the phone number does not already exist in my DB. The problem is that phone numbers..
This is a much discussed issue for OSX 10.6 users, but I haven't been able to find a solution that works. Here's my setup:
Python 2.6.1 64bit
Django 1.2.1
MySQL 5.1.47 osx10.6 64bit
I create a virtu..
I have read other similar posts but I just don't understand what I've done wrong. I think my declaration of the vectors is correct. I even tried to declare without size but even that isn't working.Wha..
Using standard Python arrays, I can do the following:
arr = []
arr.append([1,2,3])
arr.append([4,5,6])
# arr is now [[1,2,3],[4,5,6]]
However, I cannot do the same thing in numpy. For example:
arr..
I'm trying to get an if statement to work in Bash (using Ubuntu):
#!/bin/bash
s1="hi"
s2="hi"
if ["$s1" == "$s2"]
then
echo match
fi
I've tried various forms of the if statement, using [["$s1" ..
org.apache.maven.plugin.PluginResolutionException: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for o..
Let me prefix this by saying that I know what foreach is, does and how to use it. This question concerns how it works under the bonnet, and I don't want any answers along the lines of "this is how you..
As I'm pretty new to C#, I struggle with the following piece of code. When I click to button 'knop', the method 'klik' has to be executed. The method has to draw the Bitmap 'b', generated by 'DrawMand..
I need your help,
How can I, using jQuery,
Change the background color of the selected row in my table (for this example, let's use the the css class "highlighted"
and if the same row is clicked on..
I am trying to compare two Ruby Hashes using the following code:
#!/usr/bin/env ruby
require "yaml"
require "active_support"
file1 = YAML::load(File.open('./en_20110207.yml'))
file2 = YAML::load(Fi..
I'm trying to make a list with numbers 1-1000 in it. Obviously this would be annoying to write/read, so I'm attempting to make a list with a range in it. In Python 2 it seems that:
some_list = range(..
When using lambda expressions or anonymous methods in C#, we have to be wary of the access to modified closure pitfall. For example:
foreach (var s in strings)
{
query = query.Where(i => i.Prop..
I am using bootstrap by default textbox taking full width of column and I want to put search icon at the end to textbox.
My code is like this:
<div class="container">
<div class="row"&..
I have a pod test-1495806908-xn5jn with 2 containers. I'd like to restart one of them called container-test. Is it possible to restart a single container within a pod and how? If not, how do I restart..
I am used to Oracle and to create a dblink in my schema and then access to a remote database like this: mytable@myremotedb, is there anyway do to the same with PostgreSQL?
Right now I am using dblink..
In SQL Server 2005, is there a concept of a one-time-use, or local function declared inside of a SQL script or Stored Procedure? I'd like to abstract away some complexity in a script I'm writing, but ..
So in Java, we can do How to measure time taken by a function to execute
But how is it done in python? To measure the time start and end time between lines of codes?
Something that does this:
import..
Could someone please explain to me the idea of artifacts in the build process?
I have the workspace directory where I check out the code to compile and run my ant scripts etc. At the end, in my case,..
I have just started on phonegap and trying to setup first basic minimal project in eclipse. I followed through the phonegap docs at http://docs.phonegap.com/en/edge/guide_platforms_android_index.md.ht..
I have two tables: A and B linked by "group_id".
2 variables I'm using: $keyword, $_SESSION['user_id']
A
group_id
keyword
B
id
group_id
user_id
I want to be able to select all the groups that this..
I have 3 modified files (no new files) in a pull request at the moment.
I would like to remove one of those files from the pull request, so that the pull request only contains changes to two files a..
How can I find DIV with certain text? For example:
<div>
SomeText, text continues.
</div>
Trying to use something like this:
var text = document.querySelector('div[SomeText*]').innerTE..
My files are
// main.c
#include "add.c"
int main(void) {
int result = add(5,6);
printf("%d\n", result);
}
and
// add.c
int add(int a, int b) {
return a + b;
}
..
Today I wanted to start working with Tkinter, but I have some problems.
Python 3.2 (r32:88445, Mar 28 2011, 04:14:07)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more ..
I've got a problem sending a file to a serverside PHP-script using jQuery's ajax-function.
It's possible to get the File-List with $('#fileinput').attr('files') but how is it possible to send this Dat..
I am working out some tutorials in R. Each R code is contained in a specific folder. There are data files and other files in there. I want to open the .r file and source it such that I do not have to ..
I have the following query:
SELECT
dashboard_data.headline,
dashboard_data.message,
dashboard_messages.image_id
FROM dashboard_data
INNER JOIN dashboard_messages
ON dashboard_message_id = da..
I have a PowerShell script to add a website to a Trusted Sites in Internet Explorer:
set-location "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings"
set-location ZoneMap\Domains
new-..
Now that iPhone 3.0 SDK is public, I think I can ask this question for those of you that have already been playing with the 3.0 SDK. I want to record audio in my application, but I want to use AVAudio..
Is it possible to iterate a vector from the end to the begin?
for (vector<my_class>::iterator i = my_vector.end();
i != my_vector.begin(); /* ?! */ ) {
}
Or is that only possible with..
In C# WinApp, how can I add both Text and Value to the items of my ComboBox?
I did a search and usually the answers are using "Binding to a source".. but in my case I do not have a binding source read..
I need to create new variable from contents of other variables. Currently I'm using something like this:
- command: echo "{{ var1 }}-{{ var2 }}-{{ var3 }}"
register: newvar
The problem is:
Usag..
What would be the best way to implement a customizable tree data structure (meaning, a tree structure with an unknown number of level) in a database?
I've done this once before using a table with a f..
Every time I want to compile my Visual Studio project I get the message that MSVCP120d.dll is missing. Google can't help me. I already installed some redistributables but they didn't help. I also foun..
I pulled a project from GitHub a few days ago. I've since discovered that there are several forks on GitHub, and I neglected to note which one I took originally. How can I determine which of those for..
I know there are many posts out there about the differences between these two patterns, but there are a few things that I cannot find.
From what I have been reading, I see that the factory method pat..
I'm using Visual Studio Code as my code editor.
I did a search on google but wasn't able to find anything about my issue.
The issue is simple, pressing ? Tab in the editor does nothing. I'm expecting ..
Is there a method built in to .NET that can write all the properties and such of an object to the console? Could make one using reflection of course, but I'm curious to if this already exists... espec..
How can I clear a text input on click of a button using angularJS?
The X is a seperate link, on which I would like to trigger a function.
HTML
<input type="text" class="form-control" data-ng-m..
If I have a navbar in bootstrap with the items
Home | About | Contact
How do I set the active class for each menu item when they are active? That is, how can I set class="active" when the angular r..
I need a way to get the size of a file using C#, and not the size on disk. How is this possible?
Currently I have this loop
foreach (FileInfo file in downloadedMessageInfo.GetFiles())
{
//file.L..
root# bin/hadoop fs -mkdir t
mkdir: org.apache.hadoop.hdfs.server.namenode.SafeModeException: Cannot create directory /user/root/t. Name node is in safe mode.
not able to create anything in hdfs
I di..
Can anyone suggest how I embed a youtube channel into a webpage - I am getting conflicting information from various sites, ideally using the custom player if possible? thanks..
I am trying to parse a JSON string in java to have the individual value printed separately. But while making the program run I get the following error-
Exception in thread "main" java.lang.RuntimeExc..
I've been trying to find an example of how to read a jpeg image and then show the image.
var http = require('http'), fs = require('fs');
http.createServer(function (req, res) {
res.writeHead(200..
Can someone explain when you're supposed to use the static keyword before global variables or constants defined in header files?
For example, lets say I have a header file with the line:
const floa..
I see that $DISPLAY is set to localhost:0.0 if I am running over a vnc server this may not be correct, is there a way to automatically set it in my login script?..
I have been having trouble setting a box shadow on the left side of an element only.
I tried this:
box-shadow: -10px 0px 3px 0px #aaa;
However, the box shadow looks more like a grey line and lacks..
I am a bit confused about how to get the key and value of an object in angular2 while using *ngFor for iterating over the object. I know in angular 1.x there is a syntax like
ng-repeat="(key, value)..
In YAML, I have a string that's very long. I want to keep this within the 80-column (or so) view of my editor, so I'd like to break the string. What's the syntax for this?
In other words, I have this..
Is there a way to have a child DIV within a parent container DIV that is wider than it's parent. The child DIV needs to be the same width of the browser viewport.
See example below:
The child DIV m..
I have an account of a Gitlab installation where I created the repository "ffki-startseite"
Now I want to clone the repository git://freifunk.in-kiel.de/ffki-startseite.git into that repository with ..
Does anyone know how to use line breaks in NSString? I need to do something like this -
[NSString stringWithFormat:@"%@,\n%@", mystring1,mystring2];
..
I have numerous cells all over the place on a worksheet that look like =((E9-E8)/E8). I want to use the first two values to go into this new formula, (EXP((LN(E9/E8)/14.32))-1).
How can I change them..
I have the text "Android is a Software stack". In this text i want to set the "stack" text is clickable. in the sense if you click on that it will redirected to a new activity(not in the browser).
I..
I follow a development process where I create a new local branch for every new feature or story card. When finished I merge the branch into master and then push.
What tends to happen over time due t..
I am building a code which displays user information on search. User information, is then displayed in a fieldset, and a image, first name, last name and few profile info. is shown, and in the bottom ..
I have a component setup that is essentially a launcher for an application. It is configured like so:
@Component
public class MyLauncher {
@Autowired
MyService myService;
//other methods..
I want to create a layout for an admin panel, but I dont know how to get the #nav and #content container always at 100% of the browser window. I don't understand the inherit of 100% height attributes,..
this is my code I and I want to save this bitmap on my internal storage. The public boolean saveImageToInternalStorage is a code from google but I don't know how to use it. when I touch button2 follow..
I have a to compare dates in 2 tables but the problem is that one table has the date in DD-Mon-YY format and the other in YYYYMM format.
I need to make both of them YYYYMM for the comparison.
I need..
I simply want to run an executable from the command line, ./arm-mingw32ce-g++, but then I get the error message,
bash: ./arm-mingw32ce-g++: No such file or directory
I'm running Ubuntu Linux 10.10. ..
I 'm Following this guide in order to set up a pod using minikube and pull an image from a private repository hosted at: hub.docker.com
When trying to set up a pod to pull the image i see CrashLoopBa..
I am working in PHP.
Please what's the proper way of inserting new records into the DB, which has unique field.
I am inserting lot of records in a batch and I just want the new ones to be inserted an..
After building a Docker image from a dockerfile, I see the image was built successfully, but what do I do with it? Shouldn't i be able to run it as a container?..
I recently started working with Python and I am trying to concatenate one of my JSON String with existing JSON String. I am also working with Zookeeper so I get the existing json string from zookeeper..
How do you write (and run) a correct micro-benchmark in Java?
I'm looking for some code samples and comments illustrating various things to think about.
Example: Should the benchmark measure time/it..
When trying to run an executable I've been sent in Mac OS X, I get the following error
dyld: Library not loaded: libboost_atomic.dylib
Referenced from: /Users/"Directory my executable is in"
Reas..
I have the following EF class derived from a database (simplified)
class Product
{
public string ProductId;
public string ProductName;
public string CategoryId;
public string Cat..
What libraries, extensions etc. would be required to render a portion of a PDF document to an image file?
Most PHP PDF libraries that I have found center around creating PDF documents, but is there a..
I am planning to move away from "floaty" layouts and use CSS flexbox for future projects. I was delighted to see that all major browsers in their current versions seem to support (in one way or anothe..
I have a maven multi-module project and I'm using jacoco-maven for code coverage reports. Some classes should not be reported, as they're Spring configuration and I'm not interested in them.
I have d..
What is blob and what is text? What are the differences?
When do I need to use blob and when do I need text as data type?
Because for blob and text, there are mediumblob == mediumtext, smallblob == ..
This is one query that I am really confused with. Coz I have looked for this so many times but I always find the codes related to finding the last used or first non empty cell.
Tried at below codes. d..
This is the table structure:
CREATE TABLE `reports` (
`report_id` int(11) NOT NULL auto_increment,
`computer_id` int(11) NOT NULL default '0',
`date_entered` datetime NOT NULL default '1970-01-0..
I thought I heard that py2exe was able to do this, but I never figured it out. Has anyone successfully done this? Can I see your setup.py file, and what command line options you used?
Basically I'm..
I'm using a decimal column to store money values on a database, and today I was wondering what precision and scale to use.
Since supposedly char columns of a fixed width are more efficient, I was thi..
I am using code $enrypt=md5($pass) and inserting $encrypt to database. I want to find out a way to decrypt them. I tried using a decrypting software but it says the hash should be of exactly 16 bytes..
I am filtering rows in a dataframe by values in two columns.
For some reason the OR operator behaves like I would expect AND operator to behave and vice versa.
My test code:
import pandas as pd
df..
When I run something like:
from multiprocessing import Pool
p = Pool(5)
def f(x):
return x*x
p.map(f, [1,2,3])
it works fine. However, putting this as a function of a class:
class calculate..
I am trying to get the selected items string out of a Spinner. So far I have gotten this:
bundle.putString(ListDbAdapter.DB_PRI, v.getText().toString());
This does not work and gives a class castin..
I want to install a file using the Windows command line. First I want to build after compiling all the .jar files to create an .apk file for an Android application without using Eclipse.
Does anyone ..
I am fairly new to git, yet currently using it to manage our code in a team environment. I had some rebasing issues, and I fixed them using:
git checkout --ours filename.txt
git add filename.txt
git r..
Seems like there has been a recent update to Google Chrome that causes blurry text after doing a transform: scale(). Specifically I'm doing this:
@-webkit-keyframes bounceIn {
0% {
opacity: 0;
..
What is wrong with my Angular code? I am getting:
Cannot read property 'remove' of undefined at BrowserDomAdapter.removeClass ...
<ol class="breadcrumb">
<li *ngClass="{act..
I am using xampp apache server to serve resources to the application from my machine. But i am getting the above error.
I got something on the google. pointing towards possible solution here
http://..
I want to delete all the rows with timestamp older than 180 days from a specific table in my database.
I've tried the this:
DELETE FROM on_search WHERE search_date < DATE_SUB(NOW(), INTERVAL 180 ..
In Python I'm getting an error:
Exception: (<type 'exceptions.AttributeError'>,
AttributeError("'str' object has no attribute 'read'",), <traceback object at 0x1543ab8>)
Given ..
I've written some VBA code in an Excel workbook to retrieve data from an Access database in the same directory on a desktop. It works fine on my machine and several other machines running Windows XP,..
I want to create a function that will accept any old string (will usually be a single word) and from that somehow generate a hexadecimal value between #000000 and #FFFFFF, so I can use it as a colour ..
How do I execute some JavaScript that is a string?
function ExecuteJavascriptString()
{
var s = "alert('hello')";
// how do I get a browser to alert('hello')?
}
..
I'm trying to repeat this simple command 10,000 times (via a simple and easy solution): Tandem <- sample(OUT, size = 815, replace = TRUE, prob = NULL); mean(Tandem) Any advice would be greatly a..
Since the latest Rails 3 release is not auto-loading modules and classes from lib anymore,
what would be the best way to load them?
From github:
A few changes were done in this commit:
Do not auto..
I am trying to find out how to write an SQL statement that will grab fields where the string is not 12 characters long. I only want to grab the string if they are 10 characters.
What function can do..
I am trying to build an iPhone app. I created a
method like this:
- (void)score {
// some code
}
and I have tried to call it in an other method like this:
- (void)score2 {
@selector(score..