Questions Tagged with #Ora 00979

ORA-00979: not a GROUP BY expression

ORA-00979 not a group by expression

I am getting ORA-00979 with the following query: SELECT cr.review_sk, cr.cs_sk, cr.full_name, tolist(to_char(cf.fact_date, 'mm/dd/yyyy')) "appt", cs.cs_id, cr.tracking_number from review cr, cs, fact..

GROUP BY with MAX(DATE)

I'm trying to list the latest destination (MAX departure time) for each train in a table, for example: Train Dest Time 1 HK 10:00 1 SH 12:00 1 SZ 14:..

TypeError: worker() takes 0 positional arguments but 1 was given

I'm trying to implement a subclass and it throws the error: TypeError: worker() takes 0 positional arguments but 1 was given class KeyStatisticCollection(DataDownloadUtilities.DataDownloadCollectio..

Add button to a layout programmatically

I'm having trouble adding a button to a layout that I've created in XML. Here's what I want to achieve: //some class else { startActivity(new Intent(StatisticsScreen.this, ScreenTemperature.c..

Programmatically relaunch/recreate an activity?

After I do some change in my database, that involves significant change in my views, I would like to redraw, re-execute onCreate. How is that possible?..

Create a HTML table where each TR is a FORM

I'm trying to create a table where each row is a form. I want that each input is in a different table division, but I still need that for example, all first inputs belong to the same table head and so..

How do I read text from the clipboard?

How do I read text from the (windows) clipboard with python?..

Get the name of a pandas DataFrame

