Questions Tagged with #Documentpaginator

How to update only one field using Entity Framework?

Here's the table Users UserId UserName Password EmailAddress and the code.. public void ChangePassword(int userId, string password){ //code to update the password.. } ..

How to get a list of all files in Cloud Storage in a Firebase app?

I'm working on uploading images, everything works great, but I have 100 pictures and I would like to show all of them in my View, as I get the complete list of the images in a folder, I can not find a..

TCPDF ERROR: Some data has already been output, can't send PDF file

I keep receiving this error when trying to add my own array into the code. Here is my array; $array = array(); while (odbc_fetch_row($rs)) { $array[] = odbc_result($rs,'Product Name'); } $test = pr..

How to insert multiple rows from array using CodeIgniter framework?

I'm passing a large dataset into a MySQL table via PHP using insert commands and I'm wondering if it's possible to insert approximately 1000 rows at a time via a query other than appending each value ..

80-characters / right margin line in Sublime Text 3

You can have 80-characters / right margin line in Netbeans, Text Mate and probably many, many more other IDEs. Is it possible to have it in Sublime Text 3 as well? Any option, plugin etc.?..

How to get the separate digits of an int number?

I have numbers like 1100, 1002, 1022 etc. I would like to have the individual digits, for example for the first number 1100 I want to have 1, 1, 0, 0. How can I get it in Java?..

Accessing Objects in JSON Array (JavaScript)

Possible Duplicate: I have a nested data structure / JSON, how can I access a specific value? I have a service that returns nested Objects in a JSON Array. How can I loop through the object..

Move UIView up when the keyboard appears in iOS

I have a UIView, it is not inside UIScrollView. I would like to move up my View when the keyboard appears. Before I tried to use this solution: How can I make a UITextField move up when the keyboard i..

HTML5 placeholder css padding

