I have a simple query:
select * from countries
with the following results:
country_name
------------
Albania
Andorra
Antigua
.....
I would like to return the results in one row, so like this:
A..
I know that in sql server we cannot use Group_concat function but here is one issue i have in which i need to Group_Concat my query.I google it found some logic but not able to correct it.My sql query..
I have a table and I'd like to pull one row per id with field values concatenated.
In my table, for example, I have this:
TM67 | 4 | 32556
TM67 | 9 | 98200
TM67 | 72 | 22300
TM99 | 2 | 23009
TM99..
Would it be possible to construct SQL to concatenate column values from
multiple rows?
The following is an example:
Table A
PID
A
B
C
Table B
PID SEQ Desc
A 1 Have
A 2 ..
I have 3 tables called:
Applications (id, name)
Resources (id, name)
ApplicationsResources (id, app_id, resource_id)
I want to show on a GUI a table of all resource names. In one cell in each row..
I'm trying to migrate a MySQL-based app over to Microsoft SQL Server 2005 (not by choice, but that's life).
In the original app, we used almost entirely ANSI-SQL compliant statements, with one signif..
I don't necessarily want to use UUIDs since they are fairly long.
The file just needs to be unique within its directory.
One thought which comes to mind is to use File.createTempFile(String prefix, ..
I would like to convert the values in a column of an existing data frame into row names. Is is possible to do this without exporting the data frame and then reimporting it with a row.names = call?
Fo..
I'm having this strange error, CURL ERROR: Recv failure: Connection reset by peer
This is how it happens, if I did not connect to the server and all of a sudden trying to connect to the server via CU..
I have a multithreaded app that has to read some data often, and occasionally that data is updated. Right now a mutex keeps access to that data safe, but it's expensive because I would like multiple t..
Lets say,
i want to import/upload excel file to mysql from PHP
My HTML is like below
<form enctype="multipart/form-data" method="post" role="form">
<div class="form-group">
&..
I'm trying to use scikit-learn's LabelEncoder to encode a pandas DataFrame of string labels. As the dataframe has many (50+) columns, I want to avoid creating a LabelEncoder object for each column; I'..
I am able to serialize an object into a file and then restore it again as is shown in the next code snippet. I would like to serialize the object into a string and store into a database instead. Can a..
Many posters have problems debugging their RewriteRule and RewriteCond statements within their .htaccess files. Most of these are using a shared hosting service and therefore don't have access to the..
I've already got a DatePicker which pops up when the user clicks on the EditText field
eReminderDate.setOnClickListener(new OnClickListener() {
@Override
public void onClick(..
I am using urllib to get a string of html from a website and need to put each word in the html document into a list.
Here is the code I have so far. I keep getting an error. I have also copied the er..
I have a very large javascript file I would like to load only if the user clicks on a certain button. I am using jQuery as my framework. Is there a built-in method or plugin that will help me do thi..
I'm trying to get a Spinner to load up with no selected value. Once the user selects a value it then takes them to another page.
This is proving to be a problem because at present, the page just loa..
I have made an app and it is my very first app so when I started coding, I left the package name as com.example.stuff and now when I try to upload to the play store it wont let me due to the package n..
I'm trying to run the sample "Hello World" from the LWJGL website
From this link: LWJGL "Getting Started"
I'm trying to do this via the command line, just so I understand the "behind the scenes" a b..
I want to create a varchar column in SQL that should contain N'guid' while guid is a generated GUID by .NET (Guid.NewGuid) - class System.Guid.
What is the length of the varchar I should expect from ..
Im a bit confused about how to download openjdk8 for windows.
If I go to http://openjdk.java.net/install/ then under JDK 8 there are only two sections: "Debian, Ubuntu, etc." and "Fedora, Oracle Linu..
I've been searching and I know the theoretic difference.
public - Any class/function may access the method/property.
protected - Only this class and any subclasses may access the method/property.
pr..
I tried kill -9 698 but the process did not die.
$ ps -ef | grep chromium
502 698 811 0 0:01.24 ?? 0:07.28 /Users/lucius/chromium/src/xcodebuild/Debug/Chromium.app/Contents/MacOS/Ch..
What is the equivalent c# keyword of super keyword (java).
My java code :
public class PrintImageLocations extends PDFStreamEngine
{
public PrintImageLocations() throws IOException
{
..
I was trying to run ReactJS inside my twitter bootstrap web app. I have some issues using styles.
Having this div:
...
<div class="ui-progressbar-value ui-widget-header ui-corner-left" styl..
I am new to SQL, and what I needed to do was to combine 2 .mdf databases into one. I did that using SQL Server 2008 Manager - Tasks > Import/Export tables.The tables and views were copied successfully..
How can I display a newline in JLabel?
For example, if I wanted:
Hello World!
blahblahblah
This is what I have right now:
JLabel l = new JLabel("Hello World!\nblahblahblah", SwingConstants..
Is it possible to copy a single file to multiple directories using the cp command ?
I tried the following , which did not work:
cp file1 /foo/ /bar/
cp file1 {/foo/,/bar}
I know it's possible us..
When I attempt to connect to a MySQL server from PHP, I see the following error:
Deprecated: The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /path..
I use the following command to push to my remote branch:
git push origin sandbox
If I say
git push origin
does that push changes in my other branches too, or does it only update my current branc..
I've recently installed node.js and I have no idea how to run applications. I installed node.js but couldn't find further instructions. What does one really need to do? I wanted to see if it was actua..
Is there a way to pass more data into a callback function in jQuery?
I have two functions and I want the callback to the $.post, for example, to pass in both the resulting data of the AJAX call, as w..
I have a network call to be executed. But before doing that I need to check whether the device have internet connectivity.
This is what i have done so far:
var connectivityResult = new Connectivit..
I'm refactoring an old site, and that maze is full of tables.
We're moving to HTML5 and I need to fix a table full of
<td align="center">
code.
I found a partial solution by creating a class..
I'm using Linq To XML
new XElement("Prefix", Prefix == null ? "" : Prefix)
but I want to do some computation to the prefix before adding it to the xml, like eliminating spaces, special chars, some ..
This is my view, and I wish to change layout_width to "10dip". How do I do so programmatically?
Note, this is not a LinearLayout, it's a View.
<View
android:id="@+id/nutrition_bar_filled"
..
Since Python does not provide left/right versions of its comparison operators, how does it decide which function to call?
class A(object):
def __eq__(self, other):
print "A __eq__ cal..
I am trying to find some examples but no luck. Does anyone know of some examples on the net? I would like to know what it returns when it can't find, and how to specify from start to end, which I gues..
I have a function that parses a file into a list. I'm trying to return that list so I can use it in other functions.
def splitNet():
network = []
for line in open("/home/tom/Dropbox/CN/Pytho..
I have a shell script that calls file.sql
I am looking for a way to pass some parameters to my file.sql.
If I don't pass a variable with some value to the sql script, I will have to create multiple ..
I'm trying to get the contents of a directory using shell script.
My script is:
for entry in `ls $search_dir`; do
echo $entry
done
where $search_dir is a relative path. However, $search_dir co..
I'm writing an SQL Query, where a few of the columns returned need to be calculated depending on quite a lot of conditions.
I'm currently using nested case statements, but its getting messy. Is there..
My question is simple: I have a python script that generates figures using matplotlib. Every time i run it it generates new windows with figures. How can I have the script close windows that were open..
I've made a migration that added a new table and want to revert it and delete the migration, without creating a new migration.
How do I do it? Is there a command to revert last migration and then I c..
While trying to start Apache using XAMPP, I was receiving - "Attempting to start Apache service..." message in XAMPP UI. No further details were available.
Where can I see the logs (I was running XA..
I am a registered iOS developer and a developer friend of mine is trying to send me a testflight version.
For some reason he can't sent me an invitation - I believe this is because I am registered as..
I am learning how to create UI elements. I have created a few EditText input fields. On the click of a Button I want to capture the content typed into that input field.
<EditText android:id="@+id/..
Is there any way to add a Facebook Share Button to a static HTML page? I've implemented a simple web site with no server side, just a bunch of html pages and I was abble to add a Like button because i..
Using angular-cli with the ng serve command, how can I specify a default port so I do not need to manually pass the --port flag every time?
I'd like to change from the default port 4200...
I have been assigned a task to develop a new web application. Its a kind of social web applications, for the sake of understanding you can say its similar to facebook. Now before start developing such..
I have a collection of MyClass that I'd like to query using LINQ to get distinct values, and get back a Dictionary<string, string> as the result, but I can't figure out how I can do it any simpler ..
I have a URL "http://localhost:8888/api/rest/abc" which will give following json data. I wants to get this data in my UI using Jquery or java script. I'm trying this from couple of hours but I'm unabl..
I have 3 columns which I want to order in different ways on desktop and mobile.
Currently, my gird looks like this:
_x000D_
_x000D_
<div class="row">_x000D_
<div class="col-xs-3 col-md-6"&..
I want to modify the Windows PATH variable using setx. The following works at least 50% of the time on Windows 8:
setx PATH %PATH%;C:\Python27\;C:\Python27\Scripts\
If it gives the error "the defau..
How can the cursor be focus on a specific input box on page load?
Is it posible to retain initial text value as well and place cursor at end of input?
<input type="text" size="25" id="myinputbox..
Ok, so you know what a spreadsheet looks like when you open a new on in Excel; the borders are a light blue. These are only on the screen though, if you print the sheet it will not have borders. Say y..
When I make an SSL connection with some IRC servers (but not others - presumably due to the server's preferred encryption method) I get the following exception:
Caused by: java.lang.RuntimeException:..
I've been doing web development with Angular2 and have been using both Angular2 and Firebase to run local servers. I haven't been able to find a command similar to typing quit when using Ionic to crea..
XAMPP won't work it says
Port 80 in use by "Unable to open process" with PID 4!
6:32:24 PM [Apache] Apache WILL NOT start without the configured ports free!
6:32:24 PM [Apache] You need to u..
Imagine a common scenario, this is a simpler version of what I'm coming across. I actually have a couple of layers of further nesting on mine....
But this is the scenario
Theme contains List
Catego..
Suppose you are using routes:
// bootstrap
myApp.config(['$routeProvider', '$locationProvider', function ($routeProvider, $locationProvider) {
$routeProvider.when('/home', {
templateUrl:..
I need to calculate the difference of a column between two lines of a table. Is there any way I can do this directly in SQL? I'm using Microsoft SQL Server 2008.
I'm looking for something like this:
..
I'm practicing the code from 'Web Scraping with Python', and I keep having this certificate problem:
from urllib.request import urlopen
from bs4 import BeautifulSoup
import re
pages = set()
def ge..
Reading the limited documentation that Google has provided, I get the feeling that it is possible to change the look (drawable) of a ProgressBar/ProgressDialog by simply creating a new style an assign..
I already added a custom domain to my Heroku app and it works with www.domain.com.
I need to know how to set up the domain without www to resolve to the app, too.
Here are my current DNS settings:
..
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..
My program opens a socket with this function:
sockfd = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP)
After finish sending data the socket is closed:
close(sockfd);
But the issue is when the pr..
I'm trying to figure out the best way to get everything before the - character in a string. Some example strings are below. The length of the string before - varies and can be any length
223232-1.j..
I'm currently working on a data set which is formatted as a table, with headers. What I need to do is cycle through all cells in a specific column and change the contents. Through research on MSDN I..
I have a MySQL installed on my linux server, I forgot it's password so I went and changed it using the methods I found on the web. What I did was as follows:
/etc/init.d/mysql stop
mysqld_safe --skip..
I just finished an app on iOS 6 and bought a developer account a week ago so haven't had much time playing with the iOS 7 SDK. Just downloaded the Golden Master version and trying to upgrade my app to..
Given a list of files in files.txt, I can get a list of their sizes like this:
cat files.txt | xargs ls -l | cut -c 23-30
which produces something like this:
151552
319488
1536000
225280
..
One of my applications hangs under some period of running under load, does anyone know what could cause such output in jstack:
"scheduler-5" prio=10 tid=0x00007f49481d0000 nid=0x2061 waiting on condi..
If I've been told a table (or proc) name, but not which connected database the object is located in, is there any simple script to search for it? Maybe search somewhere in the System Databases? (I'm..
I understand that:
atan2(vector.y, vector.x) = the angle between the vector and the X axis.
But I wanted to know how to get the angle between two vectors using atan2. So I came across this solution:..
I've read a lot about Node.js being fast and able to accommodate large amounts of load. Does anyone have any real-world evidence of this vs other frameworks, particularly .Net? Most of the articles I'..
I'm trying to present a view controller modally, with a transparent background. My goal is to let both the presenting and presented view controllers's view to be displayed at the same time. The proble..
I am trying to toggle the class of an element using ng-class
<button class="btn">
<i ng-class="{(isAutoScroll()) ? 'icon-autoscroll' : 'icon-autoscroll-disabled'}"></i>
</butto..
How do we set a custom port for test server?
Normally when we do
php artisan serve
the folder gets served as :
localhost:8000
How do could we access one folder as:
localhost:8080
I want to ..
I'm trying to base64 encode an image in a shell script and put it into variable:
test="$(printf DSC_0251.JPG | base64)"
echo $test
RFNDXzAyNTEuSlBH
I've also tried something like this:
test=\`echo..
I've got an RSA private key in PEM format, is there a straight forward way to read that from .NET and instantiate an RSACryptoServiceProvider to decrypt data encrypted with the corresponding public ke..
Is there a truncate modifier for the blade templates in Laravel, pretty much like Smarty?
I know I could just write out the actual php in the template but i'm looking for something a little nicer to ..
I am using XAMPP, version 3.2.1. I just installed it on Windows 8. Every time I need to go to the XAMPP Control Panel to start services (MySQL, Apache,...); in Windows 7 it started automatic..
Here is what I want, inside the BACKUPDIR, I want to execute cscript /nologo c:\deletefile.vbs %BACKUPDIR% until number of files inside the folder is greater than 21(countfiles holds it).
Here is my c..
I'm trying to get the number of rows of dataframe df with Pandas, and here is my code.
Method 1:
total_rows = df.count
print total_rows + 1
Method 2:
total_rows = df['First_columnn_label'].count
prin..
Caution: This question is over nine years old!
Your best option is to search for newer questions, or to search the answers below looking for your specific version of MVC, as many answers here are ob..
In Java, you can define multiple top level classes in a single file, providing that at most one of these is public (see JLS §7.6). See below for example.
Is there a tidy name for this technique (a..
So I have a list:
['x', 3, 'b']
And I want the output to be:
[x, 3, b]
How can I do this in python?
If I do str(['x', 3, 'b']), I get one with quotes, but I don't want quotes...
I have an application that uses the Google Maps Android v2 API. I've added the google-play-services_lib library project to my workspace and added a reference to it from my application project, followi..
Question
What is the best practice for creating a favicon on a web site?
and is an .ico file with both 16x16 and 32x32 images better than a .png file with 16x16 only?
Could the right method preferre..
The Mutex class is very misunderstood, and Global mutexes even more so.
What is good, safe pattern to use when creating Global mutexes?
One that will work
Regardless of the locale my machine is in..
Is there any built-in method in Java which allows us to convert comma separated String to some container (e.g array, List or Vector)? Or do I need to write custom code for that?
String commaSeparated ..
I am trying to read a simple text file in my sample Android Application. I am using the below written code for reading the simple text file.
InputStream inputStream = openFileInput("test.txt");
Input..
I have two ArrayLists.
ArrayList A contains:
['2009-05-18','2009-05-19','2009-05-21']
ArrayList B contains:
['2009-05-18','2009-05-18','2009-05-19','2009-05-19','2009-05-20','2009-05-21','2009-05..
After calling mysql_select_db to grab a database, is there any way to later output the name of the database that is currently selected? This seems very basic but I couldn't find anything on php.net or..
I would like to select a row with maximum value in each group with dplyr.
Firstly I generate some random data to show my question
set.seed(1)
df <- expand.grid(list(A = 1:5, B = 1:5, C = 1:5))
df..
From post:
Sending a JSON array to be received as a Dictionary<string,string>
I’m trying to do this same thing as that post. The only issue is that I don’t know what the keys and the value..
Once again, I have a problem with my apache virtual host configuration. (The default configuration is used instead of my specific one).
The problem is not really the misconfiguration but how to solve..
With PCRE, how can you construct an expression that will only match if a string is not found.
If I were using grep (which I'm not) I would want the -v option.
A more concrete example: I want my r..
I have lot of items on the screen and I need to use the scrollbar so the user can scroll down. However, the scroll is either not visible or it's not working. How is it possible to add a scrollbar to a..
When scripting in bash or any other shell in *NIX, while running a command that will take more than a few seconds, a progress bar is needed.
For example, copying a big file, opening a big tar file.
..
I have a one-dimensional array of integer in JavaScript that I'd like to add data from comma separated string, Is there a simple way to do this?
e.g : var strVale = "130,235,342,124 ";..
I have a simple select option form field in my Angular material project:
component.html
<mat-form-field>
<mat-select [(value)]="modeSelect" placeholder="Mode">
<mat-option..
As far as I can see there are 3 ways to use booleans in c
with the bool type, from then using true and false
defining using preprocessor #define FALSE 0 ... #define TRUE !(FALSE)
Just to use consta..
I have a map where I'd like to perform a call on every data type object member function. I yet know how to do this on any sequence but, is it possible to do it on an associative container?
The closes..
I'm trying to summarize my knowledge about the most popular JavaScript package managers, bundlers, and task runners. Please correct me if I'm wrong:
npm & bower are package managers. They just d..
When using git at the command line, I am wondering if it is possible to use Visual Studio Code as the default editor, i.e. when creating commit comments, and looking at a diff of a file from the comma..
Trying to use the new RecyclerView from the support library. I downloaded the 20 update for the support library using the SDK manager.
I've added the jar file to the libs folder - and added to build ..
I've setup wamp server on window. Then, I use MySQL root password by cmd. As a result, when I access phpMyAdmin site, Access denied appeared (Default user for phpMyAdmin is root and password is blank/..
I'm converting something from VB into C#. Having a problem with the syntax of this statement:
if ((searchResult.Properties["user"].Count > 0))
{
profile.User = System.Text.Encoding.UTF8.GetStr..
How can I find the number of arguments of a Python function? I need to know how many normal arguments it has and how many named arguments.
Example:
def someMethod(self, arg1, kwarg1=None):
pass
..
I'm getting this error when trying to set the global config:
$ git config --global user.name "Your Name Here"
error: could not lock config file /pathto/file/.gitconfig: No such file or directory
an..
In SQL Server this inserts 100 records, from the Customers table into tmpFerdeen :-
SELECT top(100)*
INTO tmpFerdeen
FROM Customers
Is it possible to do a SELECT INTO across a UNION ALL SELECT :-
..
I want to scrape all the data of a page implemented by a infinite scroll. The following python code works.
for i in range(100):
driver.execute_script("window.scrollTo(0, document.body.scrollHeigh..
I am reading a text file with floating point numbers, all with either 1 or 2 decimal points. I am using float() to convert a line into a float, and raising a ValueError if that fails. I am storing all..
I want to parse my XML document. So I have stored my XML document as below
class XMLdocs(db.Expando):
id = db.IntegerProperty()
name=db.StringProperty()
content=db.BlobProperty()
..
I have a JavaScript array dataArray which I want to push into a new array newArray. Except I don't want newArray[0] to be dataArray. I want to push in all the items into the new array:
var newArray =..
What would be the best way to wait for user input in console application?
std::cout << "press any key to exit...";
// wait for user to hit enter or another key
..
The usual answer to this question is to turn formulas to automatic. This, in my case, is not working.
The second usual answer is that there is some macro that is affecting the Excel settings. This..
Actually the apache-tomcat 7 server running at The Eclipse.but in browser getting error "The requested resource is not available." .Any reasons Please..?..
I am using jQuery Fancybox for a popup registration form here
I would like the form to come up at the size of 450px by 700px but no matter what I set the height and width at I get scrollbars:
<sc..
Possible Duplicate:
How to put a List in intent
I want to pass a List from one activity to another. So far I have not been successful. This is my code.
//desserts.java
private List<..
I am running the following code-
import json
addrsfile =
open("C:\\Users\file.json",
"r")
addrJson = json.loads(addrsfile.read())
addrsfile.close()
if addrJson:
print("yes")
But giving me fo..
I am very new to ReactJS (as in, just started today). I don't quite understand how setState works. I am combining React and Easel JS to draw a grid based on user input. Here is my JS bin:
http://js..
I have the following HTML:
<form name="frmSave">...</form>
Just to know, I am not able to modify the HTML in order to add an id or something else.
This is what I tried to get the form ..
I have used ProgressBar Control in my c# desktop application.I have used it in a thread other then the thread in which control has been declared.Its working Fine.
Now I am wondering how i can show som..
I having trouble passing a function as a parameter to another function. This is my code:
ga.py:
def display_pageviews(hostname):
pageviews_results = get_pageviews_query(service, hostname).execut..
I'm going to upgrade react-native but before I do, I need to know which version I'm upgrading from to see if there are any special notes about upgrading from my version.
How do I find the version of..
I need to check whether a string contains another string or not?
var str1 = "ABCDEFGHIJKLMNOP";
var str2 = "DEFG";
Which function do I use to find out if str1 contains str2?..
In C, I did not notice any effect of the extern keyword used before function declaration.
At first, I thought that when defining extern int f(); in a single file forces you to implement it outside of ..
I am so frustrated right now after several hours trying to find where shared_ptr is located. None of the examples I see show complete code to include the headers for shared_ptr (and working). Simply s..
I need to escape all quotes (') in a string, so it becomes \'
I've tried using replaceAll, but it doesn't do anything. For some reason I can't get the regex to work.
I'm trying with
String s = "You..
In Qt I'm trying to set a QTimer that calls a function called "update" every second. Here is my .cpp file:
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QTimer>
#include "QDebug"..
I was thrilled to see the new System.Collections.Concurrent namespace in .Net 4.0, quite nice! I've seen ConcurrentDictionary, ConcurrentQueue, ConcurrentStack, ConcurrentBag and BlockingCollection.
..
I plan on buying two domain names for the same site. Depending on which domain is used I plan on providing slightly different data on the page. Is there a way for me to detect the actual domain name..
Sorry if this is pretty noobish, but I'm pretty new to C++. I'm trying to open a file and read it using ifstream:
vector<string> load_f(string file) {
vector<string> text;
ifstream i..
I am just getting started to learn about Web Apps and deploying them to Tomcat. So I started with a sample web app project - made up of struts, hibernate, etc., etc.
The ANT build was successful. Also..
In the code below removeSelectedCountry() should be called when a span element is clicked and handleKeyDown($event) should be called when there is a keydown event on a div.
@Component({
selector:..
I am new in R and I am trying to do something really simple. I had load a txt file with four columns and now I want to get the minimum value of the second column.
This is the code that I have:
## Ch..
I have this dll that I created a long time ago and use to connect to the db of a specific software that I develop for. I have had no issues for well over 4 years and countless applications with this d..
I'm seeing this. It's not a mystery what it is complaining about:
Warning: validateDOMnesting(...): <div> cannot appear as a descendant of <p>. See ... SomeComponent > p > ... > ..
This might sound like too basic of a question, but I have searched for answers and I am more confused now than before.
What does "ours" and "theirs" mean in git when merging my branch into my other b..
I've found some interesting behaviour in PowerShell Arrays, namely, if I declare an array as:
$array = @()
And then try to add items to it using the $array.Add("item") method, I receive the followi..
I am creating custom Wordpress theme using a starter theme _Underscores. I am also using Bootstrap as a front-end framework.
I would like to modify wp_nav_menu so that it assigns current menu item cl..
I'm getting this error...
The semaphore timeout period has expired.
On this line...
ThePorts.ActivePort1.Open();
...but I only get it from time to time. When it happens, it happens over an..
I have a REST web service that currently exposes this URL:
http://server/data/media
where users can POST the following JSON:
{
"Name": "Test",
"Latitude": 12.59817,
"Longitude": 52.1287..
I have a custom error page set up for my application:
<customErrors mode="On" defaultRedirect="~/errors/GeneralError.aspx"
/>
In Global.asax, Application_Error(), the following code works to ..
I'm working on my first PowerShell script and can't figure the loop out.
I have the following, which will repeat $ActiveCampaigns number of times:
Write-Host "Creating $PQCampaign1 Pre-Qualified Rep..
I have an app where the user can choose an image either from the built-in app images or from the iphone photo library. I use an object Occasion that has an NSString property to save the imagePath.
N..
I'm trying to check in jQuery if a div contains some text, and then add a class if it does.
So I wrote something like this:
if( $("#field > div.field-item").text().indexOf('someText') = 0) {
..
I am new to working with JSON data.
I am reading data from a web service. The query data sent back is the following:
[["B02001_001E","NAME","state"],
["4712651","Alabama","01"],
["691189","Alaska"..
In developer console error reports sometimes I see reports with NPE issue. I do not understand what is wrong with my code. On emulator and my device application works good without forcecloses, howeve..
What explains the difference in behavior of boolean and bitwise operations on lists vs NumPy arrays?
I'm confused about the appropriate use of & vs and in Python, illustrated in the following ex..
I am trying to query a name (Daniel O'Neal) in column names tblStudents in an Access database, however Access reports a syntax error with the statement:
Select * from tblStudents where name like 'Dani..
I am trying to send data from multiple checkboxes (id[]) and create an array "info" in php to allow me to run a script for each value (however the quantity of values may change each time) however firs..
I am doing a ranking type thing, what happens is I compare the score to the current score and if the score is lower then the current then the player has got a high score, but when using this code here..
I've been searching around this morning and I'm not finding any simple solutions... basically, I want to capture a change in an input element, but also know the previous value.
Here's a change event..
I'm trying to perform some offline maintenance (dev database restore from live backup) on my dev database, but the 'Take Offline' command via SQL Server Management Studio is performing extremely slowl..
How to set thousands separator in Java?
I have String representation of a BigDecimal that I want to format with a thousands separator and return as String...
How do I pass a value from a child back to the parent form? I have a string that I would like to pass back to the parent.
I launched the child using:
FormOptions formOptions = new FormOptions();
for..
This command lists directories in the current path: ls -d */
What exactly does the pattern */ do?
And how can we give the absolute path in the above command (e.g. ls -d /home/alice/Documents) for li..
In the Oracle, I copy data from a backup to a new table, it doesn't work.
what is the correct syntax ?
Thanks
select CODE, MESSAGE into EXCEPTION_CODES (CODE, MESSAGE)
from Exception_code_tmp
th..
What is the advantage of using uint8_t over unsigned char in C?
I know that on almost every system uint8_t is just a typedef for unsigned char,
so why use it?..
I have an array of structs that I created somewhere in my program.
Later, I want to iterate through that, but I don't have the size of the array.
How can I iterate through the elements? Or do I need..
I downloaded and extracted Crypto++ in C:\cryptopp. I used Visual Studio Express 2012 to build all the projects inside (as instructed in readme), and everything was built successfully. Then I made a t..
I need to make a conditional that is true if a particular matching text is found at least once in a string of text, e.g.:
str = "This is some text containing the word tiger."
if string.match(str, "ti..
I have this sql:
ALTER TABLE dbo.ChannelPlayerSkins
DROP CONSTRAINT FK_ChannelPlayerSkins_Channels
but apparently, on some other databases we use, the constraint has a different name. How do I ..
I'm a C programmer trying to understand C++. Many tutorials demonstrate object instantiation using a snippet such as:
Dog* sparky = new Dog();
which implies that later on you'll do:
delete sparky..
I have a nested list of data. Its length is 132 and each item is a list of length 20. Is there a quick way to convert this structure into a data frame that has 132 rows and 20 columns of data?
Here is..
I'm building a simple helper script for work that will copy a couple of template files in our code base to the current directory. I don't, however, have the absolute path to the directory where the te..
I am trying to add a message in my jsp after the process is done by hitting the submit button.
function onSubmit() {
alert("Master_Data.xlsx and Consistency_Check_Data.xlsx are located under d:/stage..
In a multi-GPU computer, how do I designate which GPU a CUDA job should run on?
As an example, when installing CUDA, I opted to install the NVIDIA_CUDA-<#.#>_Samples then ran several instance..
I am currently learning Python so I have no idea what is going on.
num1 = int(input("What is your first number? "))
num2 = int(input("What is your second number? "))
num3 = int(input("What is your t..
I used to love .NET Reflector back in the day, but ever since Red Gate Software took over it has gone downhill dramatically. Now it forces me to update (which is absolutely ridiculous), half the time ..
How can I use the svn export command to get a single file from the repository?
I've tried this:
svn export e:\repositories\process\test.txt c:\
But I get this error:
svn: e:\repositories\proce..
I'm new to Python, and confused by the date/time documentation. I want to compute the time that it takes to perform a computation.
In java, I would write:
long timeBefore = System.currentTimeMillis..
Suppose I have a pandas data frame df:
I want to calculate the column wise mean of a data frame.
This is easy:
df.apply(average)
then the column wise range max(col) - min(col). This is easy ag..
I just cannot commit with git on Ubuntu 14.04
Error message is:
git: fatal unable to auto-detect email address (got "some wrong email")
I tried git-config with and without the --global option s..
I used the usual:
yum install git
It did not install the latest version of git on my CentOS 6. How can I update to the latest version of git for CentOS 6? The solution can be applicable to newer v..
I have ps1 script to grab some information from the vmware cluster environment.
In some place of ps1 script requires the ENTER button keystroke.
So, How to do that ?
-Thanks..
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..