How do I get the name of a DataFrame and print it as a string? Example: boston (var name assigned to a csv file) import pandas as pd boston = pd.read_csv('boston.csv') print('The winner is team ..

Getting ssh to execute a command in the background on target machine

This is a follow-on question to the How do you use ssh in a shell script? question. If I want to execute a command on the remote machine that runs in the background on that machine, how do I get the ..

Excel VBA App stops spontaneously with message "Code execution has been halted"

From what I can see on the web, this is a fairly common complaint, but answers seem to be rarer. The problem is this: We have a number of Excel VBA apps which work perfectly on a number of users' mac..

Mosaic Grid gallery with dynamic sized images

I have just received the following design for a project, for an image grid gallery, with dynamic width & height images (user submitted images). (Screenshot at the end of post) I have tried jQuery..

Choosing the best concurrency list in Java

My thread pool has a fixed number of threads. These threads need to write and read from a shared list frequently. So, which data structure (it better be a List, must be monitor-free) in java.util.co..

How can I map "insert='false' update='false'" on a composite-id key-property which is also used in a one-to-many FK?

I am working on a legacy code base with an existing DB schema. The existing code uses SQL and PL/SQL to execute queries on the DB. We have been tasked with making a small part of the project database-..

Failed to resolve: com.google.firebase:firebase-core:9.0.0

I get the following error while upgrading a firebase project from old domain to new google firebase domain. Failed to resolve: com.google.firebase:firebase-core:9.0.0 I followed the steps menti..

Best practices for styling HTML emails

I'm designing an HTML template for an email newsletter. I've learned that many email clients ignore linked stylesheets, and many others (including Gmail) ignore CSS block declarations altogether. Are ..

click() event is calling twice in jquery

I setup a link element and called its click event in jquery but the click event is calling twice, please see below the code of jquery. $("#link_button") .button() .click(function () { $("#attachme..

How do I configure modprobe to find my module?

I'm trying to get a kernel module to load at boot. If I run insmod /path/to/module.ko, it works fine. But this has to be repeated every time I reboot. If I run modprobe /path/to/module.ko, it can't ..

What is the purpose of willSet and didSet in Swift?

Swift has a property declaration syntax very similar to C#'s: var foo: Int { get { return getFoo() } set { setFoo(newValue) } } However, it also has willSet and didSet actions. These are ca..

database vs. flat files

The company I work for is trying to switch a product that uses flat file format to a database format. We're handling pretty big files of data (ie: 25GB/file) and they get updated really quick. We need..

what does mysql_real_escape_string() really do?

One thing that I hate about documentation at times (when you're a beginner) is how it doesn't really describe things in english. Would anyone mind translating this documentation for me? I'd like to kn..

What are unit tests, integration tests, smoke tests, and regression tests?

What are unit tests, integration tests, smoke tests, and regression tests? What are the differences between them and which tools can I use for each of them? For example, I use JUnit and NUnit for un..

jQuery datepicker years shown

With the jQuery datepicker, how does one change the year range that is displayed? On the jQuery UI site it says the default is "10 years before and after the current year are shown". I want to use t..

how to read System environment variable in Spring applicationContext

How to read the system environment variable in the application context? I want something like : <util:properties id="dbProperties" location="classpath:config_DEV/db.properties" /> or..

How is the default submit button on an HTML form determined?

If a form is submitted but not by any specific button, such as by pressing Enter using HTMLFormElement.submit() in JS how is a browser supposed to determine which of multiple submit buttons, if an..

Multi-character constant warnings

Why is this a warning? I think there are many cases when is more clear to use multi-char int constants instead of "no meaning" numbers or instead of defining const variables with same value. When pars..

How to Create an excel dropdown list that displays text with a numeric hidden value

I am trying to create a drop down list that displays text with a hidden numerical value attached. Then I will have a standard formula on the same row that calculates a value based upon the hidden valu..

How do you add UI inside cells in a google spreadsheet using app script?

I'd like to add buttons to specific cells in Google docs spreadsheet. The apps script UI documentation talks about how to add a new panel, but it's not clear how UI in that panel could be attached t..

How to document a method with parameter(s)?

How to document methods with parameters using Python's documentation strings? EDIT: PEP 257 gives this example: def complex(real=0.0, imag=0.0): """Form a complex number. Keyword arguments..

Sending Windows key using SendKeys

I am working on shortcuts in C#. I succeed implementing Ctrl, Alt and Shift with SendKeys. Like this; Ctrl + C: System.Windows.Forms.SendKeys.SendWait("^c"); or Alt + F4: System.Windows.Forms.Se..

Install numpy on python3.3 - Install pip for python3

For python 3.2 I used sudo apt-get install python3.2-numpy.It worked. What to do for python3.3? Nothing I could think of works. Same goes for scipy, etc. Thanks. Edit: this is how it looks like radu..

Count multiple columns with group by in one query

I count values from multiple columns like this: SELECT COUNT(column1),column1 FROM table GROUP BY column1 SELECT COUNT(column2),column2 FROM table GROUP BY column2 SELECT COUNT(column3),column3 FR..

How to find the remainder of a division in C?

Which is the best way to find out whether the division of two numbers will return a remainder? Let us take for example, I have an array with values {3,5,7,8,9,17,19}. Now I need to find the perfect di..

Saving changes after table edit in SQL Server Management Studio

If I want to save any changes in a table, previously saved in SQL Server Management Studio (no data in table present) I get an error message: Saving changes is not permitted. The changes you have ..

Setting dynamic scope variables in AngularJs - scope.<some_string>

I have a string I have gotten from a routeParam or a directive attribute or whatever, and I want to create a variable on the scope based on this. So: $scope.<the_string> = "something". Howev..

Pass Javascript Variable to PHP POST

Possible Duplicate: JavaScript post request like a form submit I have a value calculated in JS that I'd like to pass as part of an input form to a PHP script. How can I get a value the JS v..

How do I get the last character of a string?

How do I get the last character of a string? public class Main { public static void main(String[] args) { String s = "test string"; //char lastChar = ??? } } ..

How to add extra whitespace in PHP?

I was wondering how can I add extra whitespace in php is it something like \s please help thanks. Is there a tutorial that list these kind of things thanks...

Deny all, allow only one IP through htaccess

I'm trying to deny all and allow only for a single IP. But, I would like to have the following htaccess working for that single IP. I'm not finding a way to have both working: the deny all and allow o..

How do I get indices of N maximum values in a NumPy array?

NumPy proposes a way to get the index of the maximum value of an array via np.argmax. I would like a similar thing, but returning the indexes of the N maximum values. For instance, if I have an arra..

Responsive bootstrap 3 timepicker?

Does anyone know of a good responsive bootstrap 3 timepicker? Ive spent a week going through timepicker after timepicker and there was always a problem for example: http://jdewit.github.io/bootstrap-..

What is private bytes, virtual bytes, working set?

I am trying to use the perfmon windows utility to debug memory leaks in a process. This is how perfmon explains the terms: Working Set is the current size, in bytes, of the Working Set of this proce..

Bootstrap modal link

How can I make button become a link only and have a popup in bootstrap 3? code <a href="" data-toggle="modal" data-target=".bannerformmodal">Load me</a> <div class="modal fade banne..

change values in array when doing foreach

example: var arr = ["one","two","three"]; arr.forEach(function(part){ part = "four"; return "four"; }) alert(arr); The array is still with it's original values, is there any way to have writi..

What goes into your .gitignore if you're using CocoaPods?

I've been doing iOS development for a couple of months now and just learned of the promising CocoaPods library for dependency management. I tried it out on a personal project: added a dependency to K..

"Unable to launch the IIS Express Web server" error

I receive this error when trying to launch IIS Express from Visual Studio with a project that's configured to listen to an address other than localhost. Visual Studio freezes for about 30 seconds bef..

Filter LogCat to get only the messages from My Application in Android?

I observed that when i use Logcat with Eclipse with ADT for Android, I get messages from many other applications as well. Is there a way to filter this and show only messages from my own application o..

Clearing coverage highlighting in Eclipse

After running coverage reports in Eclipse (using cobertura or an EMMA plugin), my source code files get highlighted in green, red and yellow depending on which lines of code were covered by tests. Ho..

What does git rev-parse do?

What does git rev-parse do? I have read the man page but it raised more questions than answers. Things like: Pick out and massage parameters Massage? What does that mean? I'm using as a resolv..

How to determine when Fragment becomes visible in ViewPager

Problem: Fragment onResume() in ViewPager is fired before the fragment becomes actually visible. For example, I have 2 fragments with ViewPager and FragmentPagerAdapter. The second fragment is only a..

Saving response from Requests to file

I'm using Requests to upload a PDF to an API. It is stored as "response" below. I'm trying to write that out to Excel. import requests files = {'f': ('1.pdf', open('1.pdf', 'rb'))} response = reques..

Iterating C++ vector from the end to the beginning

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

Check if Key Exists in NameValueCollection

Is there a quick and simple way to check if a key exists in a NameValueCollection without looping through it? Looking for something like Dictionary.ContainsKey() or similar. There are many ways to s..

Are lists thread-safe?

I notice that it is often suggested to use queues with multiple threads, instead of lists and .pop(). Is this because lists are not thread-safe, or for some other reason?..

No visible cause for "Unexpected token ILLEGAL"

I'm getting this JavaScript error on my console: Uncaught SyntaxError: Unexpected token ILLEGAL This is my code: _x000D_ _x000D_ var foo = 'bar';?_x000D_ _x000D_ _x000D_ It's super simple, as..

How do I PHP-unserialize a jQuery-serialized form?

Using $('#form').serialize(), I was able to send this over to a PHP page. Now how do I unserialize it in PHP? It was serialized in jQuery...

Convert all first letter to upper case, rest lower for each word

I have a string of text (about 5-6 words mostly) that I need to convert. Currently the text looks like: THIS IS MY TEXT RIGHT NOW I want to convert it to: This Is My Text Right Now I can loop t..

If greater than batch files

I wrote a simple batch file to run Frequently Used websites based on a number selection. Here's the code I have. I am trying to set it so if someone inputs a number 6 or greater it will go to :N but w..

Using HTTPS with REST in Java

I have a REST server made in Grizzly that uses HTTPS and works wonderfully with Firefox. Here's the code: //Build a new Servlet Adapter. ServletAdapter adapter=new ServletAdapter(); adapter.addInitP..

Changing three.js background to transparent or other color

I've been trying to change what seems to be the default background color of my canvas from black to transparent / any other color - but no luck. My HTML: <canvas id="canvasColor"> My CSS: &..

Error LNK2019: Unresolved External Symbol in Visual Studio

I've downloaded this C++ code from the SBIG website in order to control (take pictures and save them) the camera (model ST-401ME) which I purchased from them. I have a Matlab program which needs to ca..

How to embed a Facebook page's feed into my website

I am working with a group to help promote a charity event. The page I would like to embed is NOT my Facebook profile, but a Facebook page someone has created. I would like to show that news feed in m..

How to compile makefile using MinGW?

I'm new to this. Just wanted to ask how to compile a makefile. I am using MinGW compiler in C language. Do I have to save all my files in MinGW\bin? because right now my files are in a different direc..

Export to csv in jQuery

I am dynamically generating a div which is like : <div id='PrintDiv'> <table id="mainTable"> <tr> <td> Col1 ..

Add a thousands separator to a total with Javascript or jQuery?

I have a function that sums a column of data in an html table. It does so admirably only I would like to have it put the commas in there that are needed to separate the thousands. Initially, you'll no..

Disable a Maven plugin defined in a parent POM

I am using a parent POM that defines a plugin that I do not want to be run in a child POM. How can I disable the plugin in the child pom completely? Constraint: I cannot change the parent POM itself...

Facebook Graph API error code list

Where can I find the official Graph API Error Code list? I have been using the Graph API for half a year, and in the past 6 months, the error code's format has changed twice! The first time I saw th..

Edit and replay XHR chrome/firefox etc?

I've been looking for a way to alter a XHR request made in my browser and then replay it again. Say I have a complete POST request done in my browser, and the only thing I want to change is a small va..

Code for printf function in C

Possible Duplicate: source code of c/c++ functions I was wondering where I can find the C code that's used so that when I write printf("Hello World!"); in my C programm to know that it has ..

Efficient Algorithm for Bit Reversal (from MSB->LSB to LSB->MSB) in C

What is the most efficient algorithm to achieve the following: 0010 0000 => 0000 0100 The conversion is from MSB->LSB to LSB->MSB. All bits must be reversed; that is, this is not endianness-swap..

IPython Notebook save location

I just started IPython Notebook, and I tried to use "Save" to save my progress. However, instead of saving the *.ipynb in my current working directory, it is saved in my python/Scripts folder. Would t..

sub and gsub function?

I have this command: $ find $PWD -name "*.jpg" | awk '{system( "echo " $(sub(/\//, "_")) ) }' _home/mol/Pulpit/test/1.jpg Now the same thing, but using gsub: $ find $PWD -name "*.jpg" | awk '{sys..

TypeError: cannot perform reduce with flexible type

I have been using the scikit-learn library. I'm trying to use the Gaussian Naive Bayes Module under the scikit-learn library but I'm running into the following error. TypeError: cannot perform reduce ..

SQL Query to find missing rows between two related tables

I have two tables: Table A ID ABC_ID VAL Table B ID ABC_ID VAL These two tables are directly related to each other through the ABC_ID column. I want to find all the VAL column values in tabl..

How to Flatten a Multidimensional Array?

Is it possible, in PHP, to flatten a (bi/multi)dimensional array without using recursion or references? I'm only interested in the values so the keys can be ignored, I'm thinking in the lines of arra..

Algorithm to return all combinations of k elements from n

I want to write a function that takes an array of letters as an argument and a number of those letters to select. Say you provide an array of 8 letters and want to select 3 letters from that. Then y..

How can I parse a CSV string with JavaScript, which contains comma in data?

I have the following type of string var string = "'string, duppi, du', 23, lala" I want to split the string into an array on each comma, but only the commas outside the single quotation mar..

How to do parallel programming in Python?

For C++, we can use OpenMP to do parallel programming; however, OpenMP will not work for Python. What should I do if I want to parallel some parts of my python program? The structure of the code may b..

Why "Data at the root level is invalid. Line 1, position 1." for XML Document?

I am using a third-party DLL which transmits an XML document over the internet. Why would the DLL be throwing the following exception? Data at the root level is invalid. Line 1, position 1. (see ..

Ruby on Rails 3 Can't connect to local MySQL server through socket '/tmp/mysql.sock' on OSX

I have a standard Rails3 environment, RVM 1.2.9, Rails 3.0.5, Ruby 1.9.2p180, MySQL2 Gem 0.2.7, mysql-5.5.10-osx10.6-x86_64 Error I get when running rake db:migrate to create database is: Can't con..

What is the difference between Unidirectional and Bidirectional JPA and Hibernate associations?

What is the difference between Unidirectional and Bidirectional associations? Since the table generated in the db are all the same,so the only difference I found is that each side of the bidiretional..

Download a specific tag with Git

I'm trying to figure out how I can download a particular tag of a Git repository - it's one version behind the current version. I saw there was a tag for the previous version on the git web page, wit..

How to get a file or blob from an object URL?

I am allowing the user to load images into a page via drag&drop and other methods. When an image is dropped, I'm using URL.createObjectURL to convert to an object URL to display the image. I am ..

Export database schema into SQL file

Is it possible in MS SQL Server 2008 to export database structure into a T-SQL file? I want to export not only tables schema but also primary keys, foreign keys, constraints, indexes, stored procedu..

Timeout for python requests.get entire response

I'm gathering statistics on a list of websites and I'm using requests for it for simplicity. Here is my code: data=[] websites=['http://google.com', 'http://bbc.co.uk'] for w in websites: r= requ..

Maven: The packaging for this project did not assign a file to the build artifact

I'm using Maven 3.0.3 on Mac 10.6.6. I have a JAR project and when I run the command "mvn clean install:install", I'm getting the error, [ERROR] Failed to execute goal org.apache.maven.plugins:mave..

How to upload files to server using JSP/Servlet?

How can I upload files to server using JSP/Servlet? I tried this: <form action="upload" method="post"> <input type="text" name="description" /> <input type="file" name="file" /..

how does unix handle full path name with space and arguments?

How does unix handle full path name with space and arguments ? In windows we quote the path and add the command-line arguments after, how is it in unix? "c:\foo folder with space\foo.exe" -help up..

Find duplicate records in a table using SQL Server

I am validating a table which has a transaction level data of an eCommerce site and find the exact errors. I want your help to find duplicate records in a 50 column table on SQL Server. Suppose my d..

how to make a full screen div, and prevent size to be changed by content?

for my web application, i would like the main div to be full screen (both width and height = 100%), and regardless of content, i want it to stay at that size. that means, if there are not much content..

CreateElement with id?

I'm trying to modify this code to also give this div item an ID, however I have not found anything on google, and idName does not work. I read something about append, however it seems pretty complicat..

How to encrypt a large file in openssl using public key

How can I encrypt a large file with a public key so that no one other than who has the private key be able to decrypt it? I can make RSA public and private keys but when it comes to encrypting a lar..

Custom ImageView with drop shadow

Okay, I've been reading and searching around, and am now banging my head against the wall trying to figure this out. Here's what I have so far: package com.pockdroid.sandbox; import android.content...

Warning "Do not Access Superglobal $_POST Array Directly" on Netbeans 7.4 for PHP

I've got this message warning on Netbeans 7.4 for PHP while I'm using $_POST, $_GET, $_SERVER, .... Do not Access Superglobal $_POST Array Directly What does it mean? What can I do to correct th..

Select * from subquery

I'd like to get sum of column1, sum of column2 and total sum. In Postgres I can do it this way: (notice the star) SELECT *, a+b AS total_sum FROM ( SELECT SUM(column1) AS a, SUM(column2) AS b F..

How to convert md5 string to normal text?

I have saved user passwords in MD5 form in my database, now I want to send password to users in plaintext, is there any way I can convert an MD5 string to plaintext? ..

How to format a duration in java? (e.g format H:MM:SS)

I'd like to format a duration in seconds using a pattern like H:MM:SS. The current utilities in java are designed to format a time but not a duration...

Moving up one directory in Python

Is there a simple way to move up one directory in python using a single line of code? Something similar to cd .. in command line..

Font Awesome not working, icons showing as squares

So I'm trying to prototype a marketing page and I'm using Bootstrap and the new Font Awesome file. The problem is that when I try to use an icon, all that gets rendered on the page is a big square. ..

jQuery DataTables Getting selected row values

I am using jQuery datatable.I done it using http://www.datatables.net/examples/api/select_row.html Now I want to get selected row values ids Script: $(document).ready(function() { var table = $('#..

Split a String into an array in Swift?

Say I have a string here: var fullName: String = "First Last" I want to split the string base on white space and assign the values to their respective variables var fullNameArr = // something like..

How to get the Display Name Attribute of an Enum member via MVC Razor code?

I've got a property in my model called Promotion that its type is a flag enum called UserPromotion. Members of my enum have display attributes set as follows: [Flags] public enum UserPromotion { N..

Removing address bar from browser (to view on Android)

Does anyone know how I can remove the address bar from the Android browser to better view my web app and make it look more like a native app?..

CodeIgniter - File upload required validation

I have 2 text fields and 1 file upload that are all required. Everything works when I require just the text fields, but when I require the file upload the validation error stays saying that a file is ..

.NET / C# - Convert char[] to string

What is the proper way to turn a char[] into a string? The ToString() method from an array of characters doesn't do the trick...

No Application Encryption Key Has Been Specified

I'm new to Laravel and I'm trying to use the Artisan command... php artisan serve It displays... Laravel development server started: http://127.0.0.1:8000 However, it won't automatically laun..

How to convert the ^M linebreak to 'normal' linebreak in a file opened in vim?

vim shows on every line ending ^M How I do to replace this with a 'normal' linebreak?..

VBA: activating/selecting a worksheet/row/cell

Hello Stackoverflowers, I'm trying to use a button, that first goes to another excel file in a specific directory. While performing something, I want to add a row in a sheet the excel file i'm runnin..

How do I add python3 kernel to jupyter (IPython)

My Jupyter notebooks installed with python 2 kernel. I do not understand why. I might have messed something up when I did the install. I already have python 3 installed. How can I add it to Jupyter? ..

What are the JavaScript KeyCodes?

What keycodes are available for JavaScript? If they're not the same for all browsers, please list the keycodes for each browser...

What is the '.well' equivalent class in Bootstrap 4

In bootstrap-3 there is .well class which adds a rounded border around an element with a gray background color and some padding. <div class="well">Basic Well</div> But, I didn't find an..

How to compare dates in Java?

How do I compare dates in between in Java? Example: date1 is 22-02-2010 date2 is 07-04-2010 today date3 is 25-12-2010 date3 is always greater than date1 and date2 is always today. How do I veri..

How to parse JSON array in jQuery?

EDIT I checked the jQuery documentation and using $.ajax with the json datatype specified returns an evaluated javascript object, so eval() isn't the answer here. I knew that anyway, since I am able ..

Finding the id of a parent div using Jquery

I have some html like this: <div id="1"> <p> Volume = <input type="text" /> <button rel="3.93e-6" class="1" type="button">Check answer</button> &..

For loop in Oracle SQL

I am new to Oracle and I am unaware about using for loop in Oracle SQL (not PL/SQL). I had a requirement to increase the number by +1 in the query and execute the statements; is it possible to use a ..

Operation is not valid due to the current state of the object, when I select a dropdown list

I have radcombo boxes on aspx page, and when I select any option from then it gives error`Server Error in '/' Application. Operation is not valid due to the current state of the object. Description: A..

ALTER TABLE DROP COLUMN failed because one or more objects access this column

I am trying to do this: ALTER TABLE CompanyTransactions DROP COLUMN Created But I get this: Msg 5074, Level 16, State 1, Line 2 The object 'DF__CompanyTr__Creat__0CDAE408' is dependent on col..

SQL ORDER BY date problem

Can you please help me in solving this problem. I am trying to order the results of an SQL query by date, but I'm not getting the results I need. The query I'm using is: SELECT date FROM tbemp ORDER..

Why does Eclipse automatically add appcompat v7 library support whenever I create a new project?

Why does Eclipse automatically add appcompat v7 library support whenever I create a new project? I am creating a simple project whose MainActivity should extend Activity, but it does not. Eclipse aut..

How can I generate UUID in C#

I am creating an .idl file programmatically. How do I create UUIDs for the interfaces and Methods Programmatically. Can I generate the UUID programmatically?..

How should I declare default values for instance variables in Python?

Should I give my class members default values like this: class Foo: num = 1 or like this? class Foo: def __init__(self): self.num = 1 In this question I discovered that in both c..

Java - How to convert type collection into ArrayList?

public class MyGraph<V,E> extends SparseMultigraph<V,E>{ private ArrayList<MyNode> myNodeList; public MyNode getNode(int nodeId){ myNodeList = new ArrayList<MyNod..

Generate random colors (RGB)

I just picked up image processing in python this past week at the suggestion of a friend to generate patterns of random colors. I found this piece of script online that generates a wide array of diffe..

jQuery or Javascript - how to disable window scroll without overflow:hidden;

Hi is it possible to disable window scrolling without using overflow:hidden; when i'm hover an element? i tryed : $('.chat-content').on('mouseenter',function(){ $(document).scroll(function(e){ ..

How to convert a std::string to const char* or char*?

How can I convert an std::string to a char* or a const char*?..

Should I return EXIT_SUCCESS or 0 from main()?

It's a simple question, but I keep seeing conflicting answers: should the main routine of a C++ program return 0 or EXIT_SUCCESS? #include <cstdlib> int main(){return EXIT_SUCCESS;} or int m..

Difference between a class and a module

I came from Java, and now I am working more with Ruby. One language feature I am not familiar with is the module. I am wondering what exactly is a module and when do you use one, and why use a modul..

Mapping a JDBC ResultSet to an object

I have a user class that has 16 attributes, things such as firstname, lastname, dob, username, password etc... These are all stored in a MySQL database and when I want to retrieve users I use a Result..

WPF Datagrid set selected row

How do I use the Datagrid.SelectedItem to select a row programmatically? Do I first have to create a IEnumerable of DataGridRow objects and pass the matching row to this SelectedItem property or how ..

How can I set a DateTimePicker control to a specific date?

How can I set a DateTimePicker control to a specific date (yesterday's date) in C# .NET 2.0?..

How to Sign an Already Compiled Apk

I've decoded an APK with apktool (as the original source code was lost) so I could fix some issues with the layout xml files. I've then rebuilt it back up with apktool and when I tried to install it o..

Remove duplicates from a dataframe in PySpark

I'm messing around with dataframes in pyspark 1.4 locally and am having issues getting the dropDuplicates method to work. It keeps returning the error: "AttributeError: 'list' object has no attr..

Tomcat is web server or application server?

Is Tomcat a web server or an application server?..

C# Ignore certificate errors?

I am getting the following error during a web service request to a remote web service: Could not establish trust relationship for the SSL/TLS secure channel. ---> System.Security.Authentication.Au..

Remove rows with all or some NAs (missing values) in data.frame

I'd like to remove the lines in this data frame that: a) contain NAs across all columns. Below is my example data frame. gene hsap mmul mmus rnor cfam 1 ENSG00000208234 0 NA NA ..

Xml serialization - Hide null values

When using a standard .NET Xml Serializer, is there any way I can hide all null values? The below is an example of the output of my class. I don't want to output the nullable integers if they are set ..

How do I convert an Array to a List<object> in C#?

How do I convert an Array to a List<object> in C#?..

Why would someone use WHERE 1=1 AND <conditions> in a SQL clause?

Why would someone use WHERE 1=1 AND <conditions> in a SQL clause (Either SQL obtained through concatenated strings, either view definition) I've seen somewhere that this would be used to protec..

SoapUI "failed to load url" error when loading WSDL

I keep having some weird problems. The main one is that I keep getting the following error when trying to add a WSDL to a new project: Error loading [https://.../token?wsdl]: java.lang.Exception: Fai..

Using jQuery, Restricting File Size Before Uploading

On PHP, they have a way to restrict file size AFTER uploading, but not BEFORE uploading. I use the Malsup jQuery Form Plugin for my form posting, and it supports image file posting. I was wondering i..

How can I make an entire HTML form "readonly"?

I have two pages with HTML forms. The first page has a submission form, and the second page has an acknowledgement form. The first form offers a choice of many controls, while the second page displays..

How to remove all null elements from a ArrayList or String Array?

I try with a loop like that // ArrayList tourists for (Tourist t : tourists) { if (t != null) { t.setId(idForm); } } But it isn't nice. Can anyone suggest me a better solu..

What does \u003C mean?

I'm looking at twitter's javascript file, and I see this in the templates hash: Browse Interests{{/i}}\u003C/a\u003E\n \u003C/li\u003E\n {{#logged_in}}\n What do those codes represent?..

Remove new lines from string and replace with one empty space

$string = " put returns between paragraphs for linebreak add 2 spaces at end "; Want to remove all new lines from string. I've this regex, it can catch all of them, the problem is I don't know wi..

How to parse XML in Bash?

Ideally, what I would like to be able to do is: cat xhtmlfile.xhtml | getElementViaXPath --path='/html/head/title' | sed -e 's%(^<title>|</title>$)%%g' > titleOfXHTMLPage.txt ..

how to open Jupyter notebook in chrome on windows

On my Windows PC, i have anaconda installed and when I open a jupyter notebook, it opens up in internet explorer, but I would like to use Chrome instead. Does anyone know how to achieve this?..

How to filter multiple values (OR operation) in angularJS

I want to use the filter in angular and want to filter for multiple values, if it has either one of the values then it should be displayed. I have for example this structure: An object movie which..

How to fix: "UnicodeDecodeError: 'ascii' codec can't decode byte"

as3:~/ngokevin-site# nano content/blog/20140114_test-chinese.mkd as3:~/ngokevin-site# wok Traceback (most recent call last): File "/usr/local/bin/wok", line 4, in Engine() File "/usr/local/lib/python2..

Difference and uses of onCreate(), onCreateView() and onActivityCreated() in fragments

What are the differences between onCreate(), onCreateView(), and onActivityCreated() in fragments and what would they each be used for?..

Read only the first line of a file?

How would you get only the first line of a file as a string with Python?..

Remove specific rows from a data frame

Possible Duplicate: removing specific rows from a dataframe Let's say I have a data frame consisting of a number of rows, like this: X <- data.frame(Variable1=c(11,14,12,15),Variable2=c..

Enum String Name from Value

I have an enum construct like this: public enum EnumDisplayStatus { None = 1, Visible = 2, Hidden = 3, MarkedForDeletion = 4 } In my database, the enumerations are referenced by..

How can I determine the type of an HTML element in JavaScript?

I need a way to determine the type of an HTML element in JavaScript. It has the ID, but the element itself could be a <div>, a <form> field, a <fieldset>, etc. How can I achieve this..

C# ASP.NET Single Sign-On Implementation

I am tasked with implementing single sign-on for our customers as part of our next release. The flow exists as follows: User logs into their school's main portal system using a student id/password..

ACCESS_FINE_LOCATION AndroidManifest Permissions Not Being Granted

I am trying to utilize GPS in Android (2.2 and 2.3) but am getting the following error when I try to use the LocationManager object: WARN/System.err(522): java.lang.SecurityException: Provider networ..

Python integer division yields float

Python 3.1 (r31:73574, Jun 26 2009, 20:21:35) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> 2/2 1.0 Is this intended? I str..

How to enable cURL in PHP / XAMPP

How do I enable cURL in PHP? ??..

Java: getMinutes and getHours

How do you get Hours and Minutes since Date.getHours and Date.getMinutes got deprecated? The examples that I found on Google search used the deprecated methods...

Get changes from master into branch in Git

In my repository I have a branch called aq which I'm working on. I then committed new work and bugs in master. What is the best way to get those commits into the aq branch? Create another new branc..

Command line tool to dump Windows DLL version?

I need a command line tool to dump standard Windows DLL version info so I can process it by means of a bash script (Cygwin). As a Java developer I am not very used to Microsoft development tools (tho..

How to make ConstraintLayout work with percentage values?

With a Preview 1 of Android Studio 2.2 Google released a new layout in its support library: ConstraintLayout. With ConstraintLayout it is easier to use a Design tool in Android Studio, but I didn't fi..

How to install ADB driver for any android device?

I am an android developer. I have a new HTC Inspire 4g phone but I don't know how to install usb driver for it. This is my android_winusb.inf file: ; ; Android WinUsb driver installation. ; [Version]..

What is the origin of foo and bar?

Where did they come from and when were they first used?..

How to print out more than 20 items (documents) in MongoDB's shell?

db.foo.find().limit(300) won't do it. It still prints out only 20 documents. db.foo.find().toArray() db.foo.find().forEach(printjson) will both print out very expanded view of each document inste..

Debugging iframes with Chrome developer tools

I'd like to use the Chrome developer console to look at variables and DOM elements in my app, but the app exists inside an iframe (since it's an OpenSocial app). So the situation is: <containing ..

Find JavaScript function definition in Chrome

Chrome's Developer Tools rock, but one thing they don't seem to have (that I could find) is a way to find a JavaScript function's definition. This would be super handy for me because I'm working on a ..

How to do a "Save As" in vba code, saving my current Excel workbook with datestamp?

I have an Excel Workbook that on form button click I want to save a copy of the workbook with the filename being the current date. I keep trying the the following ActiveWorkbook.SaveAs ("\\filePath\F..

iPhone Navigation Bar Title text color

It seems the iOS Navigation Bar title color is white by default. Is there a way to change it to a different color? I am aware of the navigationItem.titleView approach using an image. Since my design ..

How to properly compare two Integers in Java?

I know that if you compare a boxed primitive Integer with a constant such as: Integer a = 4; if (a < 5) a will automatically be unboxed and the comparison will work. However, what happens when ..

In python, what is the difference between random.uniform() and random.random()?

In python for the random module, what is the difference between random.uniform() and random.random()? They both generate pseudo random numbers, random.uniform() generates numbers from a uniform distri..

Print a file's last modified date in Bash

I can't seem to find how to print out the date of a file. I'm so far able to print out all the files in a directory, but I need to print out the dates with it. I know I need to attach a date format ..

Is it possible to refresh a single UITableViewCell in a UITableView?

I have a custom UITableView using UITableViewCells. Each UITableViewCell has 2 buttons. Clicking these buttons will change an image in a UIImageView within the cell. Is it possible to refresh each ce..

ios Upload Image and Text using HTTP POST

Thanks for reading. I am new to iOS and I am trying to upload an Image and a text using multi-part form encoding in iOS. The curl equivalent is something like this: curl -F "param1=value1" -F "para..

python BeautifulSoup parsing table

I'm learning python requests and BeautifulSoup. For an exercise, I've chosen to write a quick NYC parking ticket parser. I am able to get an html response which is quite ugly. I need to grab the li..

How do I set a column value to NULL in SQL Server Management Studio?

How do I clear the value from a cell and make it NULL?..

How to select a single child element using jQuery?

Using jQuery how do I select a single child element? I've looked at the Traversing API and know I can select all the immediate children img elements like this: $(this).children('img'); And to selec..

Getting attribute using XPath

Given an XML structure like so: <?xml version="1.0" encoding="ISO-8859-1"?> <bookstore> <book> <title lang="eng">Harry Potter</title> <price>29.99</price&..

Remote JMX connection

I'm trying to open a JMX connection to java application running on a remote machine. The application JVM is configured with the following options: com.sun.management.jmxremote com.sun.management.jm..

How do I create a folder in VB if it doesn't exist?

I wrote myself a little downloading application so that I could easily grab a set of files from my server and put them all onto a new pc with a clean install of Windows, without actually going on the..

AngularJS Uploading An Image With ng-upload

I am trying to upload a file in AngularJS using ng-upload but I am running into issues. My html looks like this: <div class="create-article" ng-controller="PostCreateCtrl"> <form ng-..

How do I move files in node.js?

How can I move files (like mv command shell) on node.js? Is there any method for that or should I read a file, write to a new file and remove older file?..

Replace contents of factor column in R dataframe

I need to replace the levels of a factor column in a dataframe. Using the iris dataset as an example, how would I replace any cells which contain virginica with setosa in the Species column? I expect..

Best way to define private methods for a class in Objective-C

I just started programming Objective-C and, having a background in Java, wonder how people writing Objective-C programs deal with private methods. I understand there may be several conventions and ha..

How to create a file in Android?

How to create a file, write data into it and read data from it on Android? If possible provide a code snippet...

Compilation fails with "relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object"

I'm trying to compile this source code from the makefile in a VPS, but its not working. The VPS is a 64 Cent OS Here's the full error # make gcc -c -O3 -w -DLINUX -I../SDK/amx/ ../SDK/amx/*.c g++ -c..

Difference between Git and GitHub

I have recently added a new project to Git using Eclipse, but do not see the project appear in my GitHub account. Why do they have the same account information and different repositories? Isn't Git ..

How can I convert integer into float in Java?

I have two integers x and y. I need to calculate x/y and as outcome I would like to get float. For example as an outcome of 3/2 I would like to have 1.5. I thought that easiest (or the only) way to do..

Mvn install or Mvn package

I am new to Maven, I have a Java based web project with maven configured in my MyEclipse. Now if I modified any java files then do I need to do Run as -> Mvn install or Mvn package?..

How to print formatted BigDecimal values?

I have a BigDecimal field amount which represents money, and I need to print its value in the browser in a format like $123.00, $15.50, $0.33. How can I do that? (The only simple solution which I se..

UIButton Image + Text IOS

I need a UIButton with image & text. Image should be in the top & text comes under the image both should be clickable...

Cannot serve WCF services in IIS on Windows 8

When I try to serve a WCF service on IIS in a Windows 8 machine, I get the well known error The page you are requesting cannot be served because of the extension configuration. If the page is a sc..

How to terminate a window in tmux?

How to terminate a window in tmux? Like the Ctrlak shortcut in screen with Ctrla being the prefix...

Using Excel OleDb to get sheet names IN SHEET ORDER

I'm using OleDb to read from an excel workbook with many sheets. I need to read the sheet names, but I need them in the order they are defined in the spreadsheet; so If I have a file that looks like..

Passing a string array as a parameter to a function java

I would like to pass a string array as a parameter to a function. Please look at the code below String[] stringArray = {'a', 'b', 'c', 'd', 'e'}; functionFoo(stringArray); Instead of: functionFo..

npm throws error without sudo

I just installed node and npm through the package on nodejs.org and whenever I try to search or install something with npm it throws the following error, unless I sudo the command. I have a feeling t..

Comparing two NumPy arrays for equality, element-wise

What is the simplest way to compare two NumPy arrays for equality (where equality is defined as: A = B iff for all indices i: A[i] == B[i])? Simply using == gives me a boolean array: >>> ..

how to drop database in sqlite?

I'm using SQLite in android. I want to drop the database. For example: mysql- drop database dbname How do I implement this code in SQLite? ..

Python loop for inside lambda

In my code I need to simplify as much as possible my line of code. EDIT: I think I'm not clear enough - it needs to be one line of code. I need to put a for loop inside a lambda expression, something ..

Android java.lang.NoClassDefFoundError

I have an Android project in eclipse IDE which was working. After some imports and tests, I get the error: java.lang.NoClassDefFoundError. In my project I have two packages: the main one and the sec..

Is it possible to play music during calls so that the partner can hear it ? Android

I'm trying to make and app like Call Cheater(Originally developed for Symbian OS) Is it possible to play a music during a phone conversation where receiver and caller should hear the same sound or mu..

How to get ID of button user just clicked?

Possible Duplicate: Getting the ID of the element that fired an event using JQuery I have many buttons with ID attribute. <button id="some_id1"></button> <button id="some_id..

What process is listening on a certain port on Solaris?

So I log into a Solaris box, try to start Apache, and find that there is already a process listening on port 80, and it's not Apache. Our boxes don't have lsof installed, so I can't query with that. I..

How do I implement onchange of <input type="text"> with jQuery?

<select> has this API. What about <input>?..