Questions Tagged with #Rtx

No provider for HttpClient

After upgrading from angular 4.4 to 5.0 and after updating all HttpModule and Http to HttpClientModule I started to get this error. I also added HttpModule again to be sure it's not due to some depe..

$(...).datepicker is not a function - JQuery - Bootstrap

I'm trying to include the datepicker for Bootstrap but am getting the following error: Uncaught TypeError: $(...).datepicker is not a function I don't see why it's there. I've looked at other cases ..

Forward X11 failed: Network error: Connection refused

I have a VPS which OS is CentOS6.3. I want to run startx via PuTTY and Xming. But, it produces this error: PuTTY X11 proxy: unable to connect to forwarded X server: Network error: Connection refused..

What are the integrity and crossorigin attributes?

Bootstrapcdn recently changed their links. It now looks like this: <link href="" rel="stylesheet" integrity="sha256-MfvZlkHCE..

Jquery Validate custom error message location

This looks very simply, but I can't figure it out. I'm using the jquery validate plugin. I'm trying to validate <input name=first> and <input name=second> to output the error messages into..

Touch move getting stuck Ignored attempt to cancel a touchmove

I'm messing around with touch events on a touch slider and I keep getting the following error: Ignored attempt to cancel a touchmove event with cancelable=false, for example because scrolling i..

How to query values from xml nodes?

i have a table that contains an XML column: CREATE TABLE Batches( BatchID int, RawXml xml ) The xml contains items such as: <GrobReportXmlFileXmlFile> <GrobReport> &l..

RSA Public Key format

Where can i find some documentation on the format of an RSA public key? An RSA public key formatted by OpenSSH: ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQB/nAmOjTmezNUDKYvEeIRf2YnwM9/uUG1d0BYsc8/tRtx+RGi..

SQLException: No suitable Driver Found for jdbc:oracle:thin:@//localhost:1521/orcl

I am trying to develop a Java EE application that connect to an Oracle database from eb service class but I encounter a SQLException: No suitable driver found for jdbc:oracle:thin:@//localhost:1521/..

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

xls to csv converter

I am using win32.client in python for converting my .xlsx and .xls file into a .csv. When I execute this code it's giving an error. My code is: def convertXLS2CSV(aFile): '''converts a MS Excel f..

How to receive POST data in django

I've been trying to integrate a payment gateway into my site in django. I'm having trouble getting the response data from the payment gateway. The payment gateway has sample docs for php which looks ..

How to fix "namespace x already contains a definition for x" error? Happened after converting to VS2010

Specifically the error occurs in the Resources.Designer.cs: Error 2 The namespace 'ModulusFE' already contains a definition for 'StockChartX' Resources.Designer.cs 11 21 ModulusFE.StockCha..

what does this mean ? image/png;base64?

I don't know what we call this. but i found a image at google 404 url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKsAAADVCAMAAAAfHvCaAAAAGFBMVEVYn%2BH%2F%2F%2F%2Bex%2B3U5vd7s%2Bfq8%2Fs0itq72PMLUP..

Bash: infinite sleep (infinite blocking)

I use startx to start X which will evaluate my .xinitrc. In my .xinitrc I start my window manager using /usr/bin/mywm. Now, if I kill my WM (in order to f.e. test some other WM), X will terminate too ..

Opening PDF String in new window with javascript

I have a formatted PDF string that looks like %PDF-1.73 0 obj<<< /Type /Group /S /Transparency /CS /DeviceRGB >> /Resources 2 0 R/Contents 4 0 R>> endobj4 0 obj<> streamx?..

How to do a JUnit assert on a message in a logger

I have some code-under-test that calls on a Java logger to report its status. In the JUnit test code, I would like to verify that the correct log entry was made in this logger. Something along the fol..

disable textbox using jquery?

I have three radio buttons with same name and different values.When I click the third radio button the checkbox and textbox going to be disabled.but when I choose other two radio buttons it must be sh..

Server did not recognize the value of HTTP Header SOAPAction

