Questions Tagged with #Lotus notes

Tag for programming questions related to Lotus Notes & Domino

Lotus Notes email as an attachment to another email

This is in Notes 8.5 environment. I just wanted to know how to attach an email to another email as real attachment not a "Document Link". I intended to attach an email, so I drag & dropped an e..

How to resolve the "ADB server didn't ACK" error?

I am trying to install my project on 5 AVD's at the same time, but I constantly get this error, I am executing it on Windows 8.1 "* daemon not running. starting it now on port 5037 * ADB server didn'..

Add custom icons to font awesome

I love the Font Awesome icon font and want to use it for most of the icons on my site but there are a few custom svg icons that I'd need in addition to what's offered. I noticed that the .svg version..

LINQ to SQL: Multiple joins ON multiple Columns. Is this possible?

Given: A table named TABLE_1 with the following columns: ID ColumnA ColumnB ColumnC I have SQL query where TABLE_1 joins on itself twice based off of ColumnA, ColumnB, ColumnC. The query might lo..

How to center images on a web page for all screen sizes

I'm having a problem with my HTML. I've searched all over the internet, but still no real answer. I have a website with some images, and I want them to be in the middle. Now, on my screen they're in ..

Bash syntax error: unexpected end of file

Forgive me for this is a very simple script in Bash. Here's the code: #!/bin/bash # june 2011 if [ $# -lt 3 -o $# -gt 3 ]; then echo "Error... Usage: $0 host database username" exit 0 fi aft..

Postgresql tables exists, but getting "relation does not exist" when querying

I have a postgresql db with a number of tables. If I query: SELECT column_name FROM information_schema.columns WHERE table_name="my_table"; I will get a list of the columns returned properly. How..

Truststore and Keystore Definitions

What's the difference between a keystore and a truststore?..

jQuery add class .active on menu

I've got a problem. I want to add the class "active" on item menu when the relative page is on. the menu is very simple: <div class="menu"> <ul> <li><a href="~/link1/">LINK..

Copy folder recursively in Node.js

Is there an easier way to copy a folder and all its content without manually doing a sequence of fs.readir, fs.readfile, fs.writefile recursively? I am just wondering if I'm missing a function which w..

Get selected key/value of a combo box using jQuery

