I would like to expand the question asked on this thread
Binding listbox to observablecollection
by giving it an ability to persistent the data. The structure is mostly the same except I installed E..
When i delete an item in a listbox, i get the error in the question as shown in the screenshot below:
I do not know where the inner exception is, but i tried try, catch but i got the same error in t..
I'm considering either a ListBox or a ListView for a WPF application. It seems either supports data binding and item templates. My application has a simple list of items that I intend to be able to ..
I have a throbber that is to appear when a user clicks a link.
The problem is is that that same link can be clicked and dragged to be rearranged. In this case, I wouldn't need the throbber to appear...
I'm using Windows 7 64-bit.
Is there a way to edit default dark theme in the Visual Studio Code? In %USERPROFILE%\.vscode folder there are only themes from the extensions, while in installation path ..
Say I've got this
imageList = [100,200,300,400,500];
Which gives me
[0]100 [1]200 etc.
Is there any way in JavaScript to return the index with the value?
I.e. I want the index for 200, I get ret..
With Java:
I have a byte[] that represents a file.
How do I write this to a file (ie. C:\myfile.pdf)
I know it's done with InputStream, but I can't seem to work it out...
What is the diffirence between the @id/ and @+id/?
In @+id/ the plus symbol + instructs to create a new resource name and add in to the R.java file but what about @id/? From the documentation of ..
Is it possible to get an object's class/type name at runtime using TypeScript?
class MyClass{}
var instance = new MyClass();
console.log(instance.????); // Should output "MyClass"
..
I'm comparing three Oracle schemas.
I want to get a list of all the functions and procedures used in each database. Is this possible via a query? (preferably including a flag as to whether they compi..
I have an ASP.NET MVC action that is returning a JSON object.
The JSON:
{status: "1", message:"", output:"<div class="c1"><div class="c2">User generated text, so can be anything</div&..
I need help from you, this is my sql query:
select count(SID)
from Test
where Date = '2012-12-10'
group by SID
this is my result:
|2|
|3|
|4|
|3|
and now I have to count the results from firs..
I'm trying to process result from $data = curl_exec($ch); instead of printing it on the screen. In order to achieve that I set the option CURLOPT_RETURNTRANSFER to true like this:
curl_setopt($ch, CU..
I have a resource that supports both GET and POST requests. Here a sample code for a sample resource:
@RequestMapping(value = "/books", method = RequestMethod.GET)
public ModelAndView listBooks(@Mode..
If I select a variable (not just any string) in my code, all other instances of that variable get a stroke (white outline) around them:
Is there a keyboard shortcut that will let me select all of t..
I'm programming an app that displays two media streams in the same view via one horizontal listView and one vertical listView. I'm currently working on implementing information into the bottom listVie..
I was calculating eigenvectors and eigenvalues of a matrix in NumPy and just wanted to check the results via assert(). This would throw a ValueError that I don't quite understand, since printing those..
Usually, I get this error:
(The "service name" service on Local Computer started and then stopped. Some services stop automatically if they are not in use by other service or programs) when there's so..
I'm wondering if there is an enum type in some standard Java class library that defines symbolic constants for all of the valid HTTP response codes. It should support conversion to/from the correspond..
I currently have a resultset returned and in one of the columns the string value may be null (i mean no values at all). I have a condition to implement like following
rs = st.executeQuery(selectS..
I have a video tag, that I dynamically change its source as I am letting the user to choose from a number of videos from the database. The problem is that when I change the src attribute the video doe..
I have the following two ways suggested to me.
window.location.href = '/Administration/Notes/Create?dsValue=a&selectAnswer=b';
$.get("/Administration/Notes/Create", { dsValue: dsValue, selectedA..
I know how to merge modification using vimdiff, but, assuming I just know that the entire file is good to keep or to throw away, how do I do that?
I don't want to open vimdiff for each of them, I ch..
Could someone explain to me in simple terms the easiest way to change the indentation behavior of Vim based on the file type? For instance, if I open a Python file it should indent with 2 spaces, but ..
With real examples and their use, can someone please help me understand:
When do we need a Func<T, ..> delegate?
When do we need an Action<T> delegate?
When do we need a Predicate<T>..
We recently had an issue with an Eclipse project for one of our team members. Tomcat was not deploying JARs of the application.
We eventually noticed the .classpath Eclipse file was not the same as ..
I'm trying to delete images stored in internal storage. I've come up with this so far:
File dir = getFilesDir();
File file = new File(dir, id+".jpg");
boolean deleted = file.delete();
And this is f..
I want the users of my application to be able to delete the DCIM folder (which is located on the SD card and contains subfolders).
Is this possible, if so how?..
I want to make an HTML div tag fade in and fade out.
I have some code that fades out, but when I fade in, the opacity of the div stays at 0.1 and doesn't increase.
<!DOCTYPE html PUBLIC "-//W3C/..
Is there a way in T-SQL to convert a TINYINT to VARCHAR with custom number formatting?
For instance, my TINYINT has a value of 3 and I want to convert it to a VARCH of 03, so that it always shows a 2 ..
Want to add or append elements to existing array
int[] series = {4,2};
now i want to update the series dynamically with new values i send..
like if i send 3 update series as int[] series = {4,2,3..
I've been recently asked to learn some MATLAB basics for a class.
What does make it so cool for researchers and people that works in university?
I saw it's cool to work with matrices and plotting thi..
I know that __call__ method in a class is triggered when the instance of a class is called. However, I have no idea when I can use this special method, because one can simply create a new method and p..
I am making a demo in which I am fetching data from the server after regular intervals of time using $interval Now I need to stop/cancel this.
How I can achieve this? If I need to restart the process..
I am trying to run this command in laravel 5.2 but it's not working.
php artisan make:auth
and prompts with these statements.
[InvalidArgumentException]
Command "make:auth" is not defined
Did..
I am following this link to create my first docker Image and it went successfully and now I am trying to push this Image into my docker repository from this link. But whenever I am trying to push this..
In Firefox only my video thumbnails are displaying mysterious 2-3 pixels of white space between the bottom of my image and its border (see below).
I've tried everything I can think of in Firebug with..
I'm writing a java project that has three different classes. This is what i have have so far. I'm just stuck on how do you call a method function from another class to another class. I have written 2 ..
I'd like to to some thing similar to javascripts
var foo = true;
foo && doSometing();
but this doesnt seem to work in php.
I'm trying to add a class to a label if a condition is me..
I'm trying to use pandas to manipulate a .csv file but I get this error:
pandas.parser.CParserError: Error tokenizing data. C error: Expected 2 fields in line 3, saw 12
I have tried to read the..
I google the error message getOutputStream() has already been called for this response
and many people said it is because of the space or newline after <% or %>, but in my code , there is no a s..
I've recently started learning ExtJS, and have trouble understanding how to handle Events. I have no experience of any previous versions of ExtJS.
From reading various manuals, guides and documentat..
What is the equivalent of Ctrl + K + F and Ctrl + K + D on Windows in Visual Studio for formatting, or "beautifying" code in the Visual Studio Code editor?..
I am using ActiveState Python 3 on Windows and wanted to connect to my MySQL database.
I heard that mysqldb was the module to use.
I can't find mysqldb for Python 3.
Is there a repository available w..
I have a dark blue page and when the image is loading (or missing) the ALT text is black and difficult to read (in FF).
Could I style it (with CSS) to be white?..
I thought by setting the first element to a null would clear the entire contents of a char array.
char my_custom_data[40] = "Hello!";
my_custom_data[0] = '\0';
However, this only sets the first ele..
Suppose I have the following directory structure.
D:\reports\january\
Inside january there are suppose two excel files say A.xls and B.xls. There are many places where it has been written about h..
I have a string with multiple commas, and the string replace method will only change the first one:
var mystring = "this,is,a,test"
mystring.replace(",","newchar", -1)
Result: "thisnewcharis,a,test..
I have a website of which I want to copy an HTML code from - how do I copy all the text in inspect element - so I don't get the website's HTML code, but the code that I have already changed so that I ..
String.Format does not work in TypeScript.
Error:
The property 'format' does not exist on value of type
'{ prototype: String; fromCharCode(...codes: number[]): string;
(value?: any): string; new..
Is it possible to run react-native application on an iOS device directly from the command line like we do on simulator with react-native run ios --simulator "iPhone 5s"?..
I want to disable the double-tap zoom functionality on specified elements in the browser (on touch devices), without disabling all the zoom functionality.
For example: One element can be tapped multi..
I'm using the Android Compatibility library to implement fragments and have extended the layout sample so that a fragment contains a button which fires off another fragment.
In the selection pane on ..
I have following setup, but when I put 1024 and replace all 512 with 1024, then eclipse won't start at all. How can I have more than 512M memory for my eclipse JVM?
-startup
plugins/org.eclipse.equin..
How to remove .html from the URL of a static page?
Also, I need to redirect any url with .html to the one without it. (i.e. www.example.com/page.html to www.example.com/page )...
Is it possible to have a Docker container access ports opened by the host? Concretely I have MongoDB and RabbitMQ running on the host and I'd like to run a process in a Docker container to listen to..
I'm busy on a function that gets settings from a DB, and suddenly, I ran into this error:
Fatal error: Call to a member function bind_param() on boolean in C:\xampp2\htdocs\application\classes\class...
My question is: Is it possible to get the azure active directory tenant id without using powershell command?
I found this two blogs and with this help, I'm already able to get the tenant ID and subsc..
I'm having an impossibly hard time finding out to get the actual DOMElement from a jquery selector. Sample Code:
<input type="checkbox" id="bob" />
var checkbox = $("#bob").click(function() ..
Right now I use
import datetime
print(datetime.datetime.now().strftime("%X"))
to display the current time as a string.
Problem is, my computer is running in Europe/Berlin time zone, and the offset ..
I have taken Problem #12 from Project Euler as a programming exercise and to compare my (surely not optimal) implementations in C, Python, Erlang and Haskell. In order to get some higher execution tim..
I would like to get an autocompletion feature in notebooks i.e. when I type something, a dropdown menu appears, with all the possible things I might type, without having to press the tab button. Is th..
When I render a page using the Django template renderer, I can pass in a dictionary variable containing various values to manipulate them in the page using {{ myVar }}.
Is there a way to access the s..
Does Python have a package/module management system, similar to how Ruby has rubygems where you can do gem install packagename?
On Installing Python Modules, I only see references to python setup.py ..
I am brand new to typescript, and I have two classes. In the parent class I have:
abstract class Component {
public deps: any = {};
public props: any = {};
public setProp(prop: string): any {
..
I want to get the overall total CPU usage for an application in C#. I've found many ways to dig into the properties of processes, but I only want the CPU usage of the processes, and the total CPU like..
I have an ASP.NET MVC4 application where I am implementing sessionTimeout like:
<configuration>
<system.web>
<sessionState timeout="2"></sessionState>
</system.web&..
Maybe it looks silly to ask this but I am confused. I referred to Configuring Log4j property but it doesn't seem to help.
I have written a simple web service HelloWorld. And while running it I am get..
What is the maximum length of a URL in apache? Where is it documented, and is it configurable?
I'm implementing an openid identity provider, and would like to know the limitations I'm up against. I k..
What is the best way to get the Max value from a LINQ query that may return no rows? If I just do
Dim x = (From y In context.MyTable _
Where y.MyField = value _
Select y.MyCounter)...
I know a little bit about TextWatcher but that fires on every character you enter. I want a listener that fires whenever the user finishes editing. Is it possible? Also in TextWatcher I get an instanc..
I have an app where the UITableView's separator inset is set to custom values - Right 0, Left 0. This works perfectly in iOS 7.x, however in iOS 8.0 I see that the separator inset is set to the defaul..
I'm really confused about the differences between big O, big Omega, and big Theta notation.
I understand that big O is the upper bound and big Omega is the lower bound, but what exactly does big ? (..
I installed MySQL on Microsoft Windows 8 Using a noinstall Zip Archive. But when i tested by executing the following commands on windows prompt, the above error showed up.
C:\> "C:\MySQL\bin\mysq..
Is there a way to create a parameter in a PowerShell function where you have to call it in order to have it considered?
An example given by commandlet (the bold being what I want to do):
Invoke-Comm..
I have a data.frame with column headers.
How can I get a specific row from the data.frame as a list (with the column headers as keys for the list)?
Specifically, my data.frame is
A B ..
How do I use $rootScope to store variables in a controller I want to later access in another controller? For example:
angular.module('myApp').controller('myCtrl', function($scope) {
var a = //somet..
I'm trying to set up a cron job as a sort of watchdog for a daemon that I've created. If the daemon errors out and fails, I want the cron job to periodically restart it... I'm not sure how possible th..
Is it possible to save text to a new text file using JavaScript/jQuery without using PHP? The text I'm trying to save may contain HTML entities, JS, HTML, CSS and PHP scripts that I don't want to esca..
There are concepts and implementations in Spring Security, such as the GrantedAuthority interface to get an authority to authorize/control an access.
I would like that to permissible operations, suc..
I am Visual Studio 2010 Professional user. But for a reason I need Visual Web Developer 2008 Express edition.
I downloaded this, but I need the serial key to activate the product, otherwise it will e..
In the Spring Boot Document, they said that 'Each SpringApplication will register a shutdown hook with the JVM to ensure that the ApplicationContext is closed gracefully on exit.'
When I click ctrl+c..
I'm getting a lot of 499 NGINX error codes. I see that this is a client side issue. It is not a problem with NGINX or my uWSGI stack. I note the correlation in uWSGI logs when a get a 499.
addres..
I am trying to delete from a few tables at once. I've done a bit of research, and came up with this
DELETE FROM `pets` p,
`pets_activities` pa
WHERE p.`order` > :order
AN..
I am trying to implement the SearchView from the support library. I want the user to be to use the SearchView to filter a List of movies in a RecyclerView.
I have followed a few tutorials so far and ..
My editor warns me when I compare my_var == None, but no warning when I use my_var is None.
I did a test in the Python shell and determined both are valid syntax, but my editor seems to be saying t..
When I attempted to connect to a local MySQL server during my test suite, it
fails with the error:
OperationalError: (2002, "Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)")..
This is probably a dumb question, but I can't find the answer in the docs. Did the "Done" button on the pop-up keyboard always cause the keyboard to disappear? I see a lot of code around the web like ..
I want to delete a branch both locally and remotely.
Failed Attempts to Delete a Remote Branch
$ git branch -d remotes/origin/bugfix
error: branch 'remotes/origin/bugfix' not found.
$ git branch -d o..
Why is the component in this simple plunk
@Component({
selector: 'my-app',
template: `<div>I'm {{message}} </div>`,
})
export class App {
message:string = 'loading :(';
ngAfterV..
I have a bash script that sets an environment variable an runs a command
LD_LIBRARY_PATH=my_path
sqsub -np $1 /homedir/anotherdir/executable
Now I want to use python instead of bash, because I want..
Using Jinja2, how do I format a date field? I know in Python I can simply do this:
print(car.date_of_manufacture.strftime('%Y-%m-%d'))
But how do I format the date in Jinja2?..
When I open cmd.exe in Windows, what encoding is it using?
How can I check which encoding it is currently using? Does it depend on my regional setting or are there any environment variables to check?..
Possible Duplicate:
How to detect system information like os or device type
I am new to android application development.
I developed one small application,and install that application .apk..
I have the following codes to create a graph using Chart.js v2.1.3:
var ctx = $('#gold_chart');
var goldChart = new Chart(ctx, {
type: 'line',
data: {
labels: dates,
datasets:..
By reading all the questions already asked in this forum related to the topic above (see title), I thoroughly understand that finally gets always called. (except from System.exit and infinite loops). ..
I've been working with Swift and iOS for a number of months now. I am familiar with many of the ways things are done but I'm not good enough that I can just write things up without looking. I've appre..
Is there a built-in method in Python to get an array of all a class' instance variables? For example, if I have this code:
class hi:
def __init__(self):
self.ii = "foo"
self.kk = "bar"
Is..
I need to display the name of the day given a date (like "05/23/2014") which I get from a 3rd party.
I've tried using Date, but I only get the date.
What is the correct way to get the name of the d..
I'd like to use a variable inside a regex, how can I do this in Python?
TEXTO = sys.argv[1]
if re.search(r"\b(?=\w)TEXTO\b(?!\w)", subject, re.IGNORECASE):
# Successful match
else:
# Match a..
I declared a enum type as this,
enum WeekEnum
{
Mon = 0;
Tue = 1;
Wed = 2;
Thu = 3;
Fri = 4;
Sat = 5;
Sun = 6;
};
How can I get the item name "Mon, Tue, etc" when I already have the item value "0, ..
<script language="javascript" type="text/javascript">
var scrt_var = 10;
</script>
HTML Part:
<html>
this is a <a href ="2.html & Key= scrt_var">Link </a>
</..
I wish to rewrite a mysql query which use month() and year() functions to display all the posts from a certain month which goes to my function as a 'Y-m-d' parameter format, but I don't know how can I..
When I played with <input type="range">, Firefox triggers an onchange event only if we drop the slider to a new position where Chrome and others triggers onchange events while the slider is drag..
Is it possible to convert two or more lists into one single list, in .NET using C#?
For example,
public static List<Product> GetAllProducts(int categoryId){ .... }
.
.
.
var productCollection..
How would I write the equivalent of C#'s String.StartsWith in JavaScript?
var haystack = 'hello world';
var needle = 'he';
haystack.startsWith(needle) == true
Note: This is an old question, and as..
I am using Maven in my standalone application, and I want to package all the dependencies in my JAR file inside a library folder, as mentioned in one of the answers here:
How can I create an executab..
It is a really simple thing but I cannot get my head around it. I have looked at plenty of StackOverFlow post and as well as on internet.
My goal is to create a .bat which will open cmd and execute m..
I have an anchor with both HREF and ONCLICK attributes set. If clicked and Javascript is enabled, I want it to only execute ONCLICK and ignore HREF. Likewise, if Javascript is disabled or unsupported,..
What I am trying to do is embed a website into mine. When you search something on their page their embed site redirects through their pages though it will still be on my web page. Any help will be app..
I have an array which might contain empty/null positions (e.g: array[2]=3, array[4]=empty/unassigned). I want to check in a loop whether the array position is null.
array[4]==NULL //this doesn't wor..
I need a formula to count the number of cells in a range that are between 10 and 10.000:
I have:
=COUNTIF(B2:B292,>10 AND <10.000)
But how do I put the comparison operators in without gett..
I can't seem to correct the error the console is talking about can anyone help me. My code is below. I created a web form that saves the data to local storage and displays it on screen then deletes al..
I want to draw several graphs and combine them into one figure. I will explain the problem in an example. Let's say that I want to draw two graphs with these points:
Graph #1 (X and Y are defining a ..
Possible Duplicate:
Select statement in SQLite recognizing row number
For example, SELECT * FROM table WHERE [row] BETWEEN x AND y
How can this be done? I've done some reading but haven't ..
I'm attempting to learn angular and I am struggling with a simple button click.
I followed an example which has an identical code to the one below.
The result I am looking for is for the button click..
Is it possible to declare a variable within a View? For example:
Declare @SomeVar varchar(8) = 'something'
gives me the syntax error:
Incorrect syntax near the keyword 'Declare'.
..
I want to compare two dates and check if the date has expired or not.
Here is the code I used :
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:ss:ii");
Date date1 = sdf.parse("20012-10-4..
I have to read an XML file from an URL
$map_url = "http://maps.google.com/maps/api/directions/xml?origin=".$merchant_address_url."&destination=".$customer_address_url."&sensor=false";
This ..
I'm using Qt4 and C++ for making some programs in computer graphics. I need to be able to print some variables in my console at run-time, not debugging, but cout doesn't seem to work even if I add the..
I am looking to use Java to get the MD5 checksum of a file. I was really surprised but I haven't been able to find anything that shows how to get the MD5 checksum of a file.
How is it done?..
A dashed line means that the relationship is strong, whereas a solid line means that the relationship is weak. On the following diagram how do we decide that the relationship between the Room and Clas..
the problem is that I upgraded to Windows 10 and now I'm installing my tools to programming and now that I installed the JDK 7 of Java, when I try to use in the cmd the command:
- "javac"
Th..
Is there anyway to loop through a table variable in T-SQL?
DECLARE @table1 TABLE ( col1 int )
INSERT into @table1 SELECT col1 FROM table2
I use cursors as well, but cursors seem less flexible tha..
Is there any way to make an expression for something like ng-class to be a conditional?
For example, I have tried the following:
<span ng-class="{test: 'obj.value1 == \'someothervalue\''}">tes..
I want to make a copy of an object, then after some logic, re-assign the original object the value of the copy.
example:
User userCopy = //make a copy
foreach(...)
{
user.Age = 1;
user.ID = -1;..
How do you grep and only return the matching line? i.e. The path/filename is omitted from the results.
In this case I want to look in all .bar files in the current directory, searching for the term F..
In my application's architecture I usually send the object or list of objects from the data access layer to the web layer via the service layer, in which these objects get transformed from a DAO objec..
I want to add a newline in a textarea. I tried with \n and <br/> tag but are not working. You can see above the HTML code. Can you help me to insert a newline in a textarea?
<textarea cols='6..
I have a folder, c:\websites\test, and it contains folders and files that were checked out from a repository that no longer exists. How do I get Subversion to stop tracking that folder and any of the ..
A very simple & quick question on Java libraries: is there a ready-made class that implements a Queue with a fixed maximum size - i.e. it always allows addition of elements, but it will silently r..
How do I trigger the onclick event of a marker on a Google Maps from outside the map?
I use version 3 of the API. I've seen many tutorials for version 2, but can't find this for version 3.
I have a ..
I have a file paylines.txt added inside the folder named TextFiles which resides inside the Resources folder of my iOS project in Xcode.
This is the code I use to access the file:
NSString* filePath..
How to get the size of an image in cv2 wrapper in Python OpenCV (numpy). Is there a correct way to do that other than numpy.shape(). How can I get it in these format dimensions: (width, height) list?..
I was trying to install Sencha Touch SDK tools 2.0.0 but could not run it properly. It created an entry in the $PATH variable.
Later I deleted the sencha sdk tools folder but didn't realize that the ..
Is there a way for UILabel to draw a border around itself? This is useful for me to debug the text placement and to see the placement and how big the label actually is...
I'm new to Python and I've been going through the Q&A on this site, for an answer to my question. However, I'm a beginner and I find it difficult to understand some of the solutions. I need a very..
I am working on a cross-platform React Native mobile app. I am writing console.log statements as I develop. I want to see these logging statements in Chrome while I'm running the Android app in the de..
I'm trying to deny users from accessing the site/includes folder by manipulating the URL.
I don't know if I have to deny everything and manually make individual exceptions to allow, if I can just den..
If I assign an integer value to change a certain text size of a TextView using java code, the value is interpreted as pixel (px).
Now does anyone know how to assign it in sp?..
In my Microsoft Surface project, I always get a lot of the following exceptions:
'MuReSe.vshost.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\msco..
According to the RFC:
10.5.3 502 Bad Gateway
The server, while acting as a gateway or proxy, received an invalid response from the upstream server it accessed in attempting to fulfill the re..
I am doing a real estate feed for a portal and it is telling me the max length of a string should be 20,000 bytes (20kb), but I have never run across this before.
How can I measure byte size of a var..
How do I write a loop in ruby so that I can execute a block of code on each file?
I'm new to ruby, and I've concluded that the way to do this is a do each loop.
The ruby file will be executed from a ..
Recently I started Angular 2 tutorial at https://angular.io/docs/ts/latest/tutorial/.
and left off with Angular 2 beta 8.
Now I resumed the tutorial and latest beta is beta 14.
If I simply do npm up..
I have a class with a private char str[256];
and for it I have an explicit constructor:
explicit myClass(const char *func)
{
strcpy(str,func);
}
I call it as:
myClass obj("example");
When I..
I have the following code to display a textbox in a HTML webpage.
<input type="text" id="userid" name="userid" value="Please enter the user ID" />
When the page displays, the text contains th..
I've got a basic HTML form from which I can grab a bit of information that I'm examining in Firebug.
My only issues is that I'm trying to base64 encode the file data before it's sent to the server whe..
I can't believe how long this has taken me but I can't seem to figure out how to extract a cell value from an HTML table as I iterate through the table with JavaScript. I am using the following to it..
In the current version of React Router (v3) I can accept a server response and use browserHistory.push to go to the appropriate response page. However, this isn't available in v4, and I'm not sure wha..
Previously, I asked How to get data received in Flask request because request.data was empty. The answer explained that request.data is the raw post body, but will be empty if form data is parsed. Ho..
I have inventory maintenance website up and running. currently the back end users are manually typing the item id on the system and using to search and do their work. I would like to automate the typi..
I am going through the code which uses Predicate in Java. I have never used Predicate. Can someone guide me to any tutorial or conceptual explanation of Predicate and its implementation in Java?..
I'm very new to R and am working on updating an R script to iterate through a series of .dbf tables created using ArcGIS and produce a series of graphs.
I have a directory, C:\Scratch, that will cont..
This may be a generic OOP question. I wanted to do a generic comparison between an interface and an abstract class on the basis of their usage.
When would one want to use an interface and when would..
I am new to Java, usually work with PHP.
I am trying to convert this string:
Mon Mar 14 16:02:37 GMT 2011
Into a Calendar Object so that I can easily pull the Year and Month like this:
String ..
Within node.js readFile() shows how to capture an error, however there is no comment for the readFileSync() function regarding error handling. As such, if I try to use readFileSync() when there is no ..
How can I use properly the Intent flag FLAG_ACTIVITY_NO_ANIMATION in AndroidManifest file? I supose my problem is trivial, but I can't find good example or solution to it.
<intent-filter>
..
I have a question regarding the usage of the Function.identity() method.
Imagine the following code:
Arrays.asList("a", "b", "c")
.stream()
.map(Function.identity()) // <- Thi..
Instead of going from a json string and using $.parseJSON, I need to take my object and store it in a variable as string representing json.
(A library I'm dealing with expects a malformed json type s..
I have data in a MySQL database. I am sending the user a URL to get their data out as a CSV file.
I have the e-mailing of the link, MySQL query, etc. covered.
How can I, when they click the link, ha..
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..
I have an array of timestamps in the format (HH:MM:SS.mmmmmm) and another array of floating point numbers, each corresponding to a value in the timestamp array.
Can I plot time on the x axis and the ..
How do I take multiple lists and put them as different columns in a python dataframe? I tried this solution but had some trouble.
Attempt 1:
Have three lists, and zip them together and use that res..
I want to run a script remotely. But the system doesn't recognize the path. It complains that "no such file or directory". Am I using it right?
ssh kev@server1 `./test/foo.sh`
..
I have installed postgresql on OSX. When I run psql, I get
$ psql
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix ..
I am dealing with several large txt file, each of them has about 8000000 lines. A short example of the lines are:
usedfor zipper fasten_coat
usedfor zipper fasten_jacket
usedfor zipper fasten_pant
us..
I'm using Websphere Portal 7.0 and creating a portlet with RAD 8.0. My portlet is trying to make a db2 connection to a remote server. I wrote a java program locally to do a basic JDBC connection to th..
I am sending a post request to a RESTFUL WCF service application. I am able to successfully send a POST request through Fiddler.
However when I do this through the jQuery Ajax method the function r..
I've seen several suggestions, that you can add hyperlink to WPF application through Hyperlink control.
Here's how I'm trying to use it in my code:
<Window
xmlns="http://schemas.microsof..
I am diving into Python and I have a question about foreach iteration. I am new to Python and I have some experience in C#. So I am wondering, if there is some equivalent function in Python for iterat..
This is what I did to round a double to 2 decimal places:
amount = roundTwoDecimals(amount);
public double roundTwoDecimals(double d) {
DecimalFormat twoDForm = new DecimalFormat("#.##");
re..
I am interested in knowing how to convert a pandas dataframe into a NumPy array.
dataframe:
import numpy as np
import pandas as pd
index = [1, 2, 3, 4, 5, 6, 7]
a = [np.nan, np.nan, np.nan, 0.1, 0...
This might be a really trivial question, but I've been writing Java programs at my school and I just found out that I can create websites with Java as well.
How can I do that? Any good books/tutori..
I was trying to investigate the project build error in the console output as follow:
:myapp:processDebugResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed..
Are there any professional Combobox controls (dropdown list with autosuggestion) based on the jQuery library?
It should be able to handle large datasets and have some skinning options. A multi-column..
I'm on Mac, working on Android development from the terminal. I have successfully created the HelloWorld project and now I'm trying to run it from the command line in the Android emulator. Which com..
I get the below error whenever I try to use makeStyles() with a component with lifecycle methods:
Invalid hook call. Hooks can only be called inside of the body of a function component. This could..
Im trying to learn comparator in java and I have found this great example online, my question is how would this code be changed so that the pet names are ordered by age and in descending order so that..
For some value of @nReservationID:
SELECT @phoneNumber=
CASE
WHEN ISNULL(rdg2.nPhoneNumber ,0) = 0 THEN ISNULL(rdg2.nMobileNumber, 0)
ELSE ISNULL(rdg2.nPhoneNumber ,0)
END
from tblRe..