[SoapRpcMethod(Action = "http://cyberindigo/TempWebService/InsertXML", RequestNamespace = "http://cyberindigo/TempWebService/Request", RequestElementName = "InsertXMLRequest", ResponseN..

CSS class for pointer cursor

Is there any CSS class or attribute for pointer:cursor in Bootstrap 4 specially for button or link? _x000D_ _x000D_ <link href="

How to get text in QlineEdit when QpushButton is pressed in a string?

I am trying to implement a function. My code is given below. I want to get the text in lineedit with objectname 'host' in a string say 'shost' when the user clicks the pushbutton with name 'connect'...

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

How to split (chunk) a Ruby array into parts of X elements?

I have an array foo = %w(1 2 3 4 5 6 7 8 9 10) How can I split or "chunk" this into smaller arrays? class Array def chunk(size) # return array of arrays end end foo.chunk(3) # => [[1,2..

Hide all elements with class using plain Javascript

I normally use document.getElementById('id').style.display = 'none' to hide a single div via Javascript. Is there a similarly simple way to hide all elements belonging to the same class? I need a pla..

Constructing pandas DataFrame from values in variables gives "ValueError: If using all scalar values, you must pass an index"

This may be a simple question, but I can not figure out how to do this. Lets say that I have two variables as follows. a = 2 b = 3 I want to construct a DataFrame from this: df2 = pd.DataFrame({'A..

Setting the selected attribute on a select list using jQuery

I have the following HTML: <select id="dropdown"> <option>A</option> <option>B</option> <option>C</option> </select> I have the string "B..

How to style an menu with CSS

I'm in the process of styling an menu and I'm trying to understand the meaning of the StaticSelectedStyle-CssClass and StaticHoverStyle-CssClass parameters. My understanding is that the style..

PHP convert string to hex and hex to string

I got the problem when convert between this 2 type in PHP. This is the code I searched in google function strToHex($string){ $hex=''; for ($i=0; $i < strlen($string); $i++){ $hex ...

How to insert double and float values to sqlite?

Following is my db creation code. @Override public void onCreate(SQLiteDatabase db) { db.execSQL("CREATE TABLE " + TABLE_NAME + " (" + _ID + " INTEGER PRIMARY KEY AUTOINC..

How to use log levels in java

I am developing an application where i need to use the logger functionality. I have read about different levels of logger which are: SEVERE (highest) WARNING INFO CONFIG FINE FINER FINEST I am no..

Convert Map<String,Object> to Map<String,String>

How can I convert Map<String,Object> to Map<String,String> ? This does not work: Map<String,Object> map = new HashMap<String,Object>(); //Object is containing String Map<..

Detect if HTML5 Video element is playing

I've looked through a couple of questions to find out if an HTML5 element is playing, but can't find the answer. I've looked at the W3 documentation and it has an event named "playing" but I can't see..

PHP Echo text Color

How do I change the color of an echo message and center the message in the PHP I've written. The line I have is: echo 'Request has been sent. Please wait for my reply!';..

Set value of textbox using JQuery

My Jade template - input#main_search.span2( style = 'height: 26px; width: 800px;' , type = 'text', readonly='true', name='searchBar', value='test' ) JS file - $('#searchBar')..

How to validate a form with multiple checkboxes to have atleast one checked

I'm trying to validate a form using the validate plugin for jquery. I want to require that the user check at least one checkbox in a group in order for the form to be submitted. Here's my jquery co..

HTML Table cellspacing or padding just top / bottom

Can you have cellpadding or spacing just on the top/ bottom as opposed to all (T, B, L, R) ?..

Get index of a key in json

I have a json like so: json = { "key1" : "watevr1", "key2" : "watevr2", "key3" : "watevr3" } Now, I want to know the index of a key, say "key2" in json - which is 1. Is there a way? ..

How to know the size of the string in bytes?

I'm wondering if I can know how long in bytes for a string in C#, anyone know?..

Undefined reference to pow( ) in C, despite including math.h

Possible Duplicate: Problem using pow() in C what is 'undefined reference to `pow'' I'm having a bit of an issue with a simple piece of coursework for uni that's really puzzli..

Correct owner/group/permissions for Apache 2 site files/folders under Mac OS X?

It's hard to find Mac-specific answers to this question on the web, so I'm hoping someone out there can put this one to rest for me? My permissions are screwed up on my sites and I'm not sure how to f..

change Oracle user account status from EXPIRE(GRACE) to OPEN

After getting the message Your password will be expired with in 7 days, I changed the password expire days of the default profile to UNLIMITED. But the account status of some users are still remaining..

How do I append text to a file?

What is the easiest way to append text to a file in Linux? I had a look at this question, but the accepted answer uses an additional program (sed) I'm sure there should be an easier way with echo or ..

Jquery $.ajax fails in IE on cross domain calls

I am doing a cross domain request using $.ajax. It works on Firefox and Chrome, but does not issue a call on IE 7 or 8. Can anyone tell me what's wrong with the following? I have used JSON and JSONP ..

Method to Add new or update existing item in Dictionary

In some legacy code i have see the following extension method to facilitate adding a new key-value item or updating the value, if the key already exists. Method-1 (legacy code). public static void C..

subsetting a Python DataFrame

I am transitioning from R to Python. I just began using Pandas. I have an R code that subsets nicely: k1 <- subset(data, Product = & Month < mn & Year == yr, select = c(Time, Produ..

How to search a string in multiple files and return the names of files in Powershell?

I have started learning powershell a couple of days ago, and I couldn't find anything on google that does what I need so please bear with my question. I have been asked to replace some text strings i..

Pytorch reshape tensor dimension

For example, I have 1D vector with dimension (5). I would like to reshape it into 2D matrix (1,5). Here is how I do it with numpy >>> import numpy as np >>> a = np.array([1,2,3,4,5..

Error : getaddrinfo ENOTFOUND

I am working on a corporate network. Trying to install npm. But I'm getting this error again and again. $ npm install npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\\Program Files\\nodejs\\node.exe..

How to change the font size and color of x-axis and y-axis label in a scatterplot with plot function in R?

I used the following code to draw a scatterplot. How to increase the font size and change colour of x-axis and y-axis label? data=read.csv("data.csv") plot(data$column1,data$column2,xlab="x axis", ..

Get month name from Date

How can I generate the name of the month (e.g: Oct/October) from this date object in JavaScript? var objDate = new Date("10/11/2009"); ..

How do I calculate the percentage of a number?

I would like to calculate, in PHP, the percentage of a number. For example: $percentage = 50; $totalWidth = 350; For this example, 50% of 350 = 175 How can I do that?..

How do I check if a C++ std::string starts with a certain string, and convert a substring to an int?

How do I implement the following (Python pseudocode) in C++? if argv[1].startswith('--foo='): foo_value = int(argv[1][len('--foo='):]) (For example, if argv[1] is --foo=98, then foo_value is 98..

socket.error: [Errno 10013] An attempt was made to access a socket in a way forbidden by its access permissions

I'm trying to create a custom TCP stack using Python 2.6.5 on Windows 7 to serve valid http page requests on port 80 locally. But, I've run into a snag with what seems like Windows 7 tightened up sec..

How to get Javascript Select box's selected text

This things works perfectly <select name="selectbox" onchange="alert(this.value)"> But I want to select the text. I tried in this way <select name="selectbox" onchange="alert(this.text)"..

How to import data from one sheet to another

I have two different work sheets in excel with the same headings in in all the row 1 cells(a1 = id, b1 = name, c1 = price). My question is, is there a way to import data(like the name) from 1 workshee..

Errno 13 Permission denied Python

In python, I am currently experimenting with what I can do with open command. I tried to open a file, and got an error message. Here's my code: open(r'C:\Users\****\Desktop\File1') My error message..

How to remove "disabled" attribute using jQuery?

I have to disable inputs at first and then on click of a link to enable them. This is what I have tried so far, but it doesn't work. HTML: <input type="text" disabled="disabled" class="inputDisa..

How to strip HTML tags from string in JavaScript?

How can I strip the HTML from a string in JavaScript?..

How to drop all tables in a SQL Server database?

I'm trying to write a script that will completely empty a SQL Server database. This is what I have so far: USE [dbname] GO EXEC sp_msforeachtable 'ALTER TABLE ? NOCHECK CONSTRAINT all' EXEC sp_msfore..

Difference between session affinity and sticky session?

What is the difference between session affinity and sticky session in context of load balancing servers? ..

How to add element in List while iterating in java?

Say I have a List like: List<String> list = new ArrayList<>(); list.add("a"); list.add("h"); list.add("f"); list.add("s"); While iterating through this list I want to add an element at ..


I'm trying to upload an image via the Django admin and then view that image either in a page on the frontend or just via a URL. Note this is all on my local machine. My settings are as follows: MED..

setState() inside of componentDidUpdate()

I'm writing a script which moves dropdown below or above input depending on height of dropdown and position of the input on the screen. Also I want to set modifier to dropdown according to its directi..

Toggle Checkboxes on/off

I have the following: $(document).ready(function() { $("#select-all-teammembers").click(function() { $("input[name=recipients\\[\\]]").attr('checked', true); }); }); ..

How to implement zoom effect for image view in android?

I have to implement image zooming, I have tried with so many codes.But i didnt get full idea of gesture events. I want to implement when we apply double tap, image will be zooming according to the tou..

Query EC2 tags from within instance

Amazon recently added the wonderful feature of tagging EC2 instances with key-value pairs to make management of large numbers of VMs a bit easier. Is there some way to query these tags in the same wa..

Draw in Canvas by finger, Android

I need to build a project for drawing on canvas by fingers, to get the touch event and motion event of my finger, and thence draw. Any one can advice me how to get start in project, and what is bes..

Reading a text file in MATLAB line by line

I have a CSV file, I want to read this file and do some pre-calculations on each row to see for example that row is useful for me or not and if yes I save it to a new CSV file. can someone give me an..

Work on a remote project with Eclipse via SSH

I have the following boxes: A Windows box with Eclipse CDT, A Linux box, accessible for me only via SSH. Both the compiler and the hardware required to build and run my project is only on machin..

This Handler class should be static or leaks might occur: IncomingHandler

I'm developing an Android 2.3.3 application with a service. I have this inside that service to communicate with Main activity: public class UDPListenerService extends Service { private static fin..

Dynamic LINQ OrderBy on IEnumerable<T> / IQueryable<T>

I found an example in the VS2008 Examples for Dynamic LINQ that allows you to use a sql-like string (e.g. OrderBy("Name, Age DESC")) for ordering. Unfortunately, the method included only works on IQue..

ALTER TABLE add constraint

CREATE TABLE Properties ( ID int AUTO_INCREMENT, language int, stonecolor int, gamefield int, UserID int, PRIMARY KEY(ID), FOREIGN KEY(language) REFERENCES Language(ID), ..

How do I divide in the Linux console?

I have to variables and I want to find the value of one divided by the other. What commands should I use to do this?..

'Incomplete final line' warning when trying to read a .csv file into R

I'm trying to read a .csv file into R and upon using this formula: pheasant<-read.table(file.choose(),header=TRUE,sep=",") I get this warning message: "incomplete final line found by readTableH..

Android studio doesn't list my phone under "Choose Device"

Just starting out with Android development; have a Nexus 5 bought in Japan, but with English version of android (presumably shouldn't matter). I installed Android Studio on Windows 8.1 to try making a..

How to find if a native DLL file is compiled as x64 or x86?

I want to determine if a native assembly is complied as x64 or x86 from a managed code application (C#). I think it must be somewhere in the PE header since the OS loader needs to know this informati..

MongoDB: How to find the exact version of installed MongoDB

I have mongoDB 3.2 installed locally for Windows 7. I would like to find out its specific version (like is it 3.2.1, or 3.2.3 or...). How could I find it? If I open the database shell (mongo.exe), I c..

Amazon S3 upload file and get URL

Is it possible to upload a txt/pdf/png file to Amazon S3 in a single action, and get the uploaded file URL as the response? If so, is AWS Java SDK the right library that I need to add in my java strut..

Why does 2 mod 4 = 2?

I'm embarrassed to ask such a simple question. My term does not start for two more weeks so I can't ask a professor, and the suspense would kill me. Why does 2 mod 4 = 2?..

How do I redirect with JavaScript?

How do you redirect to a page from another page with JavaScript?..

What is the difference between conversion specifiers %i and %d in formatted IO functions (*printf / *scanf)

What is the difference between %d and %i when used as format specifiers in printf and scanf?..

Concatenating variables in Bash

stupid question no doubt, I'm trying to add a variable to the middle of a variable, so for instance in PHP i would do this: $mystring = $arg1 . '12' . $arg2 . 'endoffile'; so the output might be 20..

Conditionally change img src based on model data

I want to represent model data as different images using Angular but having some trouble finding the "right" way to do it. The Angular API docs on expressions say that conditional expressions are not..

How to access session variables from any class in ASP.NET?

I have created a class file in the App_Code folder in my application. I have a session variable Session["loginId"] I want to access this session variables in my class, but when I am writing the fo..

C# try catch continue execution

I have a question that might seem fairly simple (of course if you know the answer). A certain function I have calls another function but I want to continue execution from the caller even though the c..

How to read a .properties file which contains keys that have a period character using Shell script

I am trying to read a properties file from a shell script which contains a period (.) character like below: # db.uat.user=saple user db.uat.passwd=secret #/bin/sh function pause(){ ..

"The page has expired due to inactivity" - Laravel 5.5

My register page is showing the form properly with CsrfToken ({{ csrf_field() }}) present in the form). Form HTML <form class="form-horizontal registration-form" novalidate method="POST" action="..

Adding :default => true to boolean in existing Rails column

I've seen a few questions (namely this one) here on SO about adding a default boolean value to an existing column. So I tried the change_column suggestion but I mustn't be doing it right. I tried: $..

How to identify whether a grammar is LL(1), LR(0) or SLR(1)?

How do you identify whether a grammar is LL(1), LR(0), or SLR(1)? Can anyone please explain it using this example, or any other example? X ? Yz | a Y ? bZ | e Z ? e ..

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

How do I change the color of radio buttons?

I mean, a radio button itself consists of a round shape and a dot at the center (when the button is selected). What I want to change is the color of both. Can this be done using CSS? ..

Webview load html from assets directory

I'm trying to load a html page from the assets directory. I tried this, but it fails. public class ViewWeb extends Activity { @Override public void onCreate(Bundle savedInstanceState) { ..

How to POST raw whole JSON in the body of a Retrofit request?

This question may have been asked before but no it was not definitively answered. How exactly does one post raw whole JSON inside the body of a Retrofit request? See similar question here. Or is this..

Converts scss to css

Does anyone know how can I convert this code to standard css? It's not working in their editor.

read complete file without using loop in java

Possible Duplicate: How to create a Java String from the contents of a file Whole text file to a String in Java I am trying to read the contents of a file using FileReader . But i want to..

How to format html table with inline styles to look like a rendered Excel table?

I'm currently stuck setting borders in an html table. (I use inline styles for a better rendering in e-mail-clients) I have this piece of code: <html> <body> <table style="..

How to Lazy Load div background images

As many of you know it is widely used to lazy load images. Now i want to use this as lazy load div background images. How can i do that ? I am currently able to use

Eclipse - Failed to load class "org.slf4j.impl.StaticLoggerBinder"

Possible Duplicate: SLF4J: Failed to load class org.slf4j.impl.StaticLoggerBinder error I am using eclipse juno to run someone's else Java code using maven(m2eclipse plugin). But I am getti..

How to add an element to Array and shift indexes?

I need to add an element to Array specifying position and value. For example, I have Array int []a = {1, 2, 3, 4, 5, 6}; after applying addPos(int 4, int 87) it should be int []a = {1, 2, 3, 4, 87..

Build Step Progress Bar (css and jquery)

You've seen iterations of this type of progress bar on sites like paypal. How does one go about setting this up using CSS and jquery? I have 4 pages and each page is a step... so 4 steps...

What XML parser should I use in C++?

I have XML documents that I need to parse and/or I need to build XML documents and write them to text (either files or memory). Since the C++ standard library does not have a library for this, what sh..

Import Excel Data into PostgreSQL 9.3

I've developed a huge table in excel and now facing problem in transferring it into the postgresql database. I've downloaded the odbc software and I'm able to open table created in postgresql with exc..

facet label font size

Is there a way to change the font size of facet labels in ggplot? I googled and found that the issue was yet on Hadley's to-do list. I wonder if there is a workaround or any news on this issue?..

Is there a concise way to iterate over a stream with indices in Java 8?

Is there a concise way to iterate over a stream whilst having access to the index in the stream? String[] names = {"Sam","Pamela", "Dave", "Pascal", "Erik"}; List<String> nameList; Stream<I..

Deleting row from datatable in C#

I'm having a problem deleting rows from a datatable. In my program, I am reading info from a database into a datatable using an sql query. I use an oledb connection and the code dt.Load(command.Execut..

Converting a JS object to an array using jQuery

My application creates a JavaScript object, like the following: myObj= {1:[Array-Data], 2:[Array-Data]} But I need this object as an array. array[1]:[Array-Data] array[2]:[Array-Data] So I trie..

How to get next/previous record in MySQL?

Say I have records with ID 3,4,7,9 I want to be able to go from one to another by navigation via next/previous links. The problem is, that I don't know how to fetch record with nearest higher ID. So w..

Docker: Copying files from Docker container to host

I'm thinking of using Docker to build my dependencies on a Continuous Integration (CI) server, so that I don't have to install all the runtimes and libraries on the agents themselves. To achieve thi..

How should I escape strings in JSON?

When creating JSON data manually, how should I escape string fields? Should I use something like Apache Commons Lang's StringEscapeUtilities.escapeHtml, StringEscapeUtilities.escapeXml, or should I us..

Php, wait 5 seconds before executing an action

I have a .php script that I use for creating the list of my products. I am on shared hosting, so I can't do a lot of queries otherwise I get a blank page. This is how I use my script now: script.php..

Android Lint contentDescription warning

I am getting warning as "[Accessibility] Missing contentDescription attribute on image" for imageview. while using android lint What does that mean?..

Python - IOError: [Errno 13] Permission denied:

I'm getting IOError: [Errno 13] Permission denied and I don't know what is wrong wit this code. I'm trying to read a file given an absolute path (meaning only file.asm), and a relative path (meaning..

PHP case-insensitive in_array function

Is it possible to do case-insensitive comparison when using the in_array function? So with a source array like this: $a= array( 'one', 'two', 'three', 'four' ); The following lookups would all..

How to merge two arrays of objects by ID using lodash?

I have two array with one common field member. how can I merge theme easily? For example: var arr1 = [{ "member" : ObjectId("57989cbe54cf5d2ce83ff9d6"), "bank" : ObjectId("575b052ca6f66a5732749e..

How can I move a tag on a git branch to a different commit?

I created a tag on the master branch called v0.1 like this: git tag -a v0.1 But then I realized there were still some changes I needed to merge into master for release 0.1, so I did that. But now m..

Best practice: PHP Magic Methods __set and __get

Possible Duplicate: Are Magic Methods Best practice in PHP? These are simple examples, but imagine you have more properties than two in your class. What would be best practice? a) Using _..

Android check permission for LocationManager

I'm trying to get the GPS coordinates to display when I click a button in my activity layout. The following is the method that gets called when I click the button: public void getLocation(View view) ..

Could not load file or assembly 'Newtonsoft.Json, Version=, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies

I have a WinJS project that is previously built on Windows 8.1 using VS 2013. Recently I upgraded this project to Universal Windows 10 by creating a blank Javascript Universal windows 10 project and..

How to call Stored Procedure in Entity Framework 6 (Code-First)?

I am very new to Entity Framework 6 and I want to implement stored procedures in my project. I have a stored procedure as follows: ALTER PROCEDURE [dbo].[insert_department] @Name [varchar](100) A..

Changing Fonts Size in Matlab Plots

I want to change Font Size for xlabel, ylabel, axis size, legend font size a.k.a everything at once, is this possible? By default, font is Helvetica 10. Is there way to change this? I want to ..

Insert picture into Excel cell

I'm tying to generate a report with pictures, but I cannot get the pictures into a single cell. I can get the pictures to "float" around my worksheet, but I need to put them into a cell. How can I do ..

How to enable mbstring from php.ini?

I have real difficulties with enabling mbstring extension on my localhost. I'm using XAMPP 1.7.4, for Windows, which has PHP 5.3.5, and tried to edit my php.ini file according to the documentation a..

Does Git Add have a verbose switch

I am in the process of moving all my private an public repo's over to github. One of the decisions I have made is to only use the console as it means a smaller tooling footprint if I ever need to chan..

PKIX path building failed: unable to find valid certification path to requested target

I am calling some HTTPS web service which the following Client: import; import; import; import; import ja..

Regex Named Groups in Java

It is my understanding that the java.regex package does not have support for named groups ( so can anyone point me towards a third-party library that doe..

Python Checking a string's first and last character

can anyone please explain what is wrong with this code? str1='"xxx"' print str1 if str1[:1].startswith('"'): if str1[:-1].endswith('"'): print "hi" else: print "condition fail..

ListBox with ItemTemplate (and ScrollBar!)

I have a databound and itemtemplated ListBox: <ListBox x:Name="lbLista" ScrollViewer.VerticalScrollBarVisibility="Visible"> <ListBox.ItemTemplate> <DataTemplate>..

Simple way to unzip a .zip file using zlib

Is there a simple example of how to unzip a .zip file and extract the files to a directory? I am currently using zlib, and while I understand that zlib does not directly deal with zip files, there see..

Does VBA have Dictionary Structure?

Does VBA have dictionary structure? Like key<>value array? ..

How to convert a "dd/mm/yyyy" string to datetime in SQL Server?

I tried this SELECT convert(datetime, '23/07/2009', 111) but got this error The conversion of a varchar data type to a datetime data type resulted in an out-of-range value. However SELECT convert..

How to restart adb from root to user mode?

Basic question on ADB. adb root restarts adb as root. But what i want is to restart it back to user after some time. I tried the following : adb kill-server adb start-server doesnt work.. ps -A ..

mysqldump exports only one table

I was using mysqldump to export the database, like this: mysqldump -u root -ppassword my_database > c:\temp\my_database.sql Somehow, it only exports one table. Is there something I'm doing wrong..

Passing data to components in vue.js

I'm struggling to understand how to pass data between components in vue.js. I have read through the docs several times and looked at many vue related questions and tutorials, but I'm still not getti..

How to test if a double is an integer

Is it possible to do this? double variable; variable = 5; /* the below should return true, since 5 is an int. if variable were to equal 5.7, then it would return false. */ if(variable == int) { ..

Calling a php function by onclick event

I am trying to call a function by "onclick" event of the button. When I do that it shows error message. Can anybody help me out on this so that when I click on the button it should call the function a..

Check array position for null/empty

I have an array which might contain empty/null positions (e.g: array[2]=3, array[4]=empty/unassigned). I want to check in a loop whether the array position is null. array[4]==NULL //this doesn't wor..

paint() and repaint() in Java

I've spent maybe the last two hours browsing and reading up on these methods and the Graphics class, and maybe I'm stupid, haha, but I'm just not understanding them. What are they for? I understand th..

git pull keeping local changes

How can I safely update (pull) a git project, keeping specific files untouched, even if there's upstream changes? myrepo/config/config.php Is there a way, of, even if this file was being changed on ..

How to make a redirection on page load in JSF 1.x

I have a web-application where the users can be sent directly to some specific pages (such as a page where he can view or edit an item). To achieve that, we provide a specific url. These urls are loca..

How to get POST data in WebAPI?

I'm sending a request to server in the following form: http://localhost:12345/api/controller/par1/par2 The request is correctly resolved to a method like: [HttpPost] public void object Post(string..

How do I trap ctrl-c (SIGINT) in a C# console app

I would like to be able to trap CTRL+C in a C# console application so that I can carry out some cleanups before exiting. What is the best way of doing this?..

Running an executable in Mac Terminal

I just made a .c file and compiled it with gcc in the terminal on OS X 10.8.2. My syntax was gcc -o <filename> <sourcefile> and that was fine. Now I see I have an executable and file <..

How to dynamically create a class?

I have a class which looks like this: public class Field { public string FieldName; public string FieldType; } And an object List<Field> with values: {"EmployeeID","int"}, {"Employee..

Only on Firefox "Loading failed for the <script> with source"

I want to integrate Marketo form with my existing website on yii framework. My code works on all the browsers except Firefox. Excerpt from my code: $('#button').click(function () { var formD..

Adjust width and height of iframe to fit with content in it

I need a solution for auto-adjusting the width and height of an iframe to barely fit its content. The point is that the width and height can be changed after the iframe has been loaded. I guess I need..

How to get and set the current web page scroll position?

How can I get and set the current web page scroll position? I have a long form which needs to be refreshed based on user actions/input. When this happens, the page resets to the very top, which is a..

How do I properly 'printf' an integer and a string in C?

I have the following code: char *s1, *s2; char str[10]; printf("Type a string: "); scanf("%s", str); s1 = &str[0]; s2 = &str[2]; printf("%s\n", s1); printf("%s\n", s2); When I run the co..

How to $http Synchronous call with AngularJS

Is there any way to make a synchronous call with AngularJS? The AngularJS documentation is not very explicit or extensive for figuring out some basic stuff. ON A SERVICE: myService.getByID = functi..

Custom designing EditText

I have custom designed EditText search_page.xml <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:p..

Create a Dropdown List for MVC3 using Entity Framework (.edmx Model) & Razor Views && Insert A Database Record to Multiple Tables

After reading 100's of articles on here about how to create a DropDown List in MVC 3 with Razor Views, I could not find one that fit my case. Situation: I am ultimately trying to create a View to Add..

Unit tests vs Functional tests

What is the difference between unit tests and functional tests? Can a unit test also test a function?..

What are the pros and cons of parquet format compared to other formats?

Characteristics of Apache Parquet are : Self-describing Columnar format Language-independent In comparison to Avro, Sequence Files, RC File etc. I want an overview of the formats. I have already ..

Trying to SSH into an Amazon Ec2 instance - permission error

This is probably a stupidly simple question to some :) I've created a new linux instance on Amazon EC2, and as part of that downloaded the .pem file to allow me to SSH in. When I tried to ssh with:..

Multiple FROMs - what it means

I want to build a docker image for the Linkurious project on github, which requires both the Neo4j database, and Node.js to run. my first approach was to declare a base image for my image, containing..

Is there a method that calculates a factorial in Java?

I didn't find it, yet. Did I miss something? I know a factorial method is a common example program for beginners. But wouldn't it be useful to have a standard implementation for this one to reuse? I ..

Validate phone number with JavaScript

I found this code in some website, and it works perfectly. It validates that the phone number is in one of these formats: (123) 456-7890 or 123-456-7890 The problem is that my client (I don't know ..

Escape double quotes in Java

Possible Duplicate: In Java, is there a way to write a string literal without having to escape quotes? private static final String CREATE_TABLE_EXHIBITORS = "CREATE TABLE "users" ("_id" tex..

How to make a query with group_concat in sql server

I know that in sql server we cannot use Group_concat function but here is one issue i have in which i need to Group_Concat my query.I google it found some logic but not able to correct it.My sql query..

How do you scroll up/down on the console of a Linux VM

I recognize that Up/Down will give you the command history. But, how do you look at past output by scrolling up and down? I have used Shift+Page Up/Page Down, Alt+Shift+Up/Down and Page Up/Page Down ..

git: fatal: Could not read from remote repository

I am trying to set git up with to manage my site. I have gotten to the last step in the instructions: git push website +master:refs/heads/master I am wo..

"The system cannot find the file specified"

I saw many questions on SO with this error. But none were related to forms. I just hosted my application server after testing locally. I think it worked for a few mins but I'm not sure as I may have l..

How do I dynamically change the content in an iframe using jquery?

I was wondering if it is possible to have a site with an iframe and some jquery code that changes the iframe content every 30 seconds. The content is in different webpages. Something like this: <..

What is a "web service" in plain English?

I've been reading about "web services" here on SO, on Wikipedia, Google, etc., and I don't quite understand what they are. What is the plain English definition/description? If I make a simple websit..

Auto-expanding layout with Qt-Designer

I'm using the Qt Designer. I want to create a QVBoxLayout which will automatically expand to fill the whole window. The layout of the QVBoxLayout remains fixed. How can I cause the QVBoxLayout to e..

How to customize the back button on ActionBar

I have been able to customize the action bar's background, logo image and text color using suggestions from these: Android: How to change the ActionBar "Home" Icon to be something other than..

String Concatenation using '+' operator

Looking at the string class metadata, I only see the operators == and != overloaded. So how is it able to perform concatenation for the '+' operator? Edit: Some interesting notes from Eric Lippert ..

ErrorActionPreference and ErrorAction SilentlyContinue for Get-PSSessionConfiguration

My case: $ErrorActionPreference = "Stop"; "1 - $ErrorActionPreference;" Get-ChildItem NoSuchFile.txt -ErrorAction SilentlyContinue; "2 - $ErrorActionPreference;" Get-ChildItem NoSuchFile.txt -ErrorAc..

DataTables fixed headers misaligned with columns in wide tables

Problem When using the sScrollX, sScrollXInner and/or sScrollY to achieve a fixed header table with its inner content scrolling, the headers of the table go out of alignment with the rest of the body..

How to set a fixed width column with CSS flexbox

CodePen: I want the red box to be only 25 em wide when it's in the side-by-side view - I'm trying to achieve this by setting the CSS inside this media query: @medi..

Android - how to make a scrollable constraintlayout?

I want to make a layout that lets me scroll down using constraint layout, but I don't know how to go about it. Should the ScrollView be the parent of the ConstraintLayout like this? <?xml version=..

How do you tell if caps lock is on using JavaScript?

How do you tell if caps lock is on using JavaScript? One caveat though: I did google it and the best solution I could find was to attach an onkeypress event to every input, then check each time if th..

Error:(1, 0) Plugin with id '' not found

This is my first attempt at Android Studio. I installed 0.8.0 and updated to 0.8.2. As soon as a project is created I get the error message: Error:(1, 0) Plugin with id ''..

Print the address or pointer for value in C

I want to do something that seems fairly simple. I get results but the problem is, I have no way to know if the results are correct. I'm working in C and I have two pointers; I want to print the cont..

How to determine the current shell I'm working on

How can I determine the current shell I am working on? Would the output of the ps command alone be sufficient? How can this be done in different flavors of Unix?..

Could not load the Tomcat server configuration

I have installed apache tomcat7 using sudo apt get in ubuntu. I have added apache tomcat 7 to eclipse using Windows > Preferences > Server > Runtime Environment.But when I'm starting the server from s..

Concatenate a vector of strings/character

If I have a vector of type character, how can I concatenate the values into string? Here's how I would do it with paste(): sdata = c('a', 'b', 'c') paste(sdata[1], sdata[2], sdata[3], sep ='') yiel..

how to always round up to the next integer

i am trying to find total pages in building a pager on a website (so i want the result to be an integer. i get a list of records and i want to split into 10 per page (the page count) when i do this:..

How to embed a PDF viewer in a page?

If I'm not mistaken, Google Docs offers the means to display a PDF that is stored on the same server as the web page via an <iframe>, but I need to know how I can do this in a cross-browser comp..

How to resize an Image C#

As Size, Width and Height are Get() properties of System.Drawing.Image; How can I resize an Image object at run-time in C#? Right now, I am just creating a new Image using: // objImage is the origin..

Sass nth-child nesting

I'm refactoring these CSS selectors over to Sass: #romtest .detailed th:nth-child(2), #romtest .detailed th:nth-child(4), #romtest .detailed th:nth-child(6), #romtest .detailed td:nth-child(2), #romt..

Make div fill remaining space along the main axis in flexbox

I have 2 divs side-by-side in a flexbox. The right hand one should always be the same width, and I want the left hand one to just grab the remaining space. But it won't unless I specifically set its w..

Finding three elements in an array whose sum is closest to a given number

Given an array of integers, A1, A2, ..., An, including negatives and positives, and another integer S. Now we need to find three different integers in the array, whose sum is closest to the given inte..

Insert content into iFrame

I am trying to insert some content into a 'blank' iFrame, however nothing is being inserted. HTML: <iframe id="iframe"></iframe> JS: $("#iframe").ready(function() { var $doc = $("..

How to remove all whitespace from a string?

So " xx yy 11 22 33 " will become "xxyy112233". How can I achieve this?..

Trying to git pull with error: cannot open .git/FETCH_HEAD: Permission denied

Help me please, I am trying to run this in my terminal: asgard@asgard-A7N8X2-0:~/CollegePortal$ git pull error: cannot open .git/FETCH_HEAD: Permission denied Then I try this one asgard@asgard-A7N..

warning about too many open figures

In a script where I create many figures with fix, ax = plt.subplots(...), I get the warning RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (matplot..

Key Listeners in python?

Is there a way to do key listeners in python without a huge bloated module such as pygame? An example would be, when I pressed the a key it would print to the console The a key was pressed! It..

How to pass in parameters when use resource service?

A very rookie-ish question: I'm trying to build resource object using factory method: .factory('Magazines', [function ($resource) { var url = document.URL; var urlArray = url.split("/"); ..

How to use SVG markers in Google Maps API v3

Can I use my converted image.svg as google map icon. I was converting my png image to svg and I want to use this like google map symbol that can be rotated. I already tried to use the google map symbo..

Most concise way to test string equality (not object equality) for Ruby strings or symbols?

I always do this to test string equality in Ruby: if mystring.eql?(yourstring) puts "same" else puts "different" end Is this is the correct way to do this without testing object equality? I'm lo..

In PowerShell, how can I test if a variable holds a numeric value?

In PowerShell, how can I test if a variable holds a numeric value? Currently, I'm trying to do it like this, but it always seems to return false. add-type -Language CSharpVersion3 @' public clas..

Converting an integer to a hexadecimal string in Ruby

Is there a built in way to convert an integer in Ruby into its hexadecimal equivalent? Something like the opposite of String#to_i: "0A".to_i(16) #=>10 Like perhaps: "0A".hex #=>10 I know ..

do <something> N times (declarative syntax)

Is there a way in Javascript to write something like this easily: [1,2,3].times do { something(); } Any library that might support some similar syntax maybe? Update: to clarify - I would like so..

Windows could not start the SQL Server (MSSQLSERVER) on Local Computer... (error code 3417)

For some reasons I moved this folder : (Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL) to another drive, then returned it to the same location, but sql server has stopped working, showi..

How to change the text of a button in jQuery?

How do you change the text value of a button in jQuery? Currently, my button has 'Add' as its text value, and upon being clicked I want it to change to 'Save'. I have tried this method below, but so f..

Links in <select> dropdown options

Is it possible for each dropdown options to link somewhere when selected without the need for an external button? <select> <option value="x">x</option> <option value="y">y..

How to detect orientation change in layout in Android?

I just implemented a orientation change feature - e.g. when the layout changes from portrait to landscape (or vice versa). How can I detect when the orientation change event finished. The Orientation..

How to join on multiple columns in Pyspark?

I am using Spark 1.3 and would like to join on multiple columns using python interface (SparkSQL) The following works: I first register them as temp tables. numeric.registerTempTable("numeric") Ref..

Apache HttpClient Interim Error: NoHttpResponseException

I have a webservice which is accepting a POST method with XML. It is working fine then at some random occasion, it fails to communicate to the server throwing IOException with message The target serve..

Laravel Unknown Column 'updated_at'

I've just started with Laravel and I get the following error: Unknown column 'updated_at' insert into gebruikers (naam, wachtwoord, updated_at, created_at) I know the error is from the timest..

Creation timestamp and last update timestamp with Hibernate and MySQL

For a certain Hibernate entity we have a requirement to store its creation time and the last time it was updated. How would you design this? What data types would you use in the database (assuming ..

add/remove active class for ul list with jquery?

I'm trying to remove and set an active class for a list item every time it's clicked. It's currently removing the selected active class but isn't setting it. Any idea what I'm missing? HTML <ul ..

How to programmatically set the SSLContext of a JAX-WS client?

I'm working on a server in a distributed application that has browser clients and also participates in server-to-server communication with a 3rd party. My server has a CA-signed certificate to let my ..

Find and replace Android studio

Is there a way to find and replace all occurrences of a word in an entire project( not just a single class using refactor -> rename) and also maintain case, either in android studio or using a command..

Can't connect to Postgresql on port 5432

I have PostgreSQL 9.3 installed on a server running Ubuntu Server 14.04. If I ssh into the server via terminal, I'm able to connect with psql. But when I try to configure pgAdmin III to do the remote..

How to Uninstall RVM?

Possible Duplicate: How to remove rvm (ruby version manager) from my system? How can I uninstall (or reinstall) RVM on Ubuntu 9.10? I messed up my current installation...

Not connecting to SQL Server over VPN

I have connected for the first time to an existing network over VPN. I can ping the IP address which is used by the SQL Server from the VPN client, but SSMS does not connect to the SQL Server. I am us..

Iterate through every file in one directory

How do I write a loop in ruby so that I can execute a block of code on each file? I'm new to ruby, and I've concluded that the way to do this is a do each loop. The ruby file will be executed from a ..

C# How to change font of a label

A form with a label and a button 'Options'. By clicking the button a new form opens with 2 radio buttons 'Font1' and 'Font2', and two buttons 'Apply' and 'Cancel'. Upon selecting one of the radio butt..

Detecting Windows or Linux?

I am seeking to run a common Java program in both Windows and Linux. The program needs to do some things differently on each platform. So how can / should my Java program detect it is running under ..

What does 'public static void' mean in Java?

What does public static void mean in Java? I'm in the process of learning. In all the examples in the book I'm working from public static void comes before any method that is being used or created...

How can I check for an empty/undefined/null string in JavaScript?

I saw this question, but I didn't see a JavaScript specific example. Is there a simple string.Empty available in JavaScript, or is it just a case of checking for ""?..

Restrict SQL Server Login access to only one database

I have a SQL Server server which has around 50 databases on it. I wish to create a new Login for a client who wishes to have access to their database. But I don't want to give them access to the o..

Css transition from display none to display block, navigation with subnav

This is what I have jsFiddle link _x000D_ _x000D_ nav.main ul ul {_x000D_ position: absolute;_x000D_ list-style: none;_x000D_ display: none;_x000D_ opacity: 0;_x000D_ visibility: ..

How to convert a file to utf-8 in Python?

I need to convert a bunch of files to utf-8 in Python, and I have trouble with the "converting the file" part. I'd like to do the equivalent of: iconv -t utf-8 $file > converted/$file # this is s..

HTML5 video (mp4 and ogv) problems in Safari and Firefox - but Chrome is all good

I have the following code: <video width="640" height="360" controls id="video-player" poster="/movies/poster.png"> <source src="/movies/640x360.m4v" type='video/mp4; codecs="avc1.42E01E, mp..

Elegant way to report missing values in a data.frame

Here's a little piece of code I wrote to report variables with missing values from a data frame. I'm trying to think of a more elegant way to do this, one that perhaps returns a data.frame, but I'm s..

How to use apply a custom drawable to RadioButton?

It looks like we can use the following in a RadioButton: android:button="@drawable/myCustomStateBackground" but that drawable only occupies the spot where the radio drawable would normally go. Idea..

SQL JOIN, GROUP BY on three tables to get totals

I've inherited the following DB design. Tables are: customers --------- customerid customernumber invoices -------- invoiceid amount invoicepayments --------------- invoicepaymentid invoicei..