Questions Tagged with #Rsaprotectedconfiguration

Copy Data from a table in one Database to another separate database

Basically I have a two databases on SQL Server 2005. I want to take the table data from one database and copy it to another database's table. I tried this: SELECT * INTO dbo.DB1.TempTable FROM dbo...

Error: Selection does not contain a main type

I am trying to run some java files in a new project. So I make the project, put the files in it and I try to run the main file so my game starts. I get an error that says selection does not contain ..

How can I pull from remote Git repository and override the changes in my local repository?

I need to throw away all the changes in my local repository and pull all the code from the remote repository. What is the Git command to do this?..

TNS Protocol adapter error while starting Oracle SQL*Plus

Whenever I try to login into SQL*Plus (11g Standar Edition Win 64) I get an error related to some connection error. I try to login as sys as sysdba and provide the password. All the services are st..

Disable button in WPF?

I have a Button and a TextBox in my WPF app. How can I make the Button not enabled until the user enters some text in the TextBox?..

How to call a parent method from child class in javascript?

I've spent the last couple of hours trying to find a solution to my problem but it seems to be hopeless. Basically I need to know how to call a parent method from a child class. All the stuff that I'..

How do I add an element to array in reducer of React native redux?

How do I add elements in my array arr[] of redux state in reducer? I am doing this- import {ADD_ITEM} from '../Actions/UserActions' const initialUserState = { arr:[] } export default function u..

How to fix "unable to open stdio.h in Turbo C" error?

Whenever I compile my program, I get the error above. ..

ERROR 1396 (HY000): Operation CREATE USER failed for 'jack'@'localhost'

I seem to be unable to re-create a simple user I've deleted, even as root in MySQL. My case: user 'jack' existed before, but I deleted it from mysql.user in order to recreate it. I see no vestiges of..

Fixed header table with horizontal scrollbar and vertical scrollbar on

I have been trying to figure out this problem i have with html/css sticky header + scrollbars. We are creating a program that requires scrollbars to show up once the containersize reaches a certain po..

How do I implement __getattribute__ without an infinite recursion error?

