Questions Tagged with #Rad controls

RadControls is a suite of UI controls (buttons, grids, menus, charts, windows, input controls, etc.) created by Telerik. There are version of the suite for ASP.Net WebForm, Silverlight, WPF, WinForms, Windows Phone and Android.

webpack command not working

I am new to Node Js and Webpack. I tried to start a project with module-loaders. Firstly, I installed nodeJs and NPM and created a new directory called tutorial. I used the command prompt to cd into ..

Entity Framework throws exception - Invalid object name 'dbo.BaseCs'

I've followed Adam's answer here and the Entity Framework now works and the Seed() method also works. But when I try to access the database like this: public User FindUserByID(int id) { ..

How can I get the size of an std::vector as an int?

I tried: #include <vector> int main () { std::vector<int> v; int size = v.size; } but got the error: cannot convert 'std::vector<int>::size' from type 'std::vector<in..

Elasticsearch query to return all records

I have a small database in Elasticsearch and for testing purposes would like to pull all records back. I am attempting to use a URL of the form... http://localhost:9200/foo/_search?pretty=true&q..

org.hibernate.TransientObjectException: object references an unsaved transient instance - save the transient instance before flushing

In my project I have User, Role, UserRole and BloodGroup entities. Firstly I take List<BloodGroup> from DB and set to User. Then I give User and Role entites to UserRole. After that I insert Use..

How to sort by two fields in Java?

I have array of objects person (int age; String name;). How can I sort this array alphabetically by name and then by age? Which algorithm would you use for this ?..

How do I make a C++ macro behave like a function?

Let's say that for some reason you need to write a macro: MACRO(X,Y). (Let's assume there's a good reason you can't use an inline function.) You want this macro to emulate a call to a function with ..

HTML encoding issues - "Â" character showing up instead of "&nbsp;"

I've got a legacy app just starting to misbehave, for whatever reason I'm not sure. It generates a bunch of HTML that gets turned into PDF reports by ActivePDF. The process works like this: Pull a..

How to generate a unique hash code for string input in android...?

I wanted to generate a unique hash code for a string in put in android. Is there any predefined library is there or we have to generate manually. Please any body if knows please present a link or a co..

How to set thousands separator in Java?

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

Parameter in like clause JPQL