I've seen this post already and tried everything I could to change the padding for my placeholder but alas, it seems it just doesn't want to cooperate. Anyway, here is the code for the css. (EDIT: Th..

JavaScript error (Uncaught SyntaxError: Unexpected end of input)

I have some JavaScript code that works in FireFox but not in Chrome or IE. In the Chrome JS Console I get the follow error: "Uncaught SyntaxError: Unexpected end of input". The JavaScript cod..

Nested ng-repeat

I have some dummy XML file: <Week number="2013-W45"> <Day dow="1" templateDay="Monday"> <Job name="wake up" > <Job name="get dressed" > ..

Set the absolute position of a view

Is it possible to set the absolute position of a view in Android? (I know that there is an AbsoluteLayout, but it's deprecated...) For example, if I have a 240x320px screen, how could I add an ImageV..

Difference between h:button and h:commandButton

In JSF 2, what is the difference between h:button and h:commandButton ? ..

Convert ascii value to char

How do I convert 5 random ascii values into chars? Prompt: Randomly generate 5 ascii values from 97 to 122 (the ascii values for all of the alphabet). As you go, determine the letter that corresp..

Styling an anchor tag to look like a submit button

I have a form where there's a "Submit" button and a "Cancel" anchor. The HTML is this: <input type="submit" value="Submit" /> <a href="some_url">Cancel</a> I'd like for the two t..

Xml serialization - Hide null values

When using a standard .NET Xml Serializer, is there any way I can hide all null values? The below is an example of the output of my class. I don't want to output the nullable integers if they are set ..

How do I get hour and minutes from NSDate?

In my application I need to get the hour and minute separately: NSString *currentHour=[string1 substringWithRange: NSMakeRange(0,2)]; int currentHourInNumber=[currentHour intValue]; Conside..

What's the difference between isset() and array_key_exists()?

How do the following two function calls compare: isset($a['key']) array_key_exists('key', $a) ..

How do I escape a percentage sign in T-SQL?

This question also has the answer, but it mentions DB2 specifically. How do I search for a string using LIKE that already has a percent % symbol in it? The LIKE operator uses % symbols to signify wil..

Detecting endianness programmatically in a C++ program

Is there a programmatic way to detect whether or not you are on a big-endian or little-endian architecture? I need to be able to write code that will execute on an Intel or PPC system and use exactly..

Setting Short Value Java

I am writing a little code in J2ME. I have a class with a method setTableId(Short tableId). Now when I try to write setTableId(100) it gives compile time error. How can I set the short value without d..

Extracting Nupkg files using command line

Firstly, I do not want to use Visual Studio at all when dealing with the certain .nupkg files. I know there is a tool called NuGet Package Explorer and this can export nupkg files to a certain file l..

Generate a random number in a certain range in MATLAB

How can I generate a random number in MATLAB between 13 and 20?..

SQL Server "AFTER INSERT" trigger doesn't see the just-inserted row

Consider this trigger: ALTER TRIGGER myTrigger ON someTable AFTER INSERT AS BEGIN DELETE FROM someTable WHERE ISNUMERIC(someField) = 1 END I've got a table, someTable, and I'm tr..

Maven: Failed to read artifact descriptor

I am hoping someone can help me with a problem I am struggling with. When I try to build my project from the terminal I get this error: Failed to read artifact descriptor for com.morrislgn.merchandi..

Generate SQL Create Scripts for existing tables with Query

I'm trying to get the CREATE scripts for existing tables within SQL Server 2008. I assume I can do this by querying the sys.tables somehow, however this isn't returning me the CREATE script data...

How to use pip with python 3.4 on windows?

Just installed a fresh copy of python 3.4.1 on windows 7. Here says that pip is included by default. but i could not find any pip.exe or some pip commands. Do I need to install it separately or it exi..

Find object by id in an array of JavaScript objects

I've got an array: myArray = [{'id':'73','foo':'bar'},{'id':'45','foo':'bar'}, etc.] I'm unable to change the structure of the array. I'm being passed an id of 45, and I want to get 'bar' for that ..

How do I use Assert.Throws to assert the type of the exception?

How do I use Assert.Throws to assert the type of the exception and the actual message wording? Something like this: Assert.Throws<Exception>( ()=>user.MakeUserActive()).WithMessage("..

Eclipse error "Could not find or load main class"

I know there are many duplicates of this question, but I have looked at them all, and none of them have solved the issue. I am trying to run a class that has a main function. I have cleaned the proje..

How to generate unique id in MySQL?

I'm programming a script using PHP and MySQL and I want to get a unique id (consisting of a string: capitals and small letters with numbers) like: gHYtUUi5b. I found many functions in PHP that can g..

How to import existing Git repository into another?

I have a Git repository in a folder called XXX, and I have second Git repository called YYY. I want to import the XXX repository into the YYY repository as a subdirectory named ZZZ and add all XXX's ..

UnhandledPromiseRejectionWarning: This error originated either by throwing inside of an async function without a catch block

I am getting following error in my Node-Express App UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without..

Should I use PATCH or PUT in my REST API?

I want to design my rest endpoint with the appropriate method for the following scenario. There is a group. Each group has a status. The group can be activated or inactivated by the admin. Should I ..

How to get correlation of two vectors in python

In matlab I use a=[1,4,6] b=[1,2,3] corr(a,b) which returns .9934. I've tried numpy.correlate but it returns something completely different. What is the simplest way to get the correlation of two v..

Add line break within tooltips

How can line breaks be added within a HTML tooltip? I tried using <br/> and \n within the tooltip as follows: <a href="#" title="Some long text <br/> Second line text \n Third line t..

How to create a database from shell command?

I'm looking for something like createdb in PostgreSQL or any other solution that would allow me to create database with a help of a shell command. Any hints?..

How to install a PHP IDE plugin for Eclipse directly from the Eclipse environment?

I have a clean Eclipse Java SDK. I would like to make it suitable for developing PHP applications. So I need a PHP IDE plugin (or something like that). How could I install it from the Eclipse environm..

How do I push a new local branch to a remote Git repository and track it too?

I want to be able to do the following: Create a local branch based on some other (remote or local) branch (via git branch or git checkout -b) Push the local branch to the remote repository (publish)..

How to read until end of file (EOF) using BufferedReader in Java?

I have problem with reading the input until EOF in Java. In here, there are single input and the output consider the input each line. Example: input: 1 2 3 4 5 output: 0 1 0 1 0 But, I have c..

How can I refresh or reload the JFrame?

I am doing project using Java and in that I need to reload whole JFrame after clicking particular button on that JFrame. How to do this?..

How to Parse a JSON Object In Android

I am having some problems pulling values from a JSON object. Here is my code try { JSONObject json = new JSONObject(result); JSONObject json2 = json.getJSONObject("results"); test = json2..

C# Timer or Thread.Sleep

I am running a windows service and using a loop and Thread.Sleep to repeat a task, would it be better to use a timer method? If yes a code example would be great I am currently using this code to r..

Stored Procedure parameter default value - is this a constant or a variable

Here is my code: USE [xxx] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [dbo].[problemParam] @StartDate INT = CONVERT(INT,(CONVERT(CHAR(8),GETDATE()-130,112))), @End..

How to unlock a file from someone else in Team Foundation Server

We have a project that is stored within our TFS server and some files were Checked-Out by me from another computer and another user (both of which are not used anymore). Is there a way to force the un..

How to read HDF5 files in Python

I am trying to read data from hdf5 file in Python. I can read the hdf5 file using h5py, but I cannot figure out how to access data within the file. My code import h5py import numpy as np f1 ..

generate a random number between 1 and 10 in c

#include <stdio.h> #include <stdlib.h> int main() { int randomnumber; randomnumber = rand() % 10; printf("%d\n", randomnumber); return 0; } This is a simple program whe..

TypeError: 'str' object is not callable (Python)

Code: import urllib2 as u import os as o inn = 'dword.txt' w = open(inn) z = w.readline() b = w.readline() c = w.readline() x = w.readline() m = w.readline() def Dict(Let, Mod): global str in..

How do I get the size of a java.sql.ResultSet?

Shouldn't this be a pretty straightforward operation? However, I see there's neither a size() nor length() method...

How to remove focus without setting focus to another control?

I like my UIs to be intuitive; each screen should naturally and unobtrusively guide the user on to the next step in the app. Barring that, I strive to make things as confusing and confounding as possi..

For div to extend full height

Is there a method I can use for a div to extend to full height? I've got a sticky footer in it as well. Here's the web page: Website removed. The middle bit I'm talking about is the white div, midcon..

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

Cannot read property 'push' of undefined when combining arrays

When pushing an array's contents to another array I get "Uncaught TypeError: Cannot read property 'push' of undefined" error in this snippet. var order = new Object(), stack = []; for(var i=0..

How to fire an event when v-model changes?

I'm trying to fire the foo() function with the @click but as you can see, need press the radio button two times to fire the event correctly . Only catch the value the second time that you press... I ..

Where is the Postgresql config file: 'postgresql.conf' on Windows?

I'm receiving this message but I can't find the postgresql.conf file: OperationalError: could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "???&q..

How to create a GUID in Excel?

I need a function to add a GUID to cells in excel. I found this previous question on stackoverflow, but it is not working. It suggests the following function: =CONCATENATE(DEC2HEX(RANDBETWEEN(0,429496..

How to find the path of Flutter SDK

How to configure Flutter SDK? How to locate the Flutter SDK? I don't know the location of the SDK file. ..

React Native: Possible unhandled promise rejection

I'm getting the following error: Possible unhandled promise rejection (id:0: Network request failed Here's the promise code, I don't see what's wrong here, any ideas? return fetch(url) .the..

jQuery get the id/value of <li> element after click function

How can I alert the id of the <li> item clicked? <ul id='myid'> <li id='1'>First</li> <li id='2'>Second</li> <li id='3'>Third</li> <li id='..

How do I convert dmesg timestamp to custom date format?

I am trying to understand the dmesg timestamp and find it hard to convert that to change it to java date/custom date format. Sample dmesg log: [14614.647880] airo(eth1): link lost (missed beacons) So..

Script to kill all connections to a database (More than RESTRICTED_USER ROLLBACK)

I have a development database that re-deploy frequently from a Visual Studio Database project (via a TFS Auto Build). Sometimes when I run my build I get this error: ALTER DATABASE failed because a ..

CSS transition between left -> right and top -> bottom positions

Is it possible to use CSS transitions to animate something between a position set as left: 0px to right: 0px so it goes all the way across the screen? I need to accomplish the same thing with top to b..

click() event is calling twice in jquery

I setup a link element and called its click event in jquery but the click event is calling twice, please see below the code of jquery. $("#link_button") .button() .click(function () { $("#attachme..

How do I encrypt and decrypt a string in python?

I have been looking for sometime on how to encrypt and decrypt a string. But most of it is in 2.7 and anything that is using 3.2 is not letting me print it or add it to a string. So what I'm trying t..

Accessing an SQLite Database in Swift

I'm looking for a way to access an SQLite database in my app with Swift code. I know that I can use an SQLite Wrapper in Objective C and use the bridging header, but I'd rather be able to do this pro..

Joining Spark dataframes on the key

I have constructed two dataframes. How can we join multiple Spark dataframes ? For Example : PersonDf, ProfileDf with a common column as personId as (key). Now how can we have one Dataframe com..

How to align text below an image in CSS?

HTML <div class="image1"> <img src="images/img1.png" width="250" height="444" alt="Screen 1"/> <img src="images/img2.png" width="250" height="444" alt="Screen 2"/> ..

How do I disable fail_on_empty_beans in Jackson?

Using jackson 2.1, how do I disable the fail_on_empty beans that the error message seems to want me to disable? I'm assuming this is just the simplest thing in the world, but hell it is late and I h..

Pretty-print a Map in Java

I am looking for a nice way to pretty-print a Map. map.toString() gives me: {key1=value1, key2=value2, key3=value3} I want more freedom in my map entry values and am looking for something more like ..

Android: Bitmaps loaded from gallery are rotated in ImageView

When I load an image from the media gallery into a Bitmap, everything is working fine, except that pictures that were shot with the camera while holding the phone vertically, are rotated so that I alw..

How do you set autocommit in an SQL Server session?

How do you set autocommit in an SQL Server session?..

How to use select/option/NgFor on an array of objects in Angular2

I'm having trouble creating a select in Angular2 that is backed by an array of Objects instead of strings. I knew how to do it in AngularJS using ngOptions, but it doesn't seem to work in Angular2 (I'..

Twig ternary operator, Shorthand if-then-else

Does Twig support ternary (shorthand if-else) operator? I need some conditional logic like: {%if in company_abilities %} <tr class="selected"> {%else%} <tr> {%..

MySQL root password change

I have been trying to reset my MySQL root password. I have run the mysqld_safe --skip-grant-tables, updated the root password, and checked the user table to make sure it is there. Once restarting th..

How to display HTML in TextView?

I have simple HTML: <h2>Title</h2><br> <p>description here</p> I want to display HTML styled text it in TextView. How to do this?..

Unable to load DLL 'SQLite.Interop.dll'

Periodically I am getting the following exception: Unable to load DLL 'SQLite.Interop.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) I am using version..

Split output of command by columns using Bash?

I want to do this: run a command capture the output select a line select a column of that line Just as an example, let's say I want to get the command name from a $PID (please note this is just a..

Close all infowindows in Google Maps API v3

I am busy with a script that will make a google maps canvas on my website, with multiple markers. I want that when you click on a marker, a infowindow opens. I have done that, and the code is at the m..

Reading a json file in Android

I have the following json file. I want to know where should i place the json file in my project and how to read and store it. { "aakash": [ [ 0.070020,0.400684], [ 0.134198,0.515837], [..

What is a regular expression which will match a valid domain name without a subdomain?

I need to validate a domain name: So a domain in its rawest form - not even a subdomain like www. Characters should only be a-z | A-Z | 0-9 and period(.) and dash(-) ..

save a pandas.Series histogram plot to file

In ipython Notebook, first create a pandas Series object, then by calling the instance method .hist(), the browser displays the figure. I am wondering how to save this figure to a file (I mean not b..

How to close off a Git Branch?

I'm starting out using Git + GitHub. In our distributed team, each member is creating their own branch for each issue/requirement they are allocated. git branch Issue#1 <-- create this branch ..

Removing character in list of strings

If I have a list of strings such as: [("aaaa8"),("bb8"),("ccc8"),("dddddd8")...] What should I do in order to get rid of all the 8s in each string? I tried using strip or replace in a for loop but ..

XSD - how to allow elements in any order any number of times?

I am trying to create an XSD, and trying to write the definition with the following requirement: Allow child element specified to appear any number of times (0 to unbounded) Allow child elements to ..

MySQL JDBC Driver 5.1.33 - Time Zone Issue

Some background: I have a Java 1.6 webapp running on Tomcat 7. The database is MySQL 5.5. Previously, I was using Mysql JDBC driver 5.1.23 to connect to the DB. Everything worked. I recently upgraded..

Table Height 100% inside Div element

Hi I want to set table height 100% to its parent div without define height in div. My code is not working. I dont know what I am missing. Fiddle link <div style="overflow:hidden"> <div style..

jquery select element by xpath

I have an xpath selector. How can I get the elements matching that selector using jQuery? I've seen but it doesn't use jQuer..

mailto link multiple body lines

having trouble getting multiple lines to work correctly in a mailto link In my case I'm testing it with an Outlook default mail reader. The following is put in an anchor href: mailto:email@address..

Creating table variable in SQL server 2008 R2

what is table variable? And how to create a table variable (virtual in-memory table) with columns that match the existing Stored procedure resultset. I executed the procedure and after executing it, ..

How do I create a master branch in a bare Git repository?

(All done in poshgit on Windows 8): git init --bare test-repo.git cd test-repo.git (Folder is created with git-ish files and folders inside) git status fatal: This operation must be run in a wor..

How do I find out what type each object is in a ArrayList<Object>?

I have a ArrayList made up of different elements imported from a db, made up of strings, numbers, doubles and ints. Is there a way to use a reflection type technique to find out what each type of data..

Find the smallest amongst 3 numbers in C++

Is there any way to make this function more elegant? I'm new to C++, I don't know if there is a more standardized way to do this. Can this be turned into a loop so the number of variables isn't restri..

How to remove all duplicate items from a list

How would I use python to check a list and delete all duplicates? I don't want to have to specify what the duplicate item is - I want the code to figure out if there are any and remove them if so, kee..

What's the meaning of System.out.println in Java?

Is this static println function in out class from System namespace? namespace System { class out { static println ... } How can I interpret this name? And where in JRE this function is def..

How do I deserialize a JSON string into an NSDictionary? (For iOS 5+)

In my iOS 5 app, I have an NSString that contains a JSON string. I would like to deserialize that JSON string representation into a native NSDictionary object. "{\"password\" : \"1234\", \"user\" :..

What are "named tuples" in Python?

Reading the changes in Python 3.1, I found something... unexpected: The sys.version_info tuple is now a named tuple: I never heard about named tuples before, and I thought elements could either ..

How do I iterate over a JSON structure?

I have the following JSON structure: [{ "id":"10", "class": "child-of-9" }, { "id": "11", "classd": "child-of-10" }] How do I iterate over it using JavaScript?..

JavaScript calculate the day of the year (1 - 366)

How do I use JavaScript to calculate the day of the year, from 1 - 366? For example: January 3 should be 3. February 1 should be 32. ..

Can I convert a boolean to Yes/No in a ASP.NET GridView

I have a ASP.NET GridView with a column mapped to a boolean. I want do display "Yes"/"No" instead of "True"/"False". Well actually I want "Ja"/"Nej" (in Danish). Is this possible? <asp:gridview ..

How to determine when Fragment becomes visible in ViewPager

Problem: Fragment onResume() in ViewPager is fired before the fragment becomes actually visible. For example, I have 2 fragments with ViewPager and FragmentPagerAdapter. The second fragment is only a..

Does GPS require Internet?

Is it necessary to turn both Internet and GPS on before I can read my current location(country, city, locality etc) in my app? If they are, then any alternative way to get the location only from GPS? ..

How to set a timer in android

What is the proper way to set a timer in android in order to kick off a task (a function that I create which does not change the UI)? Use this the Java way:

PHP - Debugging Curl

I'd like to see what the post fields in the request are before I send it. (For debugging purposes). The PHP library (class) I am using is already made (not by me), so I am trying to understand it. A..

Get loop count inside a Python FOR loop

In a Python for loop that iterates over a list we can write: for item in list: print item and it neatly goes through all the elements in the list. Is there a way to know within the loop how man..

How do I deal with special characters like \^$.?*|+()[{ in my regex?

I want to match a regular expression special character, \^$.?*|+()[{. I tried: x <- "a[b" grepl("[", x) ## Error: invalid regular expression '[', reason 'Missing ']'' (Equivalently stringr::str..

Rollback to an old Git commit in a public repo

How can I go about rolling back to a specific commit in git? The best answer someone could give me was to use git revert X times until I reach the desired commit. So let's say I want to revert bac..

HTML if image is not found

I have an image in a HTML page: <img src="smiley.gif" alt="Smiley face" width="32" height="32" /> If the image is not found on the server it shows an ugly blank square. I want to make it so ..

CMD: Export all the screen content to a text file

In command prompt - How do I export all the content of the screen to a text file(basically a copy command, just not by using right-clicking and the clipboard) This command works, but only for the com..

pip connection failure: cannot fetch index base URL

I run sudo pip install git-review, and get the following messages: Downloading/unpacking git-review Cannot fetch index base URL Could not find any downloads that sa..

Check if my SSL Certificate is SHA1 or SHA2

I have tried to find the answer to this but I couldn't find an answer... How do I check if my SSL Certificate is using SHA1 or SHA2? Reason I ask is because it might have to do with the certificate ..

How do I Set Background image in Flutter?

I am trying to set a background image for the home page. I am getting the image place from start of the screen and filling the width but not the height. Am I missing something in my code? Are there i..

SQL JOIN and different types of JOINs

What is a SQL JOIN and what are different types?..

Compare one String with multiple values in one expression

I have one String variable, str with possible values, val1, val2 and val3. I want to compare (with equal case) str to all of these values using an if statement, for example: if("val1".equalsIgnoreCa..

Location of Django logs and errors

I've set up django server with nginx, and it gets 403 error in some of the pages. Where can I find the django logs? where can I see the errors in detail?..

How to get the file-path of the currently executing javascript code

I'm trying to do something like a C #include "filename.c", or PHP include(dirname(__FILE__)."filename.php") but in javascript. I know I can do this if I can get the URL a js file was loaded from (e.g...

"Fatal error: Unable to find local grunt." when running "grunt" command

I uninstalled grunt with following command. npm uninstall -g grunt Then I again installed grunt with following command. npm install -g grunt-cli Visit following link:

jQuery get input value after keypress

I have the following function: $(document).ready(function() { $("#dSuggest").keypress(function() { var dInput = $('input:text[name=dSuggest]').val(); console.log(dInput); ..

Detect WebBrowser complete page loading

How can I detect when a System.Windows.Forms.WebBrowser control has completed loading? I tried to use the Navigate and DocumentCompleted events but both of them were raised a few times during documen..

Scroll to element on click in Angular 4

I want to be able to scroll to a target when a button is pressed. I was thinking something like this. <button (click)="scroll(#target)">Button</button> And in my component.ts a ..

How to unset a JavaScript variable?

I have a global variable in JavaScript (actually a window property, but I don't think it matters) which was already populated by a previous script but I don't want another script that will run later t..

How to quickly clear a JavaScript Object?

With a JavaScript Array, I can reset it to an empty state with a single assignment: array.length = 0; This makes the Array "appear" empty and ready to reuse, and as far as I understand is a single ..

Using CSS for a fade-in effect on page load

Can CSS transitions be used to allow a text paragraph to fade-in on page load? I really like how it looked on and would love to use a similar effect using CSS. The domain has s..

C# - How to add an Excel Worksheet programmatically - Office XP / 2003

I am just starting to fiddle with Excel via C# to be able to automate the creation, and addition to an Excel file. I can open the file and update its data and move through the existing worksheets. My..

How to use componentWillMount() in React Hooks?

In the official docs of React it mentions - If you’re familiar with React class lifecycle methods, you can think of useEffect Hook as componentDidMount, componentDidUpdate, and componentWi..

How to add local jar files to a Maven project?

How do I add local jar files (not yet part of the Maven repository) directly in my project's library sources?..

Converting Java file:// URL to File(...) path, platform independent, including UNC paths

I am developing a platform independent application. I am receiving a file URL*. On windows these are: file:///Z:/folder%20to%20file/file.txt file://host/folder%20to%20file/file.txt (an UNC path) I..

Change HTML email body font type and size in VBA

I have a VBA script that that generates and email when a VBA button is pushed in a given worksheet. The script currently generates the email in a relatively small font. I was wondering if there is a..

Visual Studio keyboard shortcut to automatically add the needed 'using' statement

What is the keyboard shortcut to expand the little red line that gives you the menu where you can choose to have the necessary using statement added to the top of the file?..

QByteArray to QString

I'm having issues with QByteArray and QString. I'm reading a file and stores its information in a QByteArray. The file is in unicode, so it contains something like: t\0 e\0 s\0 t\0 \0 \0 I'm trying ..

Working copy locked error in tortoise svn while committing

I'm using Tortoise SVN to update and commit changes to the repository in the server whenever I make changes to my working copy. But from a few days I'm not able to commit the changes and I get the fol..

Generate pdf from HTML in div using Javascript

I have the following html code: <!DOCTYPE html> <html> <body> <p>don't print this to pdf</p> <div id="pdf"> <p><font size=..

How to do a HTTP HEAD request from the windows command line?

What's the best way (or tool) on the Windows (Vista) command line to get size and modification time for a file on a remote webserver, without downloading it?..

java.sql.SQLException Parameter index out of range (1 > number of parameters, which is 0)

After validation of select combo box which I have selected and I am not able to insert it in my database. Tomcat gives following error: java.sql.SQLException: Parameter index out of range (1 > num..

How to detect a loop in a linked list?

Say you have a linked list structure in Java. It's made up of Nodes: class Node { Node next; // some user data } and each Node points to the next node, except for the last Node, which has ..

Environment variables for java installation

How to set the environment variables for Java in Windows (the classpath)?..

css ellipsis on second line

CSS text-overflow: ellipsis on second line, is this possible? I can't find it on the net. example: what I want is like this: I hope someone could help me. I need an ellipsis on the second line of...

Where is Developer Command Prompt for VS2013?

I need to run web.exe file from my developer command prompt in Visual Studio 2013. By default, the command prompt is not installed in Visual Studio 2013. Previously, I was using Visual Studio 2012. I..

Looping through all the properties of object php

How can I loop through all the properties of object?. Right now I have to write a new code line to print each property of object echo $obj->name; echo $obj->age; Can I loop through all the pr..

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

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

How do I create an iCal-type .ics file that can be downloaded by other users?

I want to create an iCal Calendar that can be downloaded from my website to the users Calendar program or imported to Google Calendar. What I want to know is if I do a direct Export from iCal on Mac O..

Does VBA contain a comment block syntax?

In VBA is there a short way to comment out a block of code the same way java uses /*...*/?..

Angular ng-if not true

Why doesn't this work. <li ng-if="!area"></li> Feels a bit illogical since <li ng-if="area"></li> works just fine. 'area' is defined in scope as true/false Any workarounds..

Is there a command to list all Unix group names?

I know there is the /etc/group file that lists all users groups. I would like to know if there is a simple command to list all user group names in spite of parsing the world readable /etc/group file...

Where can I find documentation on formatting a date in JavaScript?

I noticed that JavaScript's new Date() function is very smart in accepting dates in several formats. Xmas95 = new Date("25 Dec, 1995 23:15:00") Xmas95 = new Date("2009 06 12,12:52:39") Xmas95 = new D..

Bootstrap css hides portion of container below navbar navbar-fixed-top

I am building a project with Bootstrap and im facing little issue .I have a container below the Nav-top.My issue is that some portion of my container is hidden below the nav-top header.I dont want to ..

Windows 7 - 'make' is not recognized as an internal or external command, operable program or batch file

I have Windows 7 and tried to use the 'make' command but 'make' is not recognized as an internal or external command. I did Start -> cmd -> run -> make, which outputs: 'make' is not reco..

Multithreading in Bash

I would like to introduce multithreading feature in my shell script. I have a script which calls the function read_cfg() with different arguments. Each of these function calls are independent. Would..

How to resize datagridview control when form resizes

I found a lot of questions about how to resize the form when a child control resizes, but I'm trying to do something much simpler (maybe so simple people don't even ask it :| ) I'd like to automatica..

Upload file to SFTP using PowerShell

We were asked to set up an automated upload from one of our servers to an SFTP site. There will be a file that is exported from a database to a filer every Monday morning and they want the file to be ..

What is an unsigned char?

In C/C++, what an unsigned char is used for? How is it different from a regular char?..

How can I change image source on click with jQuery?

I 'm currently building a full background image layout and I want to change the image based on which page the user is visiting. To get to the point: I need to change a images attribute when the user c..

avrdude: stk500v2_ReceiveMessage(): timeout

This is the main error that I get when I try to run my ARDUINO program. The full list of errors is as follows: avrdude: stk500v2_ReceiveMessage(): timeout avrdude: stk500v2_ReceiveMessage(): timeout ..

WPF popup window

I would like to let the user choose their options after a button is clicked. For example, showing two buttons, "Restart Now" and "Restart Later" in a modal popup window would be my preference. Using a..

How to find tag with particular text with Beautiful Soup?

I have the following html (line breaks marked with \n): ... <tr> <td class="pos">\n "Some text:"\n <br>\n <strong>some value</strong>\n </td>..

How to find out if you're using HTTPS without $_SERVER['HTTPS']

I've seen many tutorials online that says you need to check $_SERVER['HTTPS'] if the server is connection is secured with HTTPS. My problem is that on some of the servers I use, $_SERVER['HTTPS'] is a..

iOS 7's blurred overlay effect using CSS?

It seems Apple's overlay is more than just a transparency. Any ideas on how to achieve this effect with CSS and possibly JS? ..

How to add and remove classes in Javascript without jQuery

I'm looking for a fast and secure way to add and remove classes from an html element without jQuery. It also should be working in early IE (IE8 and up)...

Avoid web.config inheritance in child web application using inheritInChildApplications

I am trying to add <location inheritInChildApplications="false"> to my parent web application's web.config but it doesn't seem to be working. My parent's web.config has: <configuration&g..

Transaction isolation levels relation with locks on table

I have read about 4 levels of isolation: Isolation Level Dirty Read Nonrepeatable Read Phantom Read READ UNCOMMITTED Permitted Permitted Permitted READ COMMITTED ..

What is the pythonic way to unpack tuples?

This is ugly. What's a more Pythonic way to do it? import datetime t= (2010, 10, 2, 11, 4, 0, 2, 41, 0) dt = datetime.datetime(t[0], t[1], t[2], t[3], t[4], t[5], t[6]) ..

Nexus 7 (2013) and Win 7 64 - cannot install USB driver despite checking many forums and online resources

I'm trying to set up my Nexus 7 (2013) for debugging, but I am getting stuck at the step where you install the USB driver. Here's what I've tried so far: Steps taken: Turned on debugging mode on N..

How to pass an array into a SQL Server stored procedure

How to pass an array into a SQL Server stored procedure? For example, I have a list of employees. I want to use this list as a table and join it with another table. But the list of employees should b..

numpy matrix vector multiplication

When I multiply two numpy arrays of sizes (n x n)*(n x 1), I get a matrix of size (n x n). Following normal matrix multiplication rules, a (n x 1) vector is expected, but I simply cannot find any info..

How to convert from int to string in objective c: example code

I am trying to convert from an int to a string but I am having trouble. I followed the execution through the debugger and the string 'myT' gets the value of 'sum' but the 'if' statement does not work..

How to prevent form from submitting multiple times from client side?

Sometimes when the response is slow, one might click the submit button multiple times. How to prevent this from happening?..

Session timeout in ASP.NET

I am running an ASP.NET 2.0 application in IIS 6.0. I want session timeout to be 60 minutes rather than the default 20 minutes. I have done the following Set <sessionState timeout="60"></se..

Java, Calculate the number of days between two dates

Possible Duplicate: Calculating the Difference Between Two Java Date Instances In Java, I want to calculate the number of days between two dates. In my database they are stored as a DATE d..

select dept names who have more than 2 employees whose salary is greater than 1000

How would do the following in SQL "select dept names who have more than 2 employees whose salary is greater than 1000" ? DeptId DeptName ------ -------- 1 one 2 two 3 three ..

WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for 'jquery'. Please add a ScriptResourceMapping named jquery(case-sensitive)

I'm building a web application using Visual Studio 2012. I'm attempting to add word count into my textbox. However after adding the the javascript codes and the html codes. I receive the error as st..

Are 2 dimensional Lists possible in c#?

I'd like to set up a multidimensional list. For reference, I am working on a playlist analyzer. I have a file/file-list, which my program saves in a standard list. One line from the file in each list..

Abort Ajax requests using jQuery

Is it possible that using jQuery, I cancel/abort an Ajax request that I have not yet received the response from?..

CSS grid wrapping

Is it possible to make a CSS grid wrap without using media queries? In my case, I have a non-deterministic number of items that I want placed in a grid and I want that grid to wrap. Using Flexbox, I'..

Can I add and remove elements of enumeration at runtime in Java

It is possible to add and remove elements from an enum in Java at runtime? For example, could I read in the labels and constructor arguments of an enum from a file? @saua, it's just a question of ..

Insert string at specified position

Is there a PHP function that can do that? I'm using strpos to get the position of a substring and I want to insert a string after that position...

How to convert List<Integer> to int[] in Java?

This is similar to this question: How to convert int[] to Integer[] in Java? I'm new to Java. How can i convert a List<Integer> to int[] in Java? I'm confused because List.toArray() actually re..

Json.NET serialize object with root name

In my web app I'm using Newtonsoft.Json and I have following object [Newtonsoft.Json.JsonObject(Title = "MyCar")] public class Car { [Newtonsoft.Json.JsonProperty(PropertyName = "name")] publ..

Reading DataSet

How do I read data from a DataSet in WPF? I have a train schedule table with just 2 columns and I want to be able to read the departure times and calculate when the next train is leaving. For example,..

How to go back last page

Is there a smart way to go back last page in Angular 2? Something like this._router.navigate(LASTPAGE); For example, page C has a Go Back button, Page A -> Page C, click it, back to page A. Page..

Android Material Design Button Styles

I'm confused on button styles for material design. I'd like to get colorful raised buttons like in the attached link., like the "force stop" and "uninstall" buttons seen under the usage section. Are t..

PostgreSQL : cast string to date DD/MM/YYYY

I'm trying to cast a CHARACTER VARYING column to a DATE but I need a date format like this : DD/MM/YYYY. I use the following SQL query : ALTER TABLE test ALTER COLUMN date TYPE DATE using to_date(da..

How do I put two increment statements in a C++ 'for' loop?

I would like to increment two variables in a for-loop condition instead of one. So something like: for (int i = 0; i != 5; ++i and ++j) do_something(i, j); What is the syntax for this?..

What is a good regular expression to match a URL?

Currently I have an input box which will detect the URL and parse the data. So right now, I am using: var urlR = /^(?:([A-Za-z]+):)?(\/{0,3})([0-9.\-A-Za-z]+) (?::(\d+))?(?:\/([^?#]*))?(?..

What are the obj and bin folders (created by Visual Studio) used for?

I created a new project in Visual Studio 2010 and noticed that there are now two new folders named obj and bin in my project directory. A similar pair of folders are created when building and debuggi..

JFrame: How to disable window resizing?

I am creating a JFrame and I call the method setSize(500, 500). Now the desired behaviour is that JFrame should not be resized by user in any condition. Either by maximizing or by dragging the borders..

How to recover stashed uncommitted changes

I had some uncommitted changes in my development branch and I stashed them using git stash, but there were some changes which were very important among those stashed ones. Is there any way to get back..

Dynamically add event listener

I am just starting to mess around with Angular 2 and I wonder if anyone can tell me the best way to dynamically add and remove event listeners from elements. I have a component set up. When a certain..

Twitter Bootstrap 3 Sticky Footer

I have been using the twitter bootstrap framework for quite a while now and they recently updated to version 3! I'm having trouble getting the sticky footer to stick to the bottom, I have used the st..

jquery: get value of custom attribute

html5 supports the placeholder attribute on input[type=text] elements, but I need to handle non-compliant browsers. I know there are a thousand plugins out there for placeholder but I'd like to create..

ng-change not working on a text input

I am new to angular js. In my code there is color picker initialized from a text field. User changes the value of color and I want that color to be reflected as a background of a text in a span. It is..

Graphviz's executables are not found (Python 3.4)

I am running Python3.4 on Windows 7. I am trying to use the Python interface for graphviz. This is a script I intend to run: from graphviz import Digraph import pydotplus dot = Digraph(comment='The ..

Which is best data type for phone number in MySQL and what should Java type mapping for it be?

I am using MySQL with Spring JDBC template for my web application. I need to store phone number with only digits (10). I am little bit confused about data type using data type. What is preferable da..

How to locate the php.ini file (xampp)

I am using xamppserver for PHP development and want to edit the php.ini file; where can I locate it?..

How to Access Hive via Python? appears to be outdated. When I add this to /etc/profile: export PYTHONPATH=$PYTHONPATH:/usr/lib/hive/lib/py I can then..

pypi UserWarning: Unknown distribution option: 'install_requires'

Does anybody encounter this warning when executing python install of a PyPI package? install_requires defines what the package requires. A lot of PyPI packages have this option. How can it b..

Concatenating two std::vectors

How do I concatenate two std::vectors?..

Reverse order of foreach list items

I would like to reverse the order of this code's list items. Basically it's a set of years going from oldest to recent and I am trying to reverse that output. <?php $j=1; foreach ( $s..

Connecting an input stream to an outputstream

update in java9: I saw some similar, but not-quite-what-i-need threads. I have a server, which wil..

Border length smaller than div width?

I have following code div { width:200px; border-bottom:1px solid magenta; height:50px; } DEMO The div width is 200px so border-bottom is also 200px but what should I do if I want bord..

Using LINQ to find item in a List but get "Value cannot be null. Parameter name: source"

When using LINQ to get data from a list I encounter this error. How can this be fixed? Value cannot be null. Parameter name: source var nCounts = from sale in sal select new ..

How to initialize a list with constructor?

I have a type: public class Human { public int Id { get; set; } public string Address { get; set; } public string Name { get; set; } public List<ContactNumber> ContactNumbers {..