I want to override access to one variable in a class, but return all others normally. How do I accomplish this with __getattribute__? I tried the following (which should also illustrate what I'm try..

What, why or when it is better to choose cshtml vs aspx?

I would like to know what, why or when it is better to choose cshtml and what, why or when it is better to choose aspx technologies? What are these two technologies intended for? Thank you,..

How to run multiple DOS commands in parallel?

How to run multiple dos commands? I have a for loop, which runs detection of server to detect which server works and is fast. And because there is more servers, I wish not to run all server detection..

Resizing an image in an HTML5 canvas

I'm trying to create a thumbnail image on the client side using javascript and a canvas element, but when I shrink the image down, it looks terrible. It looks as if it was downsized in photoshop with..

How to evaluate a boolean variable in an if block in bash?

I have defined the following variable: myVar=true now I'd like to run something along the lines of this: if [ myVar ] then echo "true" else echo "false" fi The above code does work, but ..

How to enable MySQL Query Log?

How do I enable the MySQL function that logs each SQL query statement received from clients and the time that query statement has submitted? Can I do that in phpmyadmin or NaviCat? How do I analyse th..

Time complexity of nested for-loop

I need to calculate the time complexity of the following code: for (i = 1; i <= n; i++) { for(j = 1; j <= i; j++) { // Some code } } Is it O(n^2)?..

Iterating over arrays in Python 3

I haven't been coding for awhile and trying to get back into Python. I'm trying to write a simple program that sums an array by adding each array element value to a sum. This is what I have: def sumA..

Sort objects in ArrayList by date?

Every example I find is about doing this alphabetically, while I need my elements sorted by date. My ArrayList contains objects on which one of the datamembers is a DateTime object. On DateTime I can..

How to upgrade PostgreSQL from version 9.6 to version 10.1 without losing data?

I'm using the PostgreSQL database for my Ruby on Rails application (on Mac OS X 10.9). Are there any detailed instructions on how to upgrade PostgreSQL database? I'm afraid I will destroy the data i..

How to get arguments with flags in Bash

I know that I can easily get positioned parameters like this in bash: $0 or $1 I want to be able to use flag options like this to specify for what each parameter is used: mysql -u user -h host Wh..

jQuery: Load Modal Dialog Contents via Ajax

Currently my Modal Dialog is like this <html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <sc..

Specify the date format in XMLGregorianCalendar

I want to use a Date in XMLGregorianCalendar format for sending to a web service. The web service expects information in yyyy-dd-mm format. I use the below code to create an XMLGregorianCalendar and s..

OS X Sprite Kit Game Optimal Default Window Size

I am looking to port an iOS Sprite Kit game to OS X. I'd like to provide the sharpest image quality possible. Since iOS device support only a handful of resolutions and I believe 3 aspect ratios this ..

I need to get all the cookies from the browser

I need to get all the cookies stored in my browser using JavaScript. How can it be done? ..

How to know elastic search installed version from kibana?

Currently I am getting these alerts: Upgrade Required Your version of Elasticsearch is too old. Kibana requires Elasticsearch 0.90.9 or above. Can someone tell me if there is a way I can find ..

Regular Expression to get all characters before "-"

How can I get the string before the character "-" using regular expressions? For example, I have "text-1" and I want to return "text"...

How to create a new column in a select query

In MS Access, I want to insert a new column into the returned result of a select query. The new column has the same value for every row. For example, my select returns columns A, B and I want C to be ..

autocomplete ='off' is not working when the input type is password and make the input field above it to enable autocomplete

I have an form with autocomplete disabled but it does not works and makes the autocomplete to be enabled in firefox and higher version of chrome <form method="post" autocomplete="off" action="">..

Python Prime number checker

I have been trying to write a program that will take an inputed number, and check and see if it is a prime number. The code that I have made so far works perfectly if the number is in fact a prime nu..

How to kill a child process by the parent process?

I create a child process using a fork(). How can the parent process kill the child process if the child process cannot complete its execution within 30 seconds? I want to allow the child process to ex..

JPA Criteria API - How to add JOIN clause (as general sentence as possible)

I am trying to construct queries dynamically, and my next target is add JOIN clauses (I don't know how can I use the API). By now, for example, this code work for me : ... Class baseClass; ... Cr..

Postfix is installed but how do I test it?

I tried everything, I read online to test, and I can't get email to go out: telnet <IP> 25 EHLO MAIL FROM: <from-email> RCPT TO: <recipient-email> DATA Type message here. . <Enter..

What is SOA "in plain english"?

Can someone explain in plain english what is SOA all about? I hear SOA here, SOA there but I cannot understand exacly what it is and what is used for. Was it some simple concept and later evolved into..

How to SELECT by MAX(date)?

This is the table structure: CREATE TABLE `reports` ( `report_id` int(11) NOT NULL auto_increment, `computer_id` int(11) NOT NULL default '0', `date_entered` datetime NOT NULL default '1970-01-0..

Maximum value for long integer

How can I assign the maximum value for a long integer to a variable, similar, for example, to C++'s LONG_MAX...

resource error in android studio after update: No Resource Found

After a recent update to Android Studio, we're having problems getting a project to compile that previously worked. At first we were getting the following error: /Users/james/Development/AndroidProje..

How to parse float with two decimal places in javascript?

I have the following code. I would like to have it such that if price_result equals an integer, let's say 10, then I would like to add two decimal places. So 10 would be 10.00. Or if it equals 10.6 wo..

How to solve error: "Clock skew detected"?

I am uploading my OpenCL and Cuda code to hgpu.org because I don't have a graphics card on my laptop. When I upload my code I get the following error: make: Warning: File `main.cu' has modification t..

How to go to a URL using jQuery?

How to go to a URL using jQuery or JavaScript. <a href="javascript:void(0)" onclick="javascript:goToURL()">Go To URL</a> function goToURL(url){ // some code to go to url } I don't w..

Can I automatically increment the file build version when using Visual Studio?

I was just wondering how I could automatically increment the build (and version?) of my files using Visual Studio (2005). If I look up the properties of say C:\Windows\notepad.exe, the Version tab g..

PostgreSQL wildcard LIKE for any of a list of words

I have a simple list of ~25 words. I have a varchar field in PostgreSQL, let's say that list is ['foo', 'bar', 'baz']. I want to find any row in my table that has any of those words. This will work, b..

How do you compare two version Strings in Java?

Is there a standard idiom for comparing version numbers? I can't just use a straight String compareTo because I don't know yet what the maximum number of point releases there will be. I need to comp..

Update values from one column in same table to another in SQL Server

I'm trying to overwrite values that are found in TYPE1 with values that are found in TYPE2. I wrote this SQL to try it out, but for some reason it isn't updating: select * from stuff update stuff s..

How to find duplicate records in PostgreSQL

I have a PostgreSQL database table called "user_links" which currently allows the following duplicate fields: year, user_id, sid, cid The unique constraint is currently the first field called "id",..

How do I remove the horizontal scrollbar in a div?

When I set overflow: scroll, I get horizontal and vertical scrollbars. Is there a way to remove the horizontal scrollbar in a div?..

Remove a cookie

When I want to remove a Cookie I try unset($_COOKIE['hello']); I see in my cookie browser from firefox that the cookie still exists. How can I really remove the cookie?..

Saving a select count(*) value to an integer (SQL Server)

I'm having some trouble with this statement, owing no doubt to my ignorance of what is returned from this select statement: declare @myInt as INT set @myInt = (select COUNT(*) from myTable as count) ..

Convert Linq Query Result to Dictionary

I want to add some rows to a database using Linq to SQL, but I want to make a "custom check" before adding the rows to know if I must add, replace or ignore the incomming rows. I'd like to keep the tr..

How do you force a CIFS connection to unmount

I have a CIFS share mounted on a Linux machine. The CIFS server is down, or the internet connection is down, and anything that touches the CIFS mount now takes several minutes to timeout, and is unk..

Convert a string representation of a hex dump to a byte array using Java?

I am looking for a way to convert a long string (from a dump), that represents hex values into a byte array. I couldn't have phrased it better than the person that posted the same question here. But..

Remove pandas rows with duplicate indices

How to remove rows with duplicate index values? In the weather DataFrame below, sometimes a scientist goes back and corrects observations -- not by editing the erroneous rows, but by appending a dupli..

How to convert List to Json in Java

How to convert generic list to json in Java.I have class like this.. public class Output { public int Keyname { get; set; } public Object outputvalue{ get; set; } //outvalue may be even a o..

Accessing clicked element in angularjs

I'm relatively new to AngularJS and suspect I'm not grasping a concept. I'm also using Twitter Bootstrap and I've got jQuery loaded. Workflow: User clicks a link from a list, "master" section is upda..

How to Generate unique file names in C#

I have implemented an algorithm that will generate unique names for files that will save on hard drive. I'm appending DateTime: Hours,Minutes,Second and Milliseconds but still it generates duplicate n..

Print JSON parsed object?

I've got a javascript object which has been JSON parsed using JSON.parse I now want to print the object so I can debug it (something is going wrong with the function). When I do the following... for ..

How can you tell when a layout has been drawn?

I have a custom view that draws a scrollable bitmap to the screen. In order to initialize it, i need to pass in the size in pixels of the parent layout object. But during the onCreate and onResume fun..

EPPlus - Read Excel Table

Using EPPlus, I want to read an excel table, then store all the contents from each column into its corresponding List. I want it to recognize the table's heading and categorize the contents based on t..

How to use Apple's new San Francisco font on a webpage

I'd like to use the new San Francisco font on a site. I've tried: font: 'San Francisco', Helvetica, Arial, san-serif; to no avail. I have tried the answers to this question, but @font-face is not t..

Ant: How to execute a command for each file in directory?

I want to execute a command from an Ant buildfile, for each file in a directory. I am looking for a platform-independent solution. How do I do this? Sure, I could write a script in some scripting la..

How do I change file permissions in Ubuntu

In Ubuntu I want to change the file permissions of a whole folder and all its sub folders to read/write by anybody I have tried sudo chmod 666 /var/www and sudo chmod 755 /var/www without success up..

Chart won't update in Excel (2007)

I have an Excel document (2007) with a chart (Clustered Column) that gets its Data Series from cells containing calculated values The calculated values never change directly, but only as a result of ..

How to iterate over a TreeMap?

Possible Duplicate: How do I iterate over each Entry in a Map? I want to iterate over a TreeMap, and for all keys which have a particular value, I want them to be added to a new TreeMap. Ho..

jQuery: get parent tr for selected radio button

I have the following HTML: <table id="MwDataList" class="data" width="100%" cellspacing="10px"> .... <td class="centerText" style="height: 56px;"> <input id="selectRad..

What is a Python egg?

I'm new to Python and I'm just trying to understand how its packages work. Presumably eggs are some sort of packaging mechanism, but what would be a quick overview of what role they play and may be s..

Execute multiple command lines with the same process using .NET

I'm trying to execute multiple commands without create a new process each time. Basically, I want to start the DOS command shell, switch to the MySQL command shell, and execute a command. Here's how I..

Determine direct shared object dependencies of a Linux binary?

How can I easily find out the direct shared object dependencies of a Linux binary in ELF format? I'm aware of the ldd tool, but that appears to output all dependencies of a binary, including the depe..

Create boolean column in MySQL with false as default value?

I want to create a table in MySQL with a boolean column whose default value is false. But it's accepting NULL as default.....

How do you convert between 12 hour time and 24 hour time in PHP?

I have a time as a string, for example: $time = '5:36 pm'; I require this to be in 24 hour format (i.e. 17:36), however I don't know which functions I need to use to convert it. Please help...

Open web in new tab Selenium + Python

So I am trying to open websites on new tabs inside my WebDriver. I want to do this, because opening a new WebDriver for each website takes about 3.5secs using PhantomJS, I want more speed... I'm usin..

Why does make think the target is up to date?

This is my Makefile: REBAR=./rebar REBAR_COMPILE=$(REBAR) get-deps compile all: compile compile: $(REBAR_COMPILE) test: $(REBAR_COMPILE) skip_deps=true eunit clean: -rm -rf deps ebin ..

Read .csv file in C

I have a .csv file : lp;imie;nazwisko;ulica;numer;kod;miejscowosc;telefon;email;data_ur 1;Jan;Kowalski;ul. Nowa;1a;11-234;Budry;123-123-456;[email protected];1980.05.13 2;Jerzy;Nowak;ul. Konopnicka;13a/3;00-..

Arduino Sketch upload issue - avrdude: stk500_recv(): programmer is not responding

I have an Arduino Duemilanove with an ATmega328. I am working on Ubuntu 12.04 (Precise Pangolin), and the Arduino IDE's version is 1.0. Recently, I tried to upload a few of the sample sketches on..

SecurityException during executing jnlp file (Missing required Permissions manifest attribute in main jar)

OS: Windows 7 64 bit Java: jdk1.7.0_51 I have a jnlp file. When I double click on this, exception is occurred as below: Application Error: Unable to launch the application Exception: java.lang.Secu..

rotating axis labels in R

In R, how do I make a (bar)plot's y axis labels parallel to the X axis instead of parallel to the Y axis?..

Ignore files that have already been committed to a Git repository

I have an already initialized Git repository that I added a .gitignore file to. How can I refresh the file index so the files I want ignored get ignored?..

Basic Authentication Using JavaScript

I am building an application that consumes the Caspio API. I am having some trouble authenticating against their API. I have spent 2-3 days trying to figure this out but it may be due to some understa..

How to install and use "make" in Windows?

I'm following the instructions of someone whose repository I cloned to my machine. What I want is simple: to be able to use the make command as part of setting up the code environment. But I'm using W..

How to return a PNG image from Jersey REST service method to the browser

I have a web server running with Jersey REST resources up and I wonder how to get an image/png reference for the browsers img tag; after submitting a Form or getting an Ajax response. The image proces..

SQL Server 2008 R2 can't connect to local database in Management Studio

I am using SQL Server 2008 R2 Express. I first installed SQL Server 2008 R2 Express Management Studio and then I installed SQL Server 2008 R2 Express. I have the instance SQLEXPRESS running and it is..

How do I change the text of a span element using JavaScript?

If I have a span, say: <span id="myspan"> hereismytext </span> How do I use JavaScript to change "hereismytext" to "newtext"?..

Writing files in Node.js

I've been trying to find a way to write to a file when using Node.js, but with no success. How can I do that?..

jQuery: Test if checkbox is NOT checked

I'm having trouble figuring this out. I have two checkboxes (in the future will have more): checkSurfaceEnvironment-1 checkSurfaceEnvironment-2 Basically, I want to write an if statement and test ..

Gerrit error when Change-Id in commit messages are missing

I set up a branch in the remote repository and made some commits on that branch. Now I want to merge the remote branch to the remote master. Basically follows are my operations: checkout branch che..

How to get a List<string> collection of values from app.config in WPF?

The following example fills the ItemsControl with a List of BackupDirectories which I get from code. How can I change this so that I get the same information from the app.config file? XAML: <Win..

Spring Boot - Loading Initial Data

I'm wondering what the best way to load initial database data before the application starts? What I'm looking for is something that will fill my H2 database with data. For example, I have a domain mo..

Classes cannot be accessed from outside package

I have two packages. The class I want to import from the first package is declared as PUBLIC. Despite, when I test a file from the second package it shows me compilation errors like this: PUBLICcl..

How to select only 1 row from oracle sql?

I want to use oracle syntax to select only 1 row from table DUAL. For example, I want to execute this query: SELECT user FROM DUAL ...and it'd have, like, 40 records. But I need only one recor..

Convert normal date to unix timestamp

How can I convert normal date 2012.08.10 to unix timestamp in javascript? Fiddle: http://jsfiddle.net/J2pWj/ I've seen many posts here that convert it in PHP, Ruby, etc... But I need to do this ..

How to clear the entire array?

I have an array like this: Dim aFirstArray() As Variant How do I clear the entire array? What about a collection?..

How to iterate using ngFor loop Map containing key as string and values as map iteration

I am new to angular 5 and trying to iterate the map containing another map in typescript. How to iterate below this kind of map in angular below is code for component: import { Component, OnInit} f..

How to concatenate strings in a Windows batch file?

I have a directory for which I want to list all the .doc files with a ;. I know the following batch command echos all the files: for /r %%i In (*.doc) DO echo %%i But now I want to put them all in..

Convert SVG to image (JPEG, PNG, etc.) in the browser

I want to convert SVG into bitmap images (like JPEG, PNG, etc.) through JavaScript...

java.lang.UnsupportedClassVersionError Unsupported major.minor version 51.0

I am trying to build an application, but it gives some error. My JDK version is given below: java version "1.6.0_30" Java(TM) SE Runtime Environment (build 1.6.0_30-b12) Java HotSpot(TM) Client VM (b..

Eclipse - no Java (JRE) / (JDK) ... no virtual machine

I am trying to get Eclipse v3.5 (Galileo) to re-run on my computer - I have run it before with no problems, but now I keep getting this error: A Java Runtime Environment (JRE) or Java Develop..

PHP: How to remove specific element from an array?

How do I remove an element from an array when I know the elements name? for example: I have an array: $array = array('apple', 'orange', 'strawberry', 'blueberry', 'kiwi'); the user enters strawber..

How to install npm peer dependencies automatically?

For example, when I install Angular2: npm install --save angular2 [email protected] /Users/doug/Projects/dougludlow/temp +-- [email protected] +-- UNMET PEER DEPENDENCY es6-promise@^3.0.2 +-- UNMET PEE..

How to input a regex in string.replace?

I need some help on declaring a regex. My inputs are like the following: this is a paragraph with<[1> in between</[1> and then there are cases ... where the<[99> number ranges from ..

What are public, private and protected in object oriented programming?

What are public, private and protected in object oriented programming?..

gpg failed to sign the data fatal: failed to write commit object [Git 2.10.0]

I followed few articles over the pretty attributes on Git 2.10 release note. Going through which upgraded the git to 2.10.0 and made changes to global .gitconfig resulting as follows - [filter "lfs"..

C++ Loop through Map

I want to iterate through each element in the map<string, int> without knowing any of its string-int values or keys. What I have so far: void output(map<string, int> table) { map&..

Cause of a process being a deadlock victim

I have a process with a Select which takes a long time to finish, on the order of 5 to 10 minutes. I am currently not using NOLOCK as a hint to the MS SQL database engine.At the same time we have anot..

In PHP, how can I add an object element to an array?

I'm using PHP. I have an array of objects, and would like to add an object to the end of it. $myArray[] = null; //adds an element $myArray[count($myArray) - 1]->name = "my name"; //modifies the el..

How to read a file from jar in Java?

I want to read an XML file that is located inside one of the jars included in my class path. How can I read any file which is included in the jar?..

The transaction log for database is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases

I am getting following error while I am trying to delete 355447 records in single delete query. The transaction log for database is full. To find out why space in the log cannot be reused, see the lo..

Check if element at position [x] exists in the list

If I have a list of strings List<String> list = new list<String>(); list.add("str1"); list.add("str2"); list.add("str3"); and I want to know if for example index position 2 contains an..

MVC 4 Data Annotations "Display" Attribute

I am starting out with MVC 4 (Razor view engine). (I believe this may apply to MVC 3 and earlier as well.) I am wondering if there is any benefit to using the DisplayAttribute data annotation within a..

Bootstrap Carousel Full Screen

I am trying to get the image in the bootstrap carousel to show full screen but haven't been able to figure it out, I've been working on this for awhile and am totally stuck. Right now I have just one..

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

How can I parse a YAML file in Python

How can I parse a YAML file in Python?..

Why does find -exec mv {} ./target/ + not work?

I want to know exactly what {} \; and {} \+ and | xargs ... do. Please clarify these with explanations. Below 3 commands run and output same result but the first command takes a little time and the f..

Android: how to parse URL String with spaces to URI object?

I have a string representing an URL containing spaces and want to convert it to an URI object. If I simply try to create it via String myString = "http://myhost.com/media/File Name that has spaces in..

Connection String Using a Domain User?

Previously for all our asp.net applications we have been using a sysadmin user within SQL Server to connect and add/update/delete/get data. Our SQL Admin wants to delete that account and create a Doma..

what do <form action="#"> and <form method="post" action="#"> do?

I'm reading a book on html development (which I'm fairly new at) and despite the fact that the book just had its 1st publishing one month ago (Nov. 2011), the author is an experienced coder and maybe ..

Retrieving the first digit of a number

I am just learning Java and am trying to get my program to retrieve the first digit of a number - for example 543 should return 5, etc. I thought to convert to a string, but I am not sure how I can co..

How to create a 100% screen width div inside a container in bootstrap?

Let's say i have the following markup: <div class="container"> <div class="row"> <div class="col-md-12"> ... <div class="full-width-div"> ..

Getting Python error "from: can't read /var/mail/Bio"

I am running a (bio)python script which results in the following error: from: can't read /var/mail/Bio seeing as my script doesn't have anything to with mail, I don't understand why my script is lo..

Detecting superfluous #includes in C/C++?

I often find that the headers section of a file get larger and larger all the time but it never gets smaller. Throughout the life of a source file classes may have moved and been refactored and it's v..

Windows service start failure: Cannot start service from the command line or debugger

hi i'm getting this error Cannot start service from the command line or debugger. A winwows Service must first be installed(using installutil.exe) and then started with the ServerExplorer, Window..

How can I find out a file's MIME type (Content-Type)?

Is there a way to find out the MIME type (or is it called "Content-Type"?) of a file in a Linux bash script? The reason I need it is because ImageShack appears to need it to upload a file, as for som..

Deactivate or remove the scrollbar on HTML

I want to de-activate or remove the vertical scrollbar in an HTML page. How to do that ? Thanks...

React onClick and preventDefault() link refresh/redirect?

I'm rendering a link with react: render: -> `<a className="upvotes" onClick={this.upvote}>upvote</a>` Then, above I have the upvote function: upvote: -> // do stuff (ajax) ..

Is it bad to have my virtualenv directory inside my git repository?

I'm thinking about putting the virtualenv for a Django web app I am making inside my git repository for the app. It seems like an easy way to keep deploy's simple and easy. Is there any reason why I s..

What's the difference between “mod” and “remainder”?

My friend said that there are differences between "mod" and "remainder". If so, what are those differences in C and C++? Does '%' mean either "mod" or "rem" in C?..

Count if two criteria match - EXCEL formula

I have this table and I would like to create a formula which would count values based on true conditions from column A and column C. Example: If in column A value is M (male), and in column C is YES..

Validate that text field is numeric usiung jQuery

I have a simple issue -- I would like to check a field to see if it's an integer if it is not blank. I'm not using any additional plugins, just jQuery. My code is as follows: if($('#Field').val() != ..

How to compare strings in sql ignoring case?

How do I write a query in Oracle ignoring the case of the strings being compared? For example "angel", "Angel", "ANGEL", "angel", "AngEl" would all be equal when compared...

Is there a foreach loop in Go?

Is there a foreach construct in the Go language? Can I iterate over a slice or array using a for?..

git push vs git push origin <branchname>

I'm quite new to Git. I'm creating a branch and then want to push it to origin. I think that simply issuing git push (while standing on my branch) should be sufficient. Is it possible/reasonable to..

How to run JUnit tests with Gradle?

Currently I have the following build.gradle file: apply plugin: 'java' sourceSets { main { java { srcDir 'src/model' } } } dependencies { compile files('libs..

How to know/change current directory in Python shell?

I am using Python 3.2 on Windows 7. When I open the Python shell, how can I know what the current directory is and how can I change it to another directory where my modules are?..

How to get values from IGrouping

I have a question about IGrouping and the Select() method. Let's say I've got an IEnumerable<IGrouping<int, smth>> in this way: var groups = list.GroupBy(x => x.ID); where list is a..

Clicking a checkbox with ng-click does not update the model

Clicking on a checkbox and calling ng-click: the model is not updated before ng-click kicks in so the checkbox value is wrongly presented in the UI: This works in AngularJS 1.0.7 and seems broken in ..

Seeking useful Eclipse Java code templates

You can create various Java code templates in Eclipse via Window > Preferences > Java > Editor > Templates e.g. sysout is expanded to: System.out.println(${word_selection}${});${cursor} You can ..

Unordered List (<ul>) default indent

Can anyone tell me why an unordered list has a default indent/padding applied to it? Can this be solved with a CSS Browser Reset?..

Sleep for milliseconds

I know the POSIX sleep(x) function makes the program sleep for x seconds. Is there a function to make the program sleep for x milliseconds in C++?..

did you register the component correctly? For recursive components, make sure to provide the "name" option

I configured 'i-tab-pane': Tabpane but report error,the code is bellow: <template> <div class="page-common"> <i-tabs> <i-tab-pane label="wx"> content ..

How to auto adjust the div size for all mobile / tablet display formats?

I have designed a page where four div tags are there in the page. If I test the page in mobile phone (5 inch) it fits the page perfectly, If I test the same page in tablet the page fits with in 30% of..

How to wait till the response comes from the $http request, in angularjs?

I am using some data which is from a RESTful service in multiple pages. So I am using angular factories for that. So, I required to get the data once from the server, and everytime I am getting the da..

Using sed, how do you print the first 'N' characters of a line?

Using sed what is an one liner to print the first n characters? I am doing the following: grep -G 'defn -test.*' OctaneFullTest.clj | sed .... ..

Practical uses for the "internal" keyword in C#

Could you please explain what the practical usage is for the internal keyword in C#? I know that the internal modifier limits access to the current assembly, but when and in which circumstance should..

How to convert string date to Timestamp in java?

I want to convert string Date into Timestamp in java. The following coding i have written.I have declare the date for date1 is: 7-11-11 12:13:14. SimpleDateFormat datetimeFormatter1 = new SimpleDateF..

Force "git push" to overwrite remote files

I want to push my local files, and have them on a remote repo, without having to deal with merge conflicts. I just want my local version to have priority over the remote one. How can I do this with G..

How to get the response of XMLHttpRequest?

I'd like to know how to use XMLHttpRequest to load the content of a remote URL and have the HTML of the accessed site stored in a JS variable. Say, if I wanted to load and alert() the HTML of http://..

What's the difference between KeyDown and KeyPress in .NET?

What is the difference between the KeyDown and KeyPress events in .NET?..

Display number with leading zeros

Given: a = 1 b = 10 c = 100 How do I display a leading zero for all numbers with less than two digits? This is the output I'm expecting: 01 10 100 ..

How to get base64 encoded data from html image

I have a registration form where users can choose an avatar. They have 2 possibilities: Choose a default avatar Upload their own avatar In my HTML page I have this. <img id="preview" src="img/..

Cannot resolve method 'getSupportFragmentManager ( )' inside Fragment

I found the message Cannot resolve method 'getSupportFragmentManager ( )' I want to fragment as activity. because I want to use Maps on the tabs swipe. public class PETAcikarangsukatani extends Fragm..

DECODE( ) function in SQL Server

SELECT PC_COMP_CODE, 'R', PC_RESUB_REF, DECODE(PC_SL_LDGR_CODE, '02', 'DR', 'CR'), PC_DEPT_NO DEPT, '', --PC_DEPT_NO, PC_SL_LDGR_CODE + '/' + PC_SL_ACNO, ..

SQL - Rounding off to 2 decimal places

I need to convert minutes to hours, rounded off to 2 decimal places.I also need to display only up to 2 numbers after the decimal point. So if I have minutes as 650.Then hours should be 10.83 Here's ..

Is log(n!) = T(n·log(n))?

I am to show that log(n!) = T(n·log(n)). A hint was given that I should show the upper bound with nn and show the lower bound with (n/2)(n/2). This does not seem all that intuitive to me. Why woul..

How do you copy the contents of an array to a std::vector in C++ without looping?

I have an array of values that is passed to my function from a different part of the program that I need to store for later processing. Since I don't know how many times my function will be called be..

Insert current date in datetime format mySQL

I'm having problems getting the date inserted properly into my database. $date = date('m/d/Y h:i:s', time()); I use this format, and, it echoes out correctly, however, when, I insert mysql_query("..

Java: Check if enum contains a given string?

Here's my problem - I'm looking for (if it even exists) the enum equivalent of ArrayList.contains();. Here's a sample of my code problem: enum choices {a1, a2, b1, b2}; if(choices.???(a1)}{ //do th..

Error during SSL Handshake with remote server

I have Apache2 (listening on 443) and a web app running on Tomcat7 (listening on 8443) on Ubuntu. I set apache2 as reverse proxy so that I access the web app through port 443 instead of 8443. Besides..

Replace X-axis with own values

I have a question regarding the command plot(). Is there a way to fully eliminate the x-axis and replace it with own values? I know that I can get rid of the axis by doing plot(x,y, xaxt = 'n') an..

Can we locate a user via user's phone number in Android?

Is it possible to locate a user via user's phone number in Android? If an SMS can be sent to the user then we can also retrieve or get to know the location of the user who we sending the SMS. I mean ..

how to insert datetime into the SQL Database table?

How can I insert datetime into the SQL Database table ? Is there a way to insert this query through the insert command in C# / .NET?..

Intercept page exit event

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

Form content type for a json HTTP POST?

Just wanted a clarification of the form content types: application/x-www-form-urlencoded: This is where you can send params encoded with the url. multipart/form-data: ?? I need to send a JSON in t..

How do I get the web page contents from a WebView?

On Android, I have a WebView that is displaying a page. How do I get the page source without requesting the page again? It seems WebView should have some kind of getPageSource() method that returns ..

clear form values after submission ajax

I am using the following script for validate my contact form. //submission scripts $('.contactForm').submit( function(){ //statements to validate the form var filter = /^([a-zA-Z..

Editing dictionary values in a foreach loop

I am trying to build a pie chart from a dictionary. Before I display the pie chart, I want to tidy up the data. I'm removing any pie slices that would be less than 5% of the pie and putting them in a ..

How would I run an async Task<T> method synchronously?

I'm learning about async/await, and ran into a situation where I need to call an async method synchronously. How can I do that? Async method: public async Task<Customers> GetCustomers() { ..

javascript toISOString() ignores timezone offset

I am trying to convert Twitter datetime to a local iso-string (for prettyDate) now for 2 days. I'm just not getting the local time right.. im using the following function: function getLocalISOTime(t..

How to make gradient background in android

I want to create gradient background where the gradient is in the top half and there's a solid color in the bottom half, like in this image below: I can't because the centerColor spreads out to cov..

How to set UTF-8 encoding for a PHP file

I have a PHP script called : http://cyber-flick.com/apiMorpho.php?method=getMorphoData&word=kot That displays some data in plain text: CzÄ?L?Ä? mowy: rzeczownik Przypadek: dopeL?niacz Rod..

XPath OR operator for different nodes

How can I do with XPath: //bookstore/book/title or //bookstore/city/zipcode/title Just //title won't work because I also have //bookstore/magazine/title p.s. I saw a lot of or examples but mainly..

Get viewport/window height in ReactJS

How do I get the viewport height in ReactJS? In normal JavaScript I use window.innerHeight() but using ReactJS, I'm not sure how to get this information. My understanding is that ReactDOM.findDomN..

How to create a connection string in asp.net c#

I am working on asp.net c# project, for connection I used: SqlConnection con = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=D:\19-02\ABCC\App_Data\abcc.mdf;Integrated Security=True;U..

Sum across multiple columns with dplyr

My question involves summing up values across multiple columns of a data frame and creating a new column corresponding to this summation using dplyr. The data entries in the columns are binary(0,1). I..

Trying to get the average of a count resultset

I have the following SQL:(bitemp) SELECT COUNT (*) AS Count FROM Table T WHERE (T.Update_time = (SELECT MAX (B.Update_time ) FROM Table B WHERE (B.Id = T.Id))..

JQuery: Change value of hidden input field

I'm having a hella time setting the value of a hidden input. I want to pass the HTML from between the option tags to the hidden field- end run it will the page title from wordpress' wp_list_dropdow..

Setting background-image using jQuery CSS property

I have an image URL in a imageUrl variable and I am trying to set it as CSS style, using jQuery: $('myObject').css('background-image', imageUrl); This seems to be not working, as: console.log($('m..

How do I use Apache tomcat 7 built in Host Manager gui?

Hi I have Apache Tomcat 7.0.5 on my Windows server, and i see that it has a built in Host Manager, but i can't seem to find any useful info on how to use it or set up a virtual Host with that GUI. Th..

Facebook Open Graph Error - Inferred Property

I'm trying to implement Facebook's OpenGRaph protocol on my product pages. On each page i have this above the head section: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#"..

Set custom attribute using JavaScript

I am using The DynaTree (https://code.google.com/p/dynatree) but I am having some problems and hoping someone can help.. I am displaying the tree on the page like below: <div id="tree"> ..

Checking if a list of objects contains a property with a specific value

Say I have the following code: class SampleClass { public int Id {get; set;} public int Name {get; set;} } List<SampleClass> myList = new List<SampleClass>(); //list is filled wit..

HRESULT: 0x80131040: The located assembly's manifest definition does not match the assembly reference

The located assembly's manifest definition does not match the assembly reference getting this when running nunit through ncover. Any idea?..

Python - Move and overwrite files and folders

I have a directory, 'Dst Directory', which has files and folders in it and I have 'src Directory' which also has files and folders in it. What I want to do is move the contents of 'src Directory' to '..

Cygwin Make bash command not found

I installed cygwin with all the packages on windows 7 64 bit. For some reason the make command is giving me an error: bash make: command not found. I checked and in my bin folder, there is no make.exe..

Which is the best library for XML parsing in java

I'm searching the java library for parsing XML (complex configuration and data files), I googled a bit but couldn't found other than dom4j (Seems like they are working on V2).. I have taken look at co..

Unable to compile class for JSP: The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .class files

I can't get tomcat7 to compile jsps. It till run the example servlets just fine and the service is up and running. I am running oracle java 8. Can anyone point me in the right direction? Here is the..

Add an object to a python list

I am trying to add an object to a list but since I'm adding the actual object when I try to reset the list thereafter, all the values in the list are reset. Is there an actual way how I can add a moni..

How to redirect from one URL to another URL?

How can I redirect to another URL in a web page using JavaScript?..

MVC ajax post to controller action method

I've been looking at the question here: MVC ajax json post to controller action method but unfortunately it doesn't seem to be helping me. Mine is pretty much the exact same, except my method signatur..

ALTER TABLE, set null in not null column, PostgreSQL 9.1

I have a table with not null column, How to set a null value in this column as default? I mean, I want to do something like this: postgres=# ALTER TABLE person ALTER COLUMN phone SET NULL; but it ..

Auto increment in MongoDB to store sequence of Unique User ID

I am making a analytics system, the API call would provide a Unique User ID, but it's not in sequence and too sparse. I need to give each Unique User ID an auto increment id to mark a analytics datap..

How to decrypt a SHA-256 encrypted string?

I have a string that was salted, hashed with SHA-256, then base64 encoded. Is there a way to decode this string back to its original value?..

Numpy: find index of the elements within range

I have a numpy array of numbers, for example, a = np.array([1, 3, 5, 6, 9, 10, 14, 15, 56]) I would like to find all the indexes of the elements within a specific range. For instance, if the ra..

Create session factory in Hibernate 4

I'm having trouble generating a session factory in Hibernate 4. In Hibernate 3 I simple did: org.hibernate.cfg.Configuration conf= HibernateUtil .getLimsInitializedConfiguration(systemConfigurati..

Can't concatenate 2 arrays in PHP

I've recently learned how to join 2 arrays using the + operator in PHP. But consider this code... $array = array('Item 1'); $array += array('Item 2'); var_dump($array); Output is array(1) { ..

How to read attribute value from XmlNode in C#?

Suppose I have a XmlNode and I want to get the value of an attribute named "Name". How can I do that? XmlTextReader reader = new XmlTextReader(path); XmlDocument doc = new XmlDocument(); XmlNode nod..

Select folder dialog WPF

I develop a WPF4 application and in my app I need to let the user select a folder where the application will store something (files, generated reports etc.). My requirements: Ability to see the sta..

How can I see CakePHP's SQL dump in the controller?

Is there a way that one can cause CakePHP to dump its SQL log on demand? I'd like to execute code up until a point in my controller and see what SQL has been run...

How to Edit a row in the datatable

I have created a data table. It has 3 column Product_id, Product_name and Product_price Datatable table= new DataTable("Product"); table.Columns.Add("Product_id", typeof(int)); table.Col..

Delete all documents from index/type without deleting type

I know one can delete all documents from a certain type via deleteByQuery. Example: curl -XDELETE 'http://localhost:9200/twitter/tweet/_query' -d '{ "query" : { "term" : { "user" : "kimc..

Differences between key, superkey, minimal superkey, candidate key and primary key

I'm new to MySQL, and I'm really confused about the different terms that I've encountered. I tried googling the answer but the results are really confusing and when I try and understand it just seems ..

adb connection over tcp not working now

I was trying to use adb over TCP/IP. I have followed these steps adb tcpip 5555 adb connect 194.68.0.100:5555 I have used my device for 2 days and now I am unable to connect to my IP address like ..

Jackson how to transform JsonNode to ArrayNode without casting?

I am changing my JSON library from org.json to Jackson and I want to migrate the following code: JSONObject datasets = readJSON(new URL(DATASETS)); JSONArray datasetArray = datasets.getJSONArray("da..