I am trying to write a JPQL query with a like clause: LIKE '%:code%' I would like to have code=4 and find 455 554 646 ... I cannot pass :code = '%value%' namedQuery.setParameter("%" + this.val..

How do I run a bat file in the background from another bat file?

I have a "setup" script which I run in the morning which starts all the programs that I need. Now some of those need additional setup of the environment, so I need to wrap them in small BAT scripts. ..

How to read data From *.CSV file using javascript?

My csv data looks like this: heading1,heading2,heading3,heading4,heading5,value1_1,value2_1,value3_1,value4_1,value5_1,value1_2,value2_2,value3_2,value4_2,value5_2.... How do you read this data..

SQL state [99999]; error code [17004]; Invalid column type: 1111 With Spring SimpleJdbcCall

Hi All I am using spring simple JDBC template to call the oracle procedure the below are my code. The procedure create or replace PROCEDURE get_all_system_users( pi_client_code IN VARCHAR2, po_syste..

Split a string into array in Perl

my $line = "file1.gz file2.gz file3.gz"; my @abc = split('', $line); print "@abc\n"; Expected output: file1.gz file2.gz file3.gz I want the output to be file1.gz in $abc[0], file2.gz in $abc[1], ..

Using Java 8's Optional with Stream::flatMap

The new Java 8 stream framework and friends make for some very concise java code, but I have come across a seemingly-simple situation that is tricky to do concisely. Consider a List<Thing> thin..

Looping through a DataTable

Well. I have a DataTable with multiple columns and multiple rows. I want to loop through the DataTable dynamically basically the output should look as follows excluding the braces : Name (DataColumn..

What does the error "arguments imply differing number of rows: x, y" mean?

I'm trying to create a plot from elements of csv file which looks like this: h1,h2,h3,h4 a,1,0,1,0 b,1,1,0,1 c,0,0,1,0 I tried the following code but am receiving an error saying Error in data.frame..

How do I force my .NET application to run as administrator?

Once my program is installed on a client machine, how do I force my program to run as an administrator on Windows 7?..

PostgreSQL database default location on Linux

What is the default directory where PostgreSQL will keep all databases on Linux?..

Soft Edges using CSS?

I am using RGBA to create a transparent background that overlays on top of an image. Works just fine. My questions is this: Is there a way to "soften" the edges of the box to where it flows more into ..

What is the best method of handling currency/money?

I'm working on a very basic shopping cart system. I have a table items that has a column price of type integer. I'm having trouble displaying the price value in my views for prices that include bo..

Where can I find Android's default icons?

Possible Duplicate: Standard Android menu icons, for example refresh Where can I find the name of the default Android menu icons (like refresh or compose)? The code below has an error stat..

Bug? #1146 - Table 'xxx.xxxxx' doesn't exist

I am using windows XP. I am creating a table in phpMyAdmin using its built-in create table feature, my database name is ddd. It generates the following code: CREATE TABLE `ddd`.`mwrevision` ( `as..

Get protocol, domain, and port from URL

I need to extract the full protocol, domain, and port from a given URL. For example: https://localhost:8181/ContactUs-1.0/contact?lang=it&report_type=consumer >>> https://localhost:8181 ..

How do I output coloured text to a Linux terminal?

How do I print coloured characters to a Linux terminal that supports it? How do I tell whether the terminal supports colour codes?..

What is %timeit in python?

I always read the code to calculate the time like this way: %timeit function() Can you explain what means "%" here? I think, the "%" is always used to replace something in a string, like %s means..

Most popular screen sizes/resolutions on Android phones

I understand that Android's developer site provides information on this topic. I have already read the following three pages: Supporting Multiple Screens Screen Sizes and Densites Icon Design Guidel..

Passing an integer by reference in Python

How can I pass an integer by reference in Python? I want to modify the value of a variable that I am passing to the function. I have read that everything in Python is pass by value, but there has to ..

Differences between ConstraintLayout and RelativeLayout

I am confused about the difference between ConstraintLayout and RelativeLayout. Could someone please tell me the exact differences between them? ..

How do I create a comma-separated list using a SQL query?

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

TypeLoadException says 'no implementation', but it is implemented

I've got a very weird bug on our test machine. The error is: System.TypeLoadException: Method 'SetShort' in type 'DummyItem' from assembly 'ActiveViewers (...)' does not have an implementation. I ju..

Go back button in a page

Possible Duplicate: Go Back to Previous Page get back to previous page How to get the previous page in javascript coding. Go to the previous page when click that back button...

How can I edit a .jar file?

So I have a jar file with one .class file on it. I just need to change some words in the file. What program should I use? I want this to work for my phone...

How to move/rename a file using an Ansible task on a remote system

How is it possible to move/rename a file/directory using an Ansible module on a remote system? I don't want to use the command/shell tasks and I don't want to copy the file from the local system to th..

jQuery show for 5 seconds then hide

I'm using .show to display a hidden message after a successful form submit. How to display the message for 5 seconds then hide?..

How to make the Facebook Like Box responsive?

I am using the Facebook like box code in my side bar by pasting the Facebook code into a text widget. My theme is responsive, and I'd like to get the like box to resize correctly. I found this tutoria..

IIS URL Rewrite and Web.config

I don't understand anything about IIS, but am trying to solve this problem of redirecting all visitors to domain.com/page to domain.com/page.html <?xml version="1.0" encoding="utf-8" ?> <con..

python: how to check if a line is an empty line

Trying to figure out how to write an if cycle to check if a line is empty. The file has many strings, and one of these is a blank line to separate from the other statements (not a ""; is a carriage r..

When do I need to use AtomicBoolean in Java?

How I can use AtomicBoolean and what is that class for?..

Where is svcutil.exe in Windows 7?

For my WCF, I need to generate configuration file for my client application to specify things such as binding of service, the address of the service and the contract...

Call method when home button pressed

I have this method in one of my Android Activities: @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if(keyCode == KeyEvent.KEYCODE_BACK) { Log.d("Test", "Back button..

Redirect from a view to another view

Hi I am trying to redirect from a view to a different view but I get a red squigly in visual studio.How can I redirect from inside a view to another view.This is what I have tryed but it does not work..

What is the (best) way to manage permissions for Docker shared volumes?

I've been playing around with Docker for a while and keep on finding the same issue when dealing with persistent data. I create my Dockerfile and expose a volume or use --volumes-from to mount a host..

JSONDecodeError: Expecting value: line 1 column 1 (char 0)

I am getting error Expecting value: line 1 column 1 (char 0) when trying to decode JSON. The URL I use for the API call works fine in the browser, but gives this error when done through a curl reques..

Asp.net - Add blank item at top of dropdownlist

Why is the dropdown not showing my blank item first? Here is what I have drpList.Items.Add(New ListItem("", "")) With drpList .DataSource = myController.GetList(userid) .DataTextField = "Nam..

client denied by server configuration

I try to setup kohana 3 project as virtual host. Config: <VirtualHost *:80> DocumentRoot "D:/Devel/matysart/matysart_dev1" ServerName matysart-one.local ServerAlias www.matysart-one.loca..

jQuery Datepicker localization

I need a french calendar and I can't understand the problem. I guess I'm not using the regional options like it should be. But... Here is my code : $(function() { $('#Date').datepicker({ sho..

Which terminal command to get just IP address and nothing else?

I'm trying to use just the IP address (inet) as a parameter in a script I wrote. Is there an easy way in a unix terminal to get just the IP address, rather than looking through ifconfig? ..

Git push existing repo to a new and different remote repo server?

Say I have a repository on git.fedorahosted.org and I want to clone this into my account at github to have my own playground aside from the more "official" repo on fedorahosted. What would be the step..

Copy folder recursively in Node.js

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

What is "Linting"?

PHPLint, JSLint, and I recently came across "you can lint your JS code on the fly" while reading something about some IDE. So, what is "linting"?..

How can I read a large text file line by line using Java?

I need to read a large text file of around 5-6 GB line by line using Java. How can I do this quickly?..

How to get year/month/day from a date object?

alert(dateObj) gives Wed Dec 30 2009 00:00:00 GMT+0800 How to get date in format 2009/12/30?..

Change the color of glyphicons to blue in some- but not at all places using Bootstrap 2

I am using the Bootstrap framework for my UI. I want to change the color of my glyphicons to blue, but not in all places. In some places it should use the default color. I have referred to these two ..

What is an application binary interface (ABI)?

I never clearly understood what an ABI is. Please don't point me to a Wikipedia article. If I could understand it, I wouldn't be here posting such a lengthy post. This is my mindset about different i..

Linq Select Group By

I have the following class structure : public class PriceLog { public DateTime LogDateTime {get; set;} public int Price {get; set;} } For a List< PriceLog > I want a Linq query to generate..

How to add empty spaces into MD markdown readme on GitHub?

I'm struggling to add empty spaces before the string starts to make my GitHub README.md looks something like this: Right now it looks like this: I tried adding <br /> tag to fix the new st..

How do I encode/decode HTML entities in Ruby?

I am trying to decode some HTML entities, such as '&amp;lt;' becoming '<'. I have an old gem (html_helpers) but it seems to have been abandoned twice. Any recommendations? I will need to use ..

Creating a JSON response using Django and Python

I'm trying to convert a server side Ajax response script into a Django HttpResponse, but apparently it's not working. This is the server-side script: /* RECEIVE VALUE */ $validateValue=$_POST['valid..

How to process POST data in Node.js?

How do you extract form data (form[method="post"]) and file uploads sent from the HTTP POST method in Node.js? I've read the documentation, googled and found nothing. function (request, response) { ..

Programmatically change the height and width of a UIImageView Xcode Swift

Hey for some reason I am struggling with trying to set the height and width of one of my image views. I want to set it so the height only goes for 20% of my screen. I know to regularly set it you can ..

Getting full-size profile picture

Is there anyway to get the full-size profile picture using any facebook api? http://graph.facebook.com/{ID}/picture?type=large is way to small. Thanks :)..

Function overloading in Javascript - Best practices

What is the best way(s) to fake function overloading in Javascript? I know it is not possible to overload functions in Javascript as in other languages. If I needed a function with two uses foo(x) ..

Waiting until two async blocks are executed before starting another block

When using GCD, we want to wait until two async blocks are executed and done before moving on to the next steps of execution. What is the best way to do that? We tried the following, but it doesn't s..

Resource interpreted as Document but transferred with MIME type application/json warning in Chrome Developer Tools

I have the following snippet, which uses the jQuery Form plugin to post a form to the server (in ajax). var options = { dataType: "json", success: function(data) { alert("success");..

How to grep (search) committed code in the Git history

I have deleted a file or some code in a file sometime in the past. Can I grep in the content (not in the commit messages)? A very poor solution is to grep the log: git log -p | grep <pattern> ..

How to convert upper case letters to lower case

I have a script which reads the input and than lists it, however i want it to convert upper case letters to lower case, how can i do that? this is what i got for words in text.readlines(): sent..

Sending email with gmail smtp with codeigniter email library

<?php class Email extends Controller { function Email() { parent::Controller(); $this->load->library('email'); } function index() { $config['p..

How to set combobox default value?

In windows form, It has a ComboBox, Which have data binded by the DataSource. When going to set the text property for a ComboBox. Selected ComboBox -> Property -> Text : "--Select--". Design ..

Remove Item from ArrayList

I have an ArrayList suppose list, and it has 8 items A-H and now I want to delete 1,3,5 position Item stored in int array from the list how can I do this. I am trying to do this with ArrayList<S..

RegEx for validating an integer with a maximum length of 10 characters

Could you please point me the appropriate RegEx for validating an integer with a maximum length of 10 characters? Valid ones include: 1234567890..

How to make a div with no content have a width?

I am trying to add a width to a div, but I seem to be running into a problem because it has no content. Here is the CSS and HTML I have so far, but it is not working: CSS body{ margin:0 auto; width:10..

Prevent onmouseout when hovering child element of the parent absolute div WITHOUT jQuery

I am having trouble with the onmouseout function in an absolute positoned div. When the mouse hits a child element in the div, the mouseout event fires, but I do not want it to fire until the mouse is..

php convert datetime to UTC

I am in need of an easy way to convert a date time stamp to UTC (from whatever timezone the server is in) HOPEFULLY without using any libraries...

bootstrap 4 responsive utilities visible / hidden xs sm lg not working

Having an issue with the new responsive utilities hidden / visible classes, when migrating to Bootstrap 4. I am aware that .hidden- classes have been removed from v3 and replaced with .hidden-*-up .hi..

Reading rather large json files in Python

Possible Duplicate: Is there a memory efficient and fast way to load big json files in python? So I have some rather large json encoded files. The smallest is 300MB, but this is by far the ..

Pip install - Python 2.7 - Windows 7

I download the get-pip.py from https://pip.pypa.io/en/stable/installing/ . Then i changed path in: system-variable environment into : C:\Python27\ArcGIS10.3\Lib\site-packages after that i tried to ru..

Asp.net 4.0 has not been registered

When I try to open my Visual Studio project I get the following error: Asp.Net has not been registered on the webserver you need to manually configure your webserver for Asp.net 4.0. Update: N..

Determine if two rectangles overlap each other?

I am trying to write a C++ program that takes the following inputs from the user to construct rectangles (between 2 and 5): height, width, x-pos, y-pos. All of these rectangles will exist parallel to ..

What is a non-capturing group in regular expressions?

How are non-capturing groups, i.e. (?:), used in regular expressions and what are they good for?..

Convert array of indices to 1-hot encoded numpy array

Let's say I have a 1d numpy array a = array([1,0,3]) I would like to encode this as a 2D one-hot array b = array([[0,1,0,0], [1,0,0,0], [0,0,0,1]]) Is there a quick way to do this? Quicker than jus..

HTML selected="selected" not working

Hi can somebody tell me what is the wrong in the below code? Selected="selected" not working for me. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <select id="tstselect..

How to extract Month from date in R

I am using the lubridate package and applying the month function to extract month from date. I ran the str command on date field and I got Factor w/ 9498 levels "01/01/1979","01/01/1980",..: 5305 1 ..

Where is PHP.ini in Mac OS X Lion? Thought it was in /usr/local/php5/lib

I wanted to run some PHP right on my Mac, uncommented httpd.conf, activated web sharing, installed MySQL etc. I can't seem to find my PHP files, most importantly, PHP.ini. On my old machine it was lo..

How to compare oldValues and newValues on React Hooks useEffect?

Let's say I have 3 inputs: rate, sendAmount, and receiveAmount. I put that 3 inputs on useEffect diffing params. The rules are: If sendAmount changed, I calculate receiveAmount = sendAmount * rate I..

Fit image into ImageView, keep aspect ratio and then resize ImageView to image dimensions?

How to fit an image of random size to an ImageView? When: Initially ImageView dimensions are 250dp * 250dp The image's larger dimension should be scaled up/down to 250dp The image should keep its a..

ORA-00979 not a group by expression

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

Oracle: how to set user password unexpire?

There is some construction ALTER USER scott PASSWORD EXPIRE But how can I similair set password to unexpired state?..

Swift performSelector:withObject:afterDelay: is unavailable

I have an app in Objective C that I'm transitioning to Swift. In Objective C, I have this method: [self.view performSelector:@selector(someSelector) withObject:self afterDelay:0.1f]; I'm working wit..

Are there any standard exit status codes in Linux?

A process is considered to have completed correctly in Linux if its exit status was 0. I've seen that segmentation faults often result in an exit status of 11, though I don't know if this is simply t..

Java - Reading XML file

I am trying to read in some data from an XML file and having some trouble, the XML I have is as follows: <xml version="1.0" encoding="UTF-8"?> <EmailSettings> <recipient>test@t..

@Directive vs @Component in Angular

What is the difference between @Component and @Directive in Angular? Both of them seem to do the same task and have the same attributes. What are the use cases and when to prefer one over another?..

How to get a variable type in Typescript?

I have a variable. abc:number|string; How can I check its type? I want to do something like below: if (abc.type === "number") { // do something } ..

Java Can't connect to X11 window server using 'localhost:10.0' as the value of the DISPLAY variable

I have a script using java to connect to display X11 in the port 10.0 at localhost but i get always this error java.lang.InternalError: Can't connect to X11 window server using 'localhost:10.0' as t..

Bootstrap 3 unable to display glyphicon properly

I am migrating from bootstrap 2.3 to bootstrap 3 and everything works well. But when I tried to add some icons, the icon font doesn't displayed properly. I tried to look over here http://bootply.com/6..

Access elements of parent window from iframe

I have a page we can call parent.php. In this page I have an iframe with a submit form and outside of that I have a div with the id "target". Is it possible to submit the form in the iframe and when s..

Single line if statement with 2 actions

I'd like to do a single line if statement with more than 1 action. Default is this: (if) ? then : else userType = (user.Type == 0) ? "Admin" : "User"; But I don't need an "else" only, I need an "..

How to split the name string in mysql?

How to split the name string in mysql ? E.g.: name ----- Sachin ramesh tendulkar Rahul dravid Split the name like firstname,middlename,lastname: firstname middlename lastname --------- --..

Exact difference between CharSequence and String in java

I read this previous post. Can any one say what the exact difference between CharSequence and String is, other than the fact that String implements CharSequence and that String is a sequence of charac..

XPath Query: get attribute href from a tag

I want to use XPath to get the href attribute from an a-tag, but it has two occurrences within the same file. How am I getting along? I need to check IF there is an href attribute with value $street/o..

Convert Difference between 2 times into Milliseconds?

I have two masked TextBox controls and was wondering how I'd go about getting the time in each one and then converting the difference into milliseconds. Like, say in tb1 I write "12:01" and in tb2 I w..

What is the default scope of a method in Java?

If I type: void doThis(){ System.out.println("Hello Stackoverflow."); } what is the default scope of doThis()? Public? Protected? Private?..

What integer hash function are good that accepts an integer hash key?

What integer hash function are good that accepts an integer hash key?..

How to declare Return Types for Functions in TypeScript

I checked here https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md which is the TypeScript Language Specifications but I couldn't see one thing that how I can declare a return type of the ..

$date + 1 year?

I'm trying to get a date that is one year from the date I specify. My code looks like this: $futureDate=date('Y-m-d', strtotime('+one year', $startDate)); It's returning the wrong date. Any ideas ..

Xcode 6.1 - How to uninstall command line tools?

I installed Xcode command line tool by issuing xcode-select --install; now I want to uninstall it (without uninstalling Xcode). I've tried sudo /Developer/Library/uninstall-devtools --mode=all bu..

Java: how to import a jar file from command line

I'm trying to call a class (main method) from command line (Windows) with Java. The class imports other classes (other jars). I always get "class not found exception" from a class that my main progra..

Equivalent of shell 'cd' command to change the working directory?

cd is the shell command to change the working directory. How do I change the current working directory in Python?..

ALTER TABLE to add a composite primary key

I have a table called provider. I have three columns called person, place, thing. There can be duplicate persons, duplicate places, and duplicate things, but there can never be a dupicate person-place..

Best way to use Google's hosted jQuery, but fall back to my hosted library on Google fail

What would be a good way to attempt to load the hosted jQuery at Google (or other Google hosted libs), but load my copy of jQuery if the Google attempt fails? I'm not saying Google is flaky. There ar..

Getting attributes of Enum's value

I would like to know if it is possible to get attributes of the enum values and not of the enum itself? For example, suppose I have the following enum: using System.ComponentModel; // for Description..

XML parsing of a variable string in JavaScript

I have a variable string that contains well-formed and valid XML. I need to use JavaScript code to parse this feed. How can I accomplish this using (browser-compatible) JavaScript code?..

Subtracting time.Duration from time in Go

I have a time.Time value obtained from time.Now() and I want to get another time which is exactly 1 month ago. I know subtracting is possible with time.Sub() (which wants another time.Time), but tha..

How to pass data using NotificationCenter in swift 3.0 and NSNotificationCenter in swift 2.0?

I'm implementing socket.io in my swift ios app. Currently on several panels I'm listening to the server and wait for incoming messages. I'm doing so by calling the getChatMessage function in each pa..

Converting bytes to megabytes

I've seen three ways of doing conversion from bytes to megabytes: megabytes=bytes/1000000 megabytes=bytes/1024/1024 megabytes=bytes/1024/1000 Ok, I think #3 is totally wrong but I have seen it. I..

How can I specify the schema to run an sql file against in the Postgresql command line

I run scripts against my database like this... psql -d myDataBase -a -f myInsertFile.sql The only problem is I want to be able to specify in this command what schema to run the script against. I c..

How to move the cursor word by word in the OS X Terminal

I know the combination Ctrl+A to jump to the beginning of the current command, and Ctrl+E to jump to the end. But is there any way to jump word by word, like Alt+←/→ in Cocoa applications ..

Why do I get "MismatchSenderId" from GCM server side?

I'm trying to create a push service for my Android app, and I follow Google GCM's documentation and example for this matter: I can register/unregister my Android app. From my server side, I can see t..

ORA-28040: No matching authentication protocol exception

I am trying to connect my grails project to Oracle databse(Oracle 12c) in windows(8) system. However, whenever I run my application I get following exception : Caused by: org.apache.commons.dbcp.SQLN..

Which browsers support <script async="async" />?

On December 1, 2009, Google announced support for asynchronous Google Analytics tracking. The asynchronous tracking is achieved using the async directive for the <script> tag. Which browsers s..

batch/bat to copy folder and content at once

I'm writing a batch script that does a copy. I want to script it to copy an entire folder. When I want to copy a single file, I do this copy %~dp0file.txt file.txt If I have a folder with this st..

How to remove first 10 characters from a string?

How to ignore the first 10 characters of a string? Input: str = "hello world!"; Output: d! ..

Angular redirect to login page

I come from the Asp.Net MVC world where users trying to access a page they are not authorized are automatically redirected to the login page. I am trying to reproduce this behavior on Angular. I came..

Excel VBA Macro: User Defined Type Not Defined

I'm getting the above error when trying to execute this macros. I'm pretty new to Macros and coding in general so please forgive the ignorance. Sub DeleteEmptyRows() Dim oTable As Table, oRow As Row..

remove inner shadow of text input

So I have a text input, im using html5, on chrome, and I want to change the look of a text input, I've removed the outline on focus (orange on chrome), I set the background to a light color #f1f1f1 bu..

How to find the cumulative sum of numbers in a list?

time_interval = [4, 6, 12] I want to sum up the numbers like [4, 4+6, 4+6+12] in order to get the list t = [4, 10, 22]. I tried the following: t1 = time_interval[0] t2 = time_interval[1] + t1 t3 =..

How to solve error message: "Failed to map the path '/'."

I've searched and searched on Google, and I can't find anything that even seems applicable to my situation, let alone solves the problem. It doesn't matter which address in my website I try to navigat..

How to calculate a time difference in C++

What's the best way to calculate a time difference in C++? I'm timing the execution speed of a program, so I'm interested in milliseconds. Better yet, seconds.milliseconds.. The accepted answer works..

Can I restore a single table from a full mysql mysqldump file?

I have a mysqldump backup of my mysql database consisting of all of our tables which is about 440 megs. I want to restore the contents of just one of the tables from the mysqldump. Is this possible? T..

HTML-5 date field shows as "mm/dd/yyyy" in Chrome, even when valid date is set

I just upgraded an ASP.Net MVC application to MVC-4. The field editor for inputs based on DateTime values now include's the HTML-5 type="date" attribute/value declaration. Now, when viewing ..

When & why to use delegates?

I'm relatively new in C#, & I'm wondering when to use Delegates appropriately. they are widely used in events declaration, but when should I use them in my own code and why are they useful? why no..

Installing SQL Server 2012 - Error: Prior Visual Studio 2010 instances requiring update

I'm trying to install SQL Server 2012 Developer Edition and I can get to the point where it's doing the Installation Rule Checks but one of the rules keep failing: 'Prior Visual Studio 2010 instances..

JavaScript open in a new window, not tab

I have a select box that calls window.open(url) when an item is selected. Firefox will open the page in a new tab by default. However, I would like the page to open in a new window, not a new tab. ..

Java: Finding the highest value in an array

For some reason this code is printing three values for the highest value in the array when I'm trying to print just one (which is 11.3). Can someone please explain to me why it is doing this? Thanks...

YouTube embedded video: set different thumbnail

I want to embed a video from YouTube that is not mine (so I can not change it at YouTube). The video has a thumbnail that is not representative for the video (I refer to the initial still that is show..

HTML iframe - disable scroll

I have following iframe in my site: <iframe src="<<URL>>" height="800" width="800" sandbox="allow-same-origin allow-scripts allow-forms" scrolling="no" style="overflow: hidden"><..

How to run a script as root on Mac OS X?

What should I type on the Mac OS X terminal to run a script as root?..

Good beginners tutorial to socket.io?

I am very new to the world of webdevelopment and jumped into the bandwagon because I find the concept of HTML5 very interesting. I am fairly confident on working with canvas and would now like to move..

How to "select distinct" across multiple data frame columns in pandas?

I'm looking for a way to do the equivalent to the SQL SELECT DISTINCT col1, col2 FROM dataframe_table The pandas sql comparison doesn't have anything about distinct. .unique() only works for a si..

Blue and Purple Default links, how to remove?

This is one of the links in my nav: <li><a href="#live-now" class="navBtn"><span id="navLiveNow" class="white innerShadow textShadow">Live Now</span></a></li> I ..

Insert Data Into Tables Linked by Foreign Key

I am using PostgreSQL. Customer ================== Customer_ID | Name Order ============================== Order_ID | Customer_ID | Price To insert an order, here is what I need to do usually, Fo..

CSS background image URL failing to load

I'm trying to use background image in CSS but even though I gave the full path of the image, it doesn't work. Firebug shows "Failed to load given URL". I'm sure that there is no permission problem in ..

Flask-SQLalchemy update a row's information

How can I update a row's information? For example I'd like to alter the name column of the row that has the id 5. ..

Changing capitalization of filenames in Git

I am trying to rename a file to have different capitalization from what it had before: git mv src/collision/b2AABB.js src/collision/B2AABB.js fatal: destination exists, source=src/collision/b2AABB.js..

alternative to "!is.null()" in R

my R code ends up containing plethora of statements of the form: if (!is.null(aVariable)) { do whatever } But this kind of statement is hard to read because it contains two negations. I woul..

Detect touch press vs long press vs movement?

I'm currently fiddling around with Android programming, but I have a small problem detecting different touch events, namely a normal touch press (press on the screen and release right away), a long pr..

Nesting queries in SQL

The goal of my query is to return the country name and its head of state if it's headofstate has a name starting with A, and the capital of the country has greater than 100,000 people utilizing a nest..

Using JavaMail with TLS

I found several other questions on SO regarding the JavaMail API and sending mail through an SMTP server, but none of them discussed using TLS security. I'm trying to use JavaMail to send status updat..

How to check a boolean condition in EL?

Is this correct? <c:if test="${theBooleanVariable == false}">It's false!</c:if> Or could I do this? <c:if test="${!theBooleanVariable}">It's false!</c:if> ..

How to setup FTP on xampp

i want to make a server using xampp. i have already installed xampp and setting port 8080. php and mysql work fine but i can't access ftp from internet. Can you please suggest way how can I do this?..

How to extract the hostname portion of a URL in JavaScript

Is there a really easy way to start from a full URL: document.location.href = "http://aaa.bbb.ccc.com/asdf/asdf/sadf.aspx?blah" And extract just the host part: aaa.bbb.ccc.com There's gotta be a..

How do you Programmatically Download a Webpage in Java

I would like to be able to fetch a web page's html and save it to a String, so I can do some processing on it. Also, how could I handle various types of compression. How would I go about doing that ..

Convert UTC to local time in Rails 3

I'm having trouble converting a UTC Time or TimeWithZone to local time in Rails 3. Say moment is some Time variable in UTC (e.g. moment = Time.now.utc). How do I convert moment to my time zone, takin..

Align text in a table header

It seems align is not working for the th element. Here is my HTML: _x000D_ _x000D_ <div style="width: 100%; height: 175px; overflow: auto;">_x000D_ <table class="grid" id="table">_x000D..

How to import XML file into MySQL database table using XML_LOAD(); function

I have an XML file which looks like this : <?xml version="1.0" encoding="UTF-8"?> <resultset statement="YOUR SQL STATEMENTS TO GENERATE THIS XML FILE" xmlns:xsi="http://www.w3.org/..

Efficient thresholding filter of an array with numpy

I need to filter an array to remove the elements that are lower than a certain threshold. My current code is like this: threshold = 5 a = numpy.array(range(10)) # testing data b = numpy.array(filter(..

Making an asynchronous task in Flask

I am writing an application in Flask, which works really well except that WSGI is synchronous and blocking. I have one task in particular which calls out to a third party API and that task can take se..

sql query to find the duplicate records

what is the sql query to find the duplicate records and display in descending, based on the highest count and the id display the records. for example: getting the count can be done with select tit..

calculating the difference in months between two dates

In C#/.NET TimeSpan has TotalDays, TotalMinutes, etc. but I can't figure out a formula for total months difference. Variable days per month and leap years keep throwing me off. How can I get TotalMont..

SQL SERVER: Get total days between two dates

I'm trying to get the total number of days between two days: 1/1/2011 3/1/2011 RETURN 62 Is it possible to do in SQL Server?..

Java Spring - How to use classpath to specify a file location?

How can I use the classpath to specify the location of a file that is within my Spring project? This is what I have currently: FileReader fr = new FileReader("C:\\Users\\Corey\\Desktop\\storedProced..

Delete entire row if cell contains the string X

I am new to VBA and I am trying to come up with a way to delete all rows (and shift cells up, if possible) where the website column cell contains the word none. The table contains 5000+ records and th..

How to add jQuery to an HTML page?

I was given this chunk of code to place in my html page but I know nothing about javascript so I have no idea where to place it and what kind of tag to place it in. $('input[type=radio]').change(func..

Send password when using scp to copy files from one server to another

using scp to copy files from 1 unix server to another regularly and performing certain actions. to do this quickly I wish to use a unix script which does the scp and inputs the password required to co..

Why doesn't GCC optimize a*a*a*a*a*a to (a*a*a)*(a*a*a)?

I am doing some numerical optimization on a scientific application. One thing I noticed is that GCC will optimize the call pow(a,2) by compiling it into a*a, but the call pow(a,6) is not optimized and..

What is the meaning of the CascadeType.ALL for a @ManyToOne JPA association

I think I misunderstood the meaning of cascading in the context of a @ManyToOne relationship. The case: public class User { @OneToMany(fetch = FetchType.EAGER) protected Set<Address> us..

Model Binding to a List MVC 4

Is there a pattern to bind an IList of items to the view. I seem to be having issues with the HttpPost. I know Phil Haack wrote a nice article but it is dated and he said they might have a fix with MV..

Auto-center map with multiple markers in Google Maps API v3

This is what I use to display a map with 3 pins/markers: <script> function initialize() { var locations = [ ['DESCRIPTION', 41.926979, 12.517385, 3], ['DESCRIPTION', 41.914873..

Compute mean and standard deviation by group for multiple variables in a data.frame

Edit -- This question was originally titled << Long to wide data reshaping in R >> I'm just learning R and trying to find ways to apply it to help out others in my life. As a test case, I'm w..

how to bind datatable to datagridview in c#

I need to bind my DataTable to my DataGridView. i do this: DTable = new DataTable(); SBind = new BindingSource(); //ServersTable - DataGridView for (int i = 0; i < S..

Bootstrap 3 Horizontal Divider (not in a dropdown)

I know Bootstrap 3 has a horizontal divider you can place inside of dropdown menus to separate links like this: <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu2"> <l..

Table with 100% width with equal size columns

I have to dynamically create a table with a variable number of columns, determined at runtime. Can somebody tell me if it's possible to have a html table with equal size columns that are fully stretch..

How do I use grep to search the current directory for all files having the a string "hello" yet display only .h and .cc files?

How do I use grep to search the current directory for any and all files containing the string "hello" and display only .h and .cc files?..

How can I make robocopy silent in the command line except for progress?

I'm using robocopy to do backups with a PowerShell script, and it's pretty awesome, except that I'd like it to only show the progress percentage while it copies and not all of the other information. ..

How do I use select with date condition?

In sqlserver, how do I compare dates? For example: Select * from Users where RegistrationDate >= '1/20/2009' (RegistrationDate is datetime type) Thanks..

Concatenating Column Values into a Comma-Separated List

What is the TSQL syntax to format my output so that the column values appear as a string, seperated by commas. Example, my table CARS has the following: CarID CarName ---------------- 1 ..

how to change php version in htaccess in server

I'm using php 5.3 on my local machine. On our webserver we have php 4.8. Our server is a shared server. So I want to change the php version on our server via .htaccess file. Is it possible to do it? I..

Excel VBA - Pass a Row of Cell Values to an Array and then Paste that Array to a Relative Reference of Cells

Using Excel (2010) VBA, I am trying to copy (pass) a constant range of cells (whose values recalculate) to an array. Then I am trying to pass that array to a new range of cells, directly below it. A..

C# static class constructor

Is there a work around on how to create a constructor for static class? I need some data to be loaded when the class is initialized but I need one and only one object...

SQL query return data from multiple tables

I would like to know the following: how to get data from multiple tables in my database? what types of methods are there to do this? what are joins and unions and how are they different from one ano..

HTML / CSS table with GRIDLINES

how do I display the gridlines in a HTML table? (am using IE6)..

Creating a "logical exclusive or" operator in Java

Observations: Java has a logical AND operator. Java has a logical OR operator. Java has a logical NOT operator. Problem: Java has no logical XOR operator, according to sun. I would like to define..

Forms authentication timeout vs sessionState timeout

I have code that i am looking through regarding session time outs of the website. In the web.config i came across this code. <authentication mode="Forms"> <forms loginUrl="~/Auth/SignOn.a..

Error :- java runtime environment JRE or java development kit must be available in order to run eclipse

I tried to run "eclipse-jee-juno-win32-x86_64" , but it raised the following error " java runtime environment JRE or java development kit must be available in order to run eclipse. No java virtual mac..

How to prevent line breaks in list items using CSS

I'm trying to put a link called Submit resume in a menu using a li tag. Because of the whitespace between the two words it wraps to two lines. How to prevent this wrapping with CSS?..

How to read XML using XPath in Java

I want to read XML data using XPath in Java, so for the information I have gathered I am not able to parse XML according to my requirement. here is what I want to do: Get XML file from online via it..

How to use BeanUtils.copyProperties?

I am trying to copy properties from one bean to another. Here are the signature of two beans: SearchContent: public class SearchContent implements Serializable { private static final long seria..

How to create and download a csv file from php script?

I am a novice programmer and I searched a lot about my question but couldn't find a helpful solution or tutorial about this. My goal is I have a PHP array and the array elements are showing in a list..

How to remove the bottom border of a box with CSS

I have a rectangular div, like the one above. I want to remove the bottom border (from C to D) in my div. How can I do this?. Edit: Here is my CSS: _x000D_ _x000D_ #index-03 {_x000D_ position: a..

How to run sql script using SQL Server Management Studio?

I have been following this tutorial: http://www.misfitgeek.com/2010/07/adding-asp-net-membership-to-your-own-database/ I have installed SQL Server Management Studio Express from here: http://www.micr..

enumerate() for dictionary in python

I know we use enumerate for iterating a list but I tried it in a dictionary and it didn't give an error. CODE: enumm = {0: 1, 1: 2, 2: 3, 4: 4, 5: 5, 6: 6, 7: 7} for i, j in enumerate(enumm): p..

Change default text in input type="file"?

I want to change default text on button that is "Choose File" when we use input="file". How can I do this? Also as you can see in image button is on left side of text. How can I put it on right sid..

How to set IntelliJ IDEA Project SDK

I just installed IntelliJ IDEA and when I try to create my first Project it asks for me to set up the Project SDK. When I click on "JDK" it asks for me to select the home directory of the JDK as shown..

Android Material and appcompat Manifest merger failed

I have next grade dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.android.support:appcompat-v7:28.0.0-rc01' implementation 'com.android.su..

select unique rows based on single distinct column

I want to select rows that have a distinct email, see the example table below: +----+---------+-------------------+-------------+ | id | title | email | commentname | +----+---------+--..

Service located in another namespace

I have been trying to find a way to define a service in one namespace that links to a Pod running in another namespace. I know that containers in a Pod running in namespaceA can access serviceX defin..

SmtpException: Unable to read data from the transport connection: net_io_connectionclosed

I am using the SmtpClient library to send emails using the following: SmtpClient client = new SmtpClient(); client.Host = "hostname"; client.Port = 465; client.DeliveryMethod = SmtpDeliveryMethod.Net..

Which variable size to use (db, dw, dd) with x86 assembly?

I am a beginner to assembly and I don't know what all the db, dw, dd, things mean. I have tried to write this little script that does 1+1, stores it in a variable and then displays the result. Here is..

How do I write a Windows batch script to copy the newest file from a directory?

I need to copy the newest file in a directory to a new location. So far I've found resources on the forfiles command, a date-related question here, and another related question. I'm just having a bit ..