Please, how can I get the selected key and value of a HTML select combo box using jQuery? $(this).find("select").each(function () { if ($.trim($(this).val()) != '') { searchString += $.tr..

How do I use the built in password reset/change views with my own templates

For example I can point the url '^/accounts/password/reset/$' to django.contrib.auth.views.password_reset with my template filename in the context but I think need to send more context details. I nee..

How can I change the font-size of a select option?

I am trying to style a select option dropdown list. Is it possible to make the font-sizes of the options different from the default value? For example, the default: -- Select Country -- Would be ..

overlay two images in android to set an imageview

I am trying to overlay two images in my app, but they seem to crash at my canvas.setBitmap() line. What am I doing wrong? private void test() { Bitmap mBitmap = BitmapFactory.decodeResource(getRe..

Angular Material: mat-select not selecting default

I have a mat-select where the options are all objects defined in an array. I am trying to set the value to default to one of the options, however it is being left selected when the page renders. My ..

How to print full stack trace in exception?

For example, in one place... //---------------a try { // some network call } catch(WebException we) { throw new MyCustomException("some message ....", we); } ...and in another place... //-..

How do I read a date in Excel format in Python?

How can I convert an Excel date (in a number format) to a proper date in Python?..

What is the instanceof operator in JavaScript?

The instanceof keyword in JavaScript can be quite confusing when it is first encountered, as people tend to think that JavaScript is not an object-oriented programming language. What is it? What pro..

Java String encoding (UTF-8)

I have come across this line of legacy code, which I am trying to figure out: String newString = new String(oldString.getBytes("UTF-8"), "UTF-8")); As far as I can understand, it is encoding & ..

Convert JS object to JSON string

If I defined an object in JS with: var j={"name":"binchen"}; How can I convert the object to JSON? The output string should be: '{"name":"binchen"}' ..

IDEA: javac: source release 1.7 requires target release 1.7

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..

Why is there no SortedList in Java?

In Java there are the SortedSet and SortedMap interfaces. Both belong to the Java Collections framework and provide a sorted way to access the elements. However, in my understanding there is no Sort..

Import CSV to SQLite

I'm trying to import a csv file to an SQLite table. Example csv: 1,2 5,6 2,7 Example command: sqlite> create table foo(a, b); sqlite> .separator , sqlite> .import test.csv foo Error: tes..

What is the proper way to comment functions in Python?

Is there a generally accepted way to comment functions in Python? Is the following acceptable? ######################################################### # Create a new user ##########################..

SQL Error: ORA-01861: literal does not match format string 01861

I am trying to insert data into an existing table and keep receiving an error. INSERT INTO Patient ( PatientNo, PatientFirstName, PatientLastName, PatientStreetAddress, PatientTown, Pat..

Checking if a variable is not nil and not zero in ruby

I am using the following code to check if a variable is not nil and not zero if(discount != nil && discount != 0) ... end Is there a better way to do this?..

Change PictureBox's image to image from my resources?

How do I set a PictureBox image to an image from my resources? (I tried this without success: pictuerbox.Image = "img_location";)..

Get the last element of a std::string

I was wondering if there's an abbreviation or a more elegant way of getting the last character of a string like in: char lastChar = myString.at( myString.length() - 1 ); Something like myString.bac..

copy-item With Alternate Credentials

I'm using the CTP of powershell v2. I have a script written that needs to go out to various network shares in our dmz and copy some files. However, the issue I have is that evidently powershell's cmdl..

Sort CSV file by column priority using the "sort" command

I have a csv file, and I would like to sort it by column priority, like "order by". For example: 3;1;2 1;3;2 1;2;3 2;3;1 2;1;3 3;2;1 If this situation was the result of a "select", the "order by" w..

How to get current time and date in C++?

Is there a cross-platform way to get the current date and time in C++?..

Mockito verify order / sequence of method calls

Is there a way to verify if a methodOne is called before methodTwo in Mockito? public class ServiceClassA { public void methodOne(){} } public class ServiceClassB { public void methodTwo(){..

Where does MAMP keep its php.ini?

I have recently got a mac an am not used to developing on a mac at all. I have MAMP Pro 1.9.6.1. I did a locate on php.ini and got this: $ locate php.ini /Applications/MAMP/conf/php5.2/php.ini /Appl..

How to resize an image to a specific size in OpenCV?

IplImage* img = cvLoadImage("something.jpg"); IplImage* src = cvLoadImage("src.jpg"); cvSub(src, img, img); But the size of the source image is different from img. Is there any opencv function to r..

Read whole ASCII file into C++ std::string

I need to read a whole file into memory and place it in a C++ std::string. If I were to read it into a char[], the answer would be very simple: std::ifstream t; int length; t.open("file.txt"); ..

Specify sudo password for Ansible

How do I specify a sudo password for Ansible in non-interactive way? I'm running Ansible playbook like this: $ ansible-playbook playbook.yml -i inventory.ini \ --user=username --ask-sudo-pass ..

How to convert Map keys to array?

Lets say I have the following map: let myMap = new Map().set('a', 1).set('b', 2); And I want to obtain ['a', 'b'] based on the above. My current solution seems so long and horrible. let myMap = ne..

Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints

I make an outer join and executed successfully in the informix database but I get the following exception in my code: DataTable dt = TeachingLoadDAL.GetCoursesWithEvalState(i, bat); Failed to en..

How to put a UserControl into Visual Studio toolBox

I made a usercontrol in my project, and after building project, I need to put it in my toolbox, and use it as a common control. but i can't. the UserControl is in my project namespace, and I tried Cho..

Finding height in Binary Search Tree

I was wondering if anybody could help me rework this method to find the height of a binary search tree. So far, my code looks like this. However, the answer I'm getting is larger than the actual heigh..

source command not found in sh shell

I have a script that uses sh shell. I get an error in the line that uses the source command. It seems source is not included in my sh shell. If I explicitly try to run source from shell I get: sh: ..

Python open() gives FileNotFoundError/IOError: Errno 2 No such file or directory

For some reason my code is having trouble opening a simple file: This is the code: file1 = open('recentlyUpdated.yaml') And the error is: IOError: [Errno 2] No such file or directory: 'recentlyUpdate..

How do you transfer or export SQL Server 2005 data to Excel

I have a simple SQL 'Select' query, and I'd like to dump the results into an Excel file. I'm only able to save as .csv and converting to .xls creates some super ugly output. In any case, as far as I c..

How do you create a yes/no boolean field in SQL server?

What is the best practice for creating a yes/no i.e. Boolean field when converting from an access database or in general?..

Rendering raw html with reactjs

So is this the only way to render raw html with reactjs? // http://facebook.github.io/react/docs/tutorial.html // tutorial7.js var converter = new Showdown.converter(); var Comment = React.createClas..

Importing lodash into angular2 + typescript application

I am having a hard time trying to get the lodash modules imported. I've setup my project using npm+gulp, and keep hitting the same wall. I've tried the regular lodash, but also lodash-es. The lodash ..

Laravel requires the Mcrypt PHP extension

I am trying to use the migrate function in Laravel 4 on OSX. However, I am getting the following error: Laravel requires the Mcrypt PHP extension. As far as I understand, it's already enabled (see ..

Time calculation in php (add 10 hours)?

I get the time: $today = time(); $date = date('h:i:s A', strtotime($today)); if the current time is "1:00:00 am", how do i add 10 more hours to become 11:00:00 am??..

jQuery '.each' and attaching '.click' event

I am not a programer but I enjoy building prototypes. All of my experience comes from actionScript2. Here is my question. To simplify my code I would like to figure out how to attach '.click' events ..

Validate email with a regex in jQuery

Referring to this issue: How can I set a minimum length for a field with jQuery?, <form id="new_invitation" class="new_invitation" method="post" data-remote="true..

SQL - HAVING vs. WHERE

I have the following two tables: 1. Lecturers (LectID, Fname, Lname, degree). 2. Lecturers_Specialization (LectID, Expertise). I want to find the lecturer with the most Specialization. When I try t..

How to convert a command-line argument to int?

I need to get an argument and convert it to an int. Here is my code so far: #include <iostream> using namespace std; int main(int argc,int argvx[]) { int i=1; int answer = 23; int..

How to make a variadic macro (variable number of arguments)

I want to write a macro in C that accepts any number of parameters, not a specific number example: #define macro( X ) something_complicated( whatever( X ) ) where X is any number of parameters I..

How to create a table from select query result in SQL Server 2008

I want to create a table from select query result in SQL Server, I tried create table temp AS select..... but I got an error Incorrect syntax near the keyword 'AS' ..

HTML&CSS + Twitter Bootstrap: full page layout or height 100% - Npx

I'm trying to make following layout: +-------------------------------------------------+ | Header + search (Twitter navbar) | +------------+------------------------------------..

Clear the entire history stack and start a new activity on Android

Is it possible to start an activity on the stack, clearing the entire history before it? The situation I have an activity stack that either goes A->B->C or B->C (screen A selects the users token, bu..

#1227 - Access denied; you need (at least one of) the SUPER privilege(s) for this operation

Hello, I am currently having an issue with MySQL! What's going wrong here? I am a cPanel user, and yes I have searched this and found no definitive answers. It appears this is more specific than othe..

How can I pass a Bitmap object from one activity to another

In my activity, I create a Bitmap object and then I need to launch another Activity, How can I pass this Bitmap object from the sub-activity (the one which is going to be launched)?..

WPF loading spinner

The goal is to display the information that the application is working. So I'm looking for an intelligent implementation sample of a loading spinner using WPF / MVVM...

Select row on click react-table

I am trying to find the best table to use with my react apps, and for now, the react-table offers everything I need (pagination, server-side control, filtering, sorting, footer row). This being said,..

Xcode 6: Keyboard does not show up in simulator

The keyboard does not show up when I run the simulator and click in the UITextView. How do I re-enable the keyboard? It used to work but now it doesn't - I don't know what I might have clicked by acc..

Calling startActivity() from outside of an Activity?

I'm using an AlarmManager to trigger an intent that broadcasts a signal. The following is my code: AlarmManager mgr = (AlarmManager) getSystemService(Context.ALARM_SERVICE); Intent i = new Intent(thi..

How do I redirect to another webpage?

How can I redirect the user from one page to another using jQuery or pure JavaScript?..

Find non-ASCII characters in varchar columns using SQL Server

How can rows with non-ASCII characters be returned using SQL Server? If you can show how to do it for one column would be great. I am doing something like this now, but it is not working select * ..

What's the proper way to compare a String to an enum value?

Homework: Rock Paper Scissors game. I've created an enumeration: enum Gesture{ROCK,PAPER,SCISSORS}; from which I want to compare values to decide who wins--computer or human. Setting the val..

Get current URL with jQuery?

I am using jQuery. How do I get the path of the current URL and assign it to a variable? Example URL: http://localhost/menuname.de?foo=bar&amp;number=0 ..

Generate JSON string from NSDictionary in iOS

I have a dictionary I need to generate a JSON string by using dictionary. Is it possible to convert it? Can you guys please help on this?..

Can there exist two main methods in a Java program?

Can there exist two main methods in a Java program? Only by the difference in their arguments like: public static void main(String[] args) and second can be public static void main(StringSecond[]..

SecurityException: Permission denied (missing INTERNET permission?)

this error is really really really strange and I don't know how to reproduce it and how to fix it because I made a lot of searches but nothing was useful. Here's the stacktrace: Stack Trace ________..

String Array object in Java

I am trying to print the first element on the two arrays in my Athlete class, country and name. I also need to create a object that simulates three dive attemps an athlete had (that is initially set t..

How to delete empty folders using windows command prompt?

I need to delete all empty folders from my application folder using windows command prompt? How can I create a bat file like that? Please help me...

JSON - Iterate through JSONArray

I have a JSON file with some arrays in it. I want to iterate through the file arrays and get their elements and their values. This is how my file looks like: { "JObjects": { "JArray1": [ ..

How do I find out which keystore was used to sign an app?

I have an app which is signed and several keystore files. I'd like to update the app, so I need to find out which one of keys was used. How can I match which keystore was used to originally sign my a..

How to pass password to scp?

I know it is not recommended, but is it at all possible to pass the user's password to scp? I'd like to copy a file via scp as part of a batch job and the receiving server does, of course, need a pas..

Change the bullet color of list

I have a list, <ul class="listStyle"> <li> <strong>View :</strong> blah blah. </li> <li> <strong>Edit :&l..

How to split a string in Ruby and get all items except the first one?

String is ex="test1, test2, test3, test4, test5" when I use ex.split(",").first it returns "test1" Now I want to get the remaining items, i.e. `"test2, test3, test4, test5". If I use ex.spl..

ggplot legends - change labels, order and title

I'm struggling a great deal to modify the legend in my plot. Here is a reproducible example: dtt <- structure(list(model = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3..

Remove duplicate elements from array in Ruby

I have a Ruby array which contains duplicate elements. array = [1,2,2,1,4,4,5,6,7,8,5,6] How can I remove all the duplicate elements from this array while retaining all unique elements without usin..

ffmpeg usage to encode a video to H264 codec format

I have a *.mp4 video file(MPEG4 video codec) and I am trying to convert this to a H264 video codec format(raw h.264 format) using ffmpeg on Linux(Version - FFmpeg version SVN-r0.5.1-4:0.5.1-1ubuntu1, ..

Visual Studio setup problem - 'A problem has been encountered while loading the setup components. Canceling setup.'

I've had a serious issue with my Visual Studio 2008 setup. I receive the ever-so-useful error 'A problem has been encountered while loading the setup components. Canceling setup.' whenever I try to un..

how to achieve transfer file between client and server using java socket

I have implement the simple TCP server and TCP client classes which can send the message from client to server and the message will be converted to upper case on the server side, but how can I achieve..

Creating all possible k combinations of n items in C++

There are n people numbered from 1 to n. I have to write a code which produces and print all different combinations of k people from these n. Please explain the algorithm used for that. ..

Read int values from a text file in C

I have a text file that contains the following three lines: 12 5 6 4 2 7 9 I can use the fscanf function to read the first 3 values and store them in 3 variables. But I can't read the rest. I tried..

lexers vs parsers

Are lexers and parsers really that different in theory? It seems fashionable to hate regular expressions: coding horror, another blog post. However, popular lexing based tools: pygments, geshi, or..

What is the meaning of ImagePullBackOff status on a Kubernetes pod?

I'm trying to run my first kubernetes pod locally. I've run the following command (from here): export ARCH=amd64 docker run -d \ --volume=/:/rootfs:ro \ --volume=/sys:/sys:ro \ --volume=/..

Can we add div inside table above every <tr>?

Hi am trying to add a div above every <tr> but when i look at the html console the div are showing outside the table. below is the html code. <table> <div> <tr><td>..

Error: «Could not load type MvcApplication»

I am getting the error Could not load type MvcApplication when I try to run my website. How to correct it?..

How to set up ES cluster?

Assuming I have 5 machines I want to run an elasticsearch cluster on, and they are all connected to a shared drive. I put a single copy of elasticsearch onto that shared drive so all three can see it...

Find character position and update file name

What function might I use to find a character position in a string using PowerShell 2.0. i.e I would use CHARINDEX or PATINDEX if using SQL Server. I looked at using the Select-String cmdlet but i..

Loop over html table and get checked checkboxes (JQuery)

I have an HTML table with a checkbox in each row. I want to loop over the table and see if there are any checkboxes that are checked. The following does not work: $("#save").click( function() { ..

CodeIgniter query: How to move a column value to another column in the same row and save the current time in the original column?

In my db table, I have two datetime columns: Last and Current. These column allow me to keep track of when someone last used a valid login to the service I am building up. Using CodeIgniter's active ..

phpinfo() is not working on my CentOS server

I have PHP installed on my CentOS server. However, when running a phpinfo() inside my script to test it, I receive the HTML, not the interpreted information. I can see the folders for PHP. I can even..

How to tell if UIViewController's view is visible

I have a tab bar application, with many views. Is there a way to know if a particular UIViewController is currently visible from within the UIViewController? (looking for a property)..

How do you remove an array element in a foreach loop?

I want to loop through an array with foreach to check if a value exists. If the value does exist, I want to delete the element which contains it. I have the following code: foreach($display_related_..

Asynchronous method call in Python?

I was wondering if there's any library for asynchronous method calls in Python. It would be great if you could do something like @async def longComputation(): <code> token = longComputati..

How do I center align horizontal <UL> menu?

I need to center align a horizontal menu. I've tried various solutions, including the mix of inline-block / block / center-align etc., but haven't succeeded. Here is my code: <div class="topmenu-..

How to generate sample XML documents from their DTD or XSD?

We are developing an application that involves a substantial amount of XML transformations. We do not have any proper input test data per se, only DTD or XSD files. We'd like to generate our test data..

Is it possible to display my iPhone on my computer monitor?

As the title says, is this possible? I want to "mirror" my actions on the iPhone so it shows on the computer monitor. We've seen this on the Apple key notes, but I am not sure if this feature is publ..

Check if element is in the list (contains)

I've got a list of elements, say, integers and I want to check if my variable (another integer) is one of the elements from the list. In python I'd do: my_list = [1,2,3,4] # elements my_var = 3 # my ..

Are there pointers in php?

What does this code mean? Is this how you declare a pointer in php? $this->entryId = $entryId; ..

C#: Converting byte array to string and printing out to console

public void parse_table(BinaryReader inFile) { byte[] idstring = inFile.ReadBytes(6); Console.WriteLine(Convert.ToString(idstring)); } It is a simple snippet: read the first 6 bytes of the ..

How can I do string interpolation in JavaScript?

Consider this code: var age = 3; console.log("I'm " + age + " years old!"); Are there any other ways to insert the value of a variable in to a string, apart from string concatenation?..

Git asks for username every time I push

Whenever I try to push into my repo git asks for both username & password. I have no problem in re-entering my password each time but the problem is in entering username. I use https to clone my..

python numpy/scipy curve fitting

I have some points and I am trying to fit curve for this points. I know that there exist scipy.optimize.curve_fit function, but I do not understand documentation, i.e how to use this function. My poi..

HTML/CSS: Making two floating divs the same height

I have a little peculiar problem that I currently solve using a table, see below. Basically, I want to have two divs take up 100% of the available width, but only take up as much vertical space as ne..

How do I iterate over a range of numbers defined by variables in Bash?

How do I iterate over a range of numbers in Bash when the range is given by a variable? I know I can do this (called "sequence expression" in the Bash documentation): for i in {1..5}; do echo $i; d..

Calculate mean across dimension in a 2D array

I have an array a like this: a = [[40, 10], [50, 11]] I need to calculate the mean for each dimension separately, the result should be this: [45, 10.5] 45 being the mean of a[*][0] and 10.5 the ..

Failed to open the HAX device! HAX is not working and emulator runs in emulation mode emulator

My Android emulator is running properly but it is showing this error every time I start the emulator. Starting emulator for AVD AVD_for_Nexus_4 emulator: Failed to open the HAX device! HAX is ..

How to make a .NET Windows Service start right after the installation?

Besides the service.StartType = ServiceStartMode.Automatic my service does not start after installation Solution Inserted this code on my ProjectInstaller protected override void OnAfterInstall(Sys..

How to add color to Github's README.md file

I have a README.md file for my project underscore-cli, a pretty sweet tool for hacking JSON and JS on the command-line, and I want to document the --color flag. Currently, the ONLY way to do this is w..

Difference between an API and SDK

I am trying to explain to a non-developer the difference between an API an SDK. I need to explain why a commercial fingerprint software vendor will likely not provide an SDK, although they may certain..

Change span text?

Possible Duplicate: How do I change the text of a span element in javascript Well, I've searched a lot for the answer to this, but still I couldn't find it. What I did find didn't work. Wh..

Compiling LaTex bib source

I am writing my thesis in Latex, and I have the references in an own thesis.bib file which look as follows @Article{xxx, author = "D.A. Reinhard", title = "Case Study", year = ..

INNER JOIN ON vs WHERE clause

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..

Node.js project naming conventions for files & folders

What are the naming conventions for files and folders in a large Node.js project? Should I capitalize, camelCase, or under-score? Ie. is this considered valid? project-name app controll..

Intercept page exit event

When editing a page within my system, a user might decide to navigate to another website and in doing so could lose all the edits they have not saved. I would like to intercept any attempt to go to a..

Make a simple fade in animation in Swift?

I am trying to make a simple animation in Swift. It is a fade in. I attempted: self.myFirstLabel.alpha = 0 self.myFirstButton.alpha = 0 self.mySecondButton.alpha = 0 Then, I have: self.view.addSu..

How can I set up an editor to work with Git on Windows?

I'm trying out Git on Windows. I got to the point of trying "git commit" and I got this error: Terminal is dumb but no VISUAL nor EDITOR defined. Please supply the message using either -m or -..

How to create exe of a console application

How can we create the exe for a console forms application ?..

get name of a variable or parameter

I would like to get the name of a variable or parameter: For example if I have: var myInput = "input"; var nameOfVar = GETNAME(myInput); // ==> nameOfVar should be = myInput void testName([Typ..

CSS Cell Margin

In my HTML document, I have a table with two columns and multiple rows. How can I increase the space in between the first and second column with css? I've tried applying "margin-right: 10px;" to each ..

How to concatenate string variables in Bash

In PHP, strings are concatenated together as follows: $foo = "Hello"; $foo .= " World"; Here, $foo becomes "Hello World". How is this accomplished in Bash?..

How do I deal with certificates using cURL while trying to access an HTTPS url?

I am getting the following error using curl: curl: (77) error setting certificate verify locations: CAfile: /etc/ssl/certs/ca-certificates.crt CApath: none How do I set this certificate verif..

no suitable HttpMessageConverter found for response type

Using spring, with this code : List<HttpMessageConverter<?>> messageConverters = restTemplate.getMessageConverters(); for(HttpMessageConverter httpMessageConverter : messageConverters){ ..

Apply style to cells of first row

It should be very simple but I can't figure it out. I have a table like this : <table class="category_table"> <tr><td> blabla 1</td><td> blabla 2 </td></tr>..

Duplicate / Copy records in the same MySQL table

I have been looking for a while now but I can not find an easy solution for my problem. I would like to duplicate a record in a table, but of course, the unique primary key needs to be updated. I hav..

INSERT INTO vs SELECT INTO

What is the difference between using SELECT ... INTO MyTable FROM... and INSERT INTO MyTable (...) SELECT ... FROM .... ? From BOL [ INSERT, SELECT...INTO ], I know that using SELECT...INTO wil..

SQL Current month/ year question

So I have a table that has the month and year broken down, for example field called Month has the number 7 in it (this month) and the Year field has 2011. Theres also additional months years, etc. How..

decompiling DEX into Java sourcecode

How can one decompile Android DEX (VM bytecode) files into corresponding Java sourcecode?..

Python Key Error=0 - Can't find Dict error in code

basically I have been racking my brains for a good while now as to why my code is not working, I have tested parts separately and have look throughout the web to see if it can help, to no avail. I am ..

Entity Framework Query for inner join

What would be the query for: select s.* from Service s inner join ServiceAssignment sa on sa.ServiceId = s.Id where sa.LocationId = 1 in entity framework? This is what I wrote: var serv = (fro..

Filtering Pandas Dataframe using OR statement

I have a pandas dataframe and I want to filter the whole df based on the value of two columns in the data frame. I want to get back all rows and columns where IBRD or IMF != 0. alldata_balance = a..

Install apk without downloading

Can I install apk file without downloading? The apk file is on the server. I tried the code below but it doesn't work: public static void InstallProgram(Uri uri, Context context){ Intent intent =..

Why should the static field be accessed in a static way?

public enum MyUnits { MILLSECONDS(1, "milliseconds"), SECONDS(2, "seconds"),MINUTES(3,"minutes"), HOURS(4, "hours"); private MyUnits(int quantity, String units) { this.quantity = ..

Transition of background-color

I'm trying to make a transition effect with background-color when hovering menu items, but it does not work. Here is my CSS code: #content #nav a:hover { color: black; background-color: #AD31..

Do sessions really violate RESTfulness?

Is using sessions in a RESTful API really violating RESTfulness? I have seen many opinions going either direction, but I'm not convinced that sessions are RESTless. From my point of view: authentica..

Reactjs convert html string to jsx

I'm having trouble dealing with facebook's ReactJS. Whenever I do ajax and want to display an html data, ReactJS displays it as text. (See figure below) The data is displayed through the success ca..

Convert char to int in C and C++

How do I convert a char to an int in C and C++?..

How to split a string between letters and digits (or between digits and letters)?

I'm trying to work out a way of splitting up a string in java that follows a pattern like so: String a = "123abc345def"; The results from this should be the following: x[0] = "123"; x[1] = "abc"; ..

Computed / calculated / virtual / derived columns in PostgreSQL

Does PostgreSQL support computed / calculated columns, like MS SQL Server? I can't find anything in the docs, but as this feature is included in many other DBMSs I thought I might be missing somethin..

How do I access the HTTP request header fields via JavaScript?

I want to capture the HTTP request header fields, primarily the Referer and User-Agent, within my client-side JavaScript. How may I access them? Google Analytics manages to get the data via JavaSc..

How can I get the executing assembly version?

I am trying to get the executing assembly version in C# 3.0 using the following code: var assemblyFullName = Assembly.GetExecutingAssembly().FullName; var version = assemblyFullName .Split(',')[1].Sp..

How to hide "Showing 1 of N Entries" with the dataTables.js library

How do you remove the "Showing 1 of N entries" line of text on a dataTable (that is when using the javascript library dataTables? I think I was looking for something along these lines... $('#example..

Changing plot scale by a factor in matplotlib

I am creating a plot in python. Is there a way to re-scale the axis by a factor? The yscale and xscale commands only allow me to turn log scale off. Edit: For example. If I have a plot where the x s..

Get current controller in view

I have a View - _Edit which lives in News M/V/C. I reuse the V/M via the CategoryController as: return PartialView("/Views/News/_Edit.cshtml", model); How from within the View - _Edit can I alert ..

Produce a random number in a range using C#

How do I go about producing random numbers within a range?..

Regex lookahead, lookbehind and atomic groups

I found these things in my regex body but I haven't got a clue what I can use them for. Does somebody have examples so I can try to understand how they work? (?!) - negative lookahead (?=) - positive..

Not class selector in jQuery

Is there a simple selector expression to not select elements with a specific class? <div class="first-foo" /> <div class="first-moo" /> <div class="first-koo" /> <div class="firs..

Using an integer as a key in an associative array in JavaScript

When I create a new JavaScript array, and use an integer as a key, each element of that array up to the integer is created as undefined. For example: var test = new Array(); test[2300] = 'Some string'..

Combine two tables for one output

Say I have two tables: KnownHours: ChargeNum CategoryID Month Hours 111111 1 2/1/09 10 111111 1 3/1/09 30 111111 1 4/1/09 50 222..

Pass a PHP string to a JavaScript variable (and escape newlines)

What is the easiest way to encode a PHP string for output to a JavaScript variable? I have a PHP string which includes quotes and newlines. I need the contents of this string to be put into a JavaSc..

Is there a way to make Firefox ignore invalid ssl-certificates?

I am maintaining a few web applications. The development and qa environments use invalid/outdated ssl-certificates. Although it is generally a good thing, that Firefox makes me click like a dozen tim..

How to pass data between fragments

Im trying to pass data between two fragmens in my program. Its just a simple string that is stored in the List. The List is made public in fragments A, and when the user clicks on a list item, I need ..

Cannot install node modules that require compilation on Windows 7 x64/VS2012

I cannot install any of the modules that require compilation. All they fail with the following error: MSBUILD : error MSB3411: Could not load the Visual C++ component "VCBuild.exe". ... My environm..

List vs tuple, when to use each?

In Python, when should you use lists and when tuples? Sometimes you don't have a choice, for example if you have "hello %s you are %s years old" % x then x must be a tuple. But if I am the one wh..

Disable Logback in SpringBoot

It appears Springboot autoconfigures itself to use Logback with Tomcat. I would like to disable this and use the one I provide in my classpath. The error message below. LoggerFactory is not a Log..

How to find out "The most popular repositories" on Github?

Once upon a time, we can watch the most popular repositories (Most forked or Most watched) at this page (https://github.com/popular/watched) of Github. like this: But now when you try to explore re..

How do I remove the title bar from my app?

In my app there is this title bar at the top where the overflow menu would be, but I don't need settings and only have one screen. When I change the theme like described in many other questions I get ..

Signtool error: No certificates were found that met all given criteria with a Windows Store App?

I'm trying to sign a Windows 8 appx package with a pfx file I have. I'm using a command like so: signtool.exe sign /fd sha256 /f "key.pfx" "app.appx" And from this, I get: SignTool Error: No ce..

Want custom title / image / description in facebook share link from a flash app

Possible Duplicate: How does Facebook Sharer select Images? I am making a flash app that demonstrates potensial traffic injuries when driving at different speeds. I want the user to be able..

concatenate two database columns into one resultset column

I use the following SQL to concatenate several database columns from one table into one column in the result set: SELECT (field1 + '' + field2 + '' + field3) FROM table1 When one of the fields is nu..

How to add new column to an dataframe (to the front not end)?

How to add a new variable to an existing data frame, but I want to add to the front not end. eg. my dataframe is b c d 1 2 3 1 2 3 1 2 3 I want to add a new variable a, so the dataframe will looks ..

how do I check in bash whether a file was created more than x time ago?

I want to check in linux bash whether a file was created more than x time ago. let's say the file is called text.txt and the time is 2 hours. if [ what? ] then echo "old enough" fi ..

Angularjs dynamic ng-pattern validation

I have a form that if a checkbox is false enforces validation on a text input using the ng-required directive. If the checkbox is true, the field is hidden and the ng-required is set to false. The p..

C#: calling a button event handler method without actually clicking the button

I have a button in my aspx file called btnTest. The .cs file has a function which is called when the button is clicked. btnTest_Click(object sender, EventArgs e) How can I call this function from w..

Jquery select change not firing

I need to capture when a select box changes, should be simple! $('#multiid').change(function(){ alert('Change Happened'); }); But it does not work, I suspected the problem is that the selec..

Android Fastboot devices not returning device

At the moment I would like to reinstall Android on my device(custom hardware device). I got the image files after building. But when I enter fastboot devices nothing returns. adb devices is working...

Using Excel as front end to Access database (with VBA)

I am building a small application for a friend and they'd like to be able to use Excel as the front end. (the UI will basically be userforms in Excel). They have a bunch of data in Excel that they wou..

clear cache of browser by command line

I am working in media domain. I need to check every change in all leading browsers i.e. IE, Firefox, Chrome, Safari and Opera. To clear cache, every time i need to use Ctrl + Shift + del. Is there a..

Expand Python Search Path to Other Source

I have just joined a project with a rather large existing code base. We develop in linux and do not use and IDE. We run through the command line. I'm trying to figure out how to get python to search f..

How to check what user php is running as?

I need to detect if php is running as nobody. How do I do this? Are there any other names for "nobody"? "apache"? Any others?..

How do I get console input in javascript?

I'm currently using spidermonkey to run my JavaScript code. I'm wondering if there's a function to get input from the console similar to how Python does this: var = raw_input() Or in C++: std::c..

Why am I getting error for apple-touch-icon-precomposed.png

I have created a new rails3 project but I am seeing following logs many times in my server logs. Why I am getting these request and how can I avoid these? Started GET "/apple-touch-icon-precompose..

Release generating .pdb files, why?

Why does Visual Studio 2005 generate the .pdb files when compiling in release? I won't be debugging a release build, so why are they generated?..

How to do a newline in output

How do I make \n actually work in my output? At the moment it just writes it all in 1 long block. Thanks for any help Dir.chdir 'C:/Users/name/Music' music = Dir['C:/Users/name/Music/*.{mp3, MP3}'] p..

Best way to detect Mac OS X or Windows computers with JavaScript or jQuery

So I'm trying to move a "close" button to the left side when the user is on Mac and the right side when the user is on PC. Now I'm doing it by examining the user agent, but it can be too easily spoofe..

Offset a background image from the right using CSS

Is there a way to position a background image a certain number of pixels from the right of its element? For example, to position something a certain number of pixels (say, 10) from the left, this is ..

@RequestBody and @ResponseBody annotations in Spring

Can someone explain the @RequestBody and @ResponseBody annotations in Spring 3? What are they for? Any examples would be great...

Object does not support item assignment error

In my views.py I assign values before saving the form. I used to do it the following way: projectForm.lat = session_results['lat'] projectForm.lng = session_results['lng'] Now, since the list of va..

The difference between fork(), vfork(), exec() and clone()

I was looking to find the difference between these four on Google and I expected there to be a huge amount of information on this, but there really wasn't any solid comparison between the four calls. ..

How to run a Maven project from Eclipse?

I am trying to run a simple Java project. I had created a project using the 'Maven Project' type. I have one main class called 'TestMain'. When I tried to run the project using right click -> run, the..

"Uncaught TypeError: a.indexOf is not a function" error when opening new foundation project

I've created a new Foundation 5 project through bash, with foundation new my-project. When I open the index.html file in Chrome an Uncaught TypeError: a.indexOf is not a function error is shown in the..

Make element fixed on scroll

I'm attempting to make the navigation bar stick to the top, when the user scrolls down to the nav bar and then unstick when the user scrolls back up past the navbar. I understand that this can only be..

Difference between timestamps with/without time zone in PostgreSQL

Are timestamp values stored differently in PostgreSQL when the data type is WITH TIME ZONE versus WITHOUT TIME ZONE? Can the differences be illustrated with simple test cases?..

How to get enum value by string or int

How can I get the enum value if I have the enum string or enum int value. eg: If i have an enum as follows: public enum TestEnum { Value1 = 1, Value2 = 2, Value3 = 3 } and in some stri..

React prevent event bubbling in nested components on click

Here's a basic component. Both the <ul> and <li> have onClick functions. I want only the onClick on the <li> to fire, not the <ul>. How can I achieve this? I've played around ..

jQuery Find and List all LI elements within a UL within a specific DIV

I have 3 Columns of ULs each a Dynamic UL container that can have anywhere from 0-9 LI containers (eventually more). All my LI elements have an attribute "rel" which I am trying to ultimately find tha..

How to extract multiple JSON objects from one file?

I am very new to Json files. If I have a json file with multiple json objects such as following: {"ID":"12345","Timestamp":"20140101", "Usefulness":"Yes", "Code":[{"event1":"A","result":"1"},…]} {..

Java ArrayList - how can I tell if two lists are equal, order not mattering?

I have two ArrayLists of type Answer (self-made class). I'd like to compare the two lists to see if they contain the same contents, but without order mattering. Example: //These should be equal. A..

Found conflicts between different versions of the same dependent assembly that could not be resolved

When I clean and then build my solution that has several projects, the output window reports that the build succeeded. However, when I view the Error List Window, it shows me this warning: Found c..

How to concat two ArrayLists?

I have two ArrayLists of equal size. List 1 consists of 10 names and list 2 consists of their phone numbers. I want to concat the names and number into one ArrayList. How do I do this?..

Append same text to every cell in a column in Excel

How can I append text to every cell in a column in Excel? I need to add a comma (",") to the end. Example: [email protected] turns into [email protected], Data Sample: [email protected] sat..

What is the difference between SQL Server 2012 Express versions?

I've come across this page http://www.microsoft.com/en-us/download/details.aspx?id=29062 and I am a bit confused about the different versions here. So I would like to know what is the difference betw..

Dynamic SQL - EXEC(@SQL) versus EXEC SP_EXECUTESQL(@SQL)

What are the real world pros and cons of executing a dynamic SQL command in a stored procedure in SQL Server using EXEC (@SQL) versus EXEC SP_EXECUTESQL @SQL ?..

Difference between -XX:+UseParallelGC and -XX:+UseParNewGC

They are algorithms for the young generation garbage collection. The second one (UseParNewGC) gets activated automatically with the concurrent tenured generation garbage collection (see Java Concurr..

Remove Last Comma from a string

Using JavaScript, how can I remove the last comma, but only if the comma is the last character or if there is only white space after the comma? This is my code. I got a working fiddle. But it has a b..

android button selector

This is a button selector such that when normal it appears red, when pressed it appears grey. I would like to ask how could the code be further directly modified such that when PRESSED the text size ..

How do I turn off Unicode in a VC++ project?

I have a VC++ project in Visual Studio 2008. It is defining the symbols for unicode on the compiler command line (/D "_UNICODE" /D "UNICODE"), even though I do not have this symbol turned on in the..

Heap space out of memory

My application currently consumes quite a lot of memory because it is running physics simulations. The issue is that consistently, at the 51st simulation, Java will throw an error usually because of a..

How should I call 3 functions in order to execute them one after the other?

If I need call this functions one after other, $('#art1').animate({'width':'1000px'},1000); $('#art2').animate({'width':'1000px'},1000); $('#art3').animate({'width':'1000px'},1000); ..

libxml/tree.h no such file or directory

I am getting following errors. libxml/tree.h no such file or directory I have already added libxml2.dylib to my project, however I am getting this type of trouble. Please help me...