Questions Tagged with #Vsip

The Visual Studio Industry Partner (VSIP) Program (formerly Visual Studio Integration Program) allows third-party developers and software vendors to develop tools, components and languages for use in the Microsoft Visual Studio .NET IDE.

Visual Studio build fails: unable to copy exe-file from obj\debug to bin\debug

Update: A sample project reproducing this bug can be found here at Microsoft Connect. I have also tested and verified that the solution given in the accepted answer below works on that sample project...

Drop default constraint on a column in TSQL

I have a table with a column like this that is currently live: name NVARCHAR(128) NOT NULL DEFAULT '' I am altering the column like this to make it nullable: ALTER TABLE mytable ALTER COLUMN name..

Freezing Row 1 and Column A at the same time

I want to "freeze" Row 1 and Column A simultaneously in Excel 2010. Is this possible?..

If "0" then leave the cell blank

I am trying to create a simple ledger and on the far right of the "Book" it totals any debit/credit that I input. But instead of leaving the unused rows blank, it keeps repeating the latest total to t..

PLS-00103: Encountered the symbol "CREATE"


Adding Http Headers to HttpClient

All: I need to add http headers to the HttpClient before I send a request to a web service. How do I do that for an individual request (as opposed to on the HttpClient to all future requests)? I'm no..

How to export data to an excel file using PHPExcel

I have taken the source code from limesurvey and have added the PHPExcel library to my limesurvey code to export data to an excel file after you click a link. Currently the excel file opens with some ..

How to get query params from url in Angular 2?

I use angular2.0.0-beta.7. When a component is loaded on a path like /path?query=value1 it is redirected to /path. Why were the GET params removed? How can I preserve the parameters? I have an error ..

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder"

My application is to be deployed on both tcServer and WebSphere 6.1. This application uses ehCache and so requires slf4j as a dependency. As a result I've added the slf4j-api.jar (1.6) jar to my war f..

Calling a function within a Class method?

I have been trying to figure out how to go about doing this but I am not quite sure how. Here is an example of what I am trying to do: class test { public newTest(){ function bigTest(..

GitHub relative link in Markdown file

Is there a way to create a URL anchor, <a>, link from within a Markdown file, to another file within the same repository and branch (aka a link relative to the current branch)? For example, in ..

Defined Edges With CSS3 Filter Blur

I am blurring some images with this code img { filter: blur(5px); -webkit-filter: blur(5px); -moz-filter: blur(5px); -o-filter: blur(5px); -ms-filter: blur(5px); } The edges of the image ..

What's the most appropriate HTTP status code for an "item not found" error page

I'm curious what's the most appropriate HTTP status code for an "item does not exist" page. If the page itself doesn't exist, I'll obviously use 404. However, one of my pages has a userid argument ..

Tkinter scrollbar for frame

My objective is to add a vertical scroll bar to a frame which has several labels in it. The scroll bar should automatically enabled as soon as the labels inside the frame exceed the height of the fram..

How to measure height, width and distance of object using camera?

I referred lot many links but still I am not able to get any point from that I can start my development. I want to measure my image height, width and distance using camera. I found this app . I want t..

Find a private field with Reflection?

Given this class class Foo { // Want to find _bar with reflection [SomeAttribute] private string _bar; public string BigBar { get { return this._bar; } } } I want t..

PHP foreach change original array values

I am very new in multi dimensional arrays, and this is bugging me big time. My array is as following: $fields = array( "names" => array( "type" => "text", "class"..

How to check if IsNumeric

Possible Duplicate: How to identify if string contain a number? In VB there's an IsNumeric function, is there something similar in c#? To get around it, I just wrote the code: if (I..

Random shuffling of an array

I need to randomly shuffle the following Array: int[] solutionArray = {1, 2, 3, 4, 5, 6, 6, 5, 4, 3, 2, 1}; Is there any function to do that?..

How to capture UIView to UIImage without loss of quality on retina display

My code works fine for normal devices but creates blurry images on retina devices. Does anybody know a solution for my issue? + (UIImage *) imageWithView:(UIView *)view { UIGraphicsBeginImageCon..

Get index of current item in a PowerShell loop

Given a list of items in PowerShell, how do I find the index of the current item from within a loop? For example: $letters = { 'A', 'B', 'C' } $letters | % { # Can I easily get the index of $_ he..

Grunt watch error - Waiting...Fatal error: watch ENOSPC

Why do I get the Waiting...Fatal error: watch ENOSPC when I run the watch task ? How do I solve this issue?..

How to get current location in Android

I'm having troubles of getting my current position coordinates using the NETWORK provider of android location system. Already read a lot of tutorials and implemented 4 or 5 existing classes to my pr..

Using SVG as background image

I can't seem to get this to work as desired. My page changes height based on what content is loaded and if it requires a scroll, the svg doesn't seem to be stretching... _x000D_ _x000D_ html {_x000D_..

How can I do a line break (line continuation) in Python?

I have a long line of code that I want to break up among multiple lines. What do I use and what is the syntax? For example, adding a bunch of strings, e = 'a' + 'b' + 'c' + 'd' and have it in two ..

How to select where ID in Array Rails ActiveRecord without exception

When I have array of ids, like ids = [2,3,5] and I perform Comment.find(ids) everything works fine. But when there is id that doesn't exist, I get an exception. This occurs generaly when I get l..

How can I get session id in php and show it?

I need to use some unique id like session id. How can I get session id in php?..

Your content must have a ListView whose id attribute is ''

I have created an xml file like this: <?xml version="1.0" encoding="utf-8"?> <ListView xmlns:android="" android:layout_width="match_parent" ..

How do I change the number of open files limit in Linux?

When running my application I sometimes get an error about too many files open. Running ulimit -a reports that the limit is 1024. How do I increase the limit above 1024? Edit ulimit -n 2048 resul..

How to list npm user-installed packages?

How do I list the user-installed package ONLY in npm? When I do npm -g list it outputs every package and their dependencies, which is not what I want...

How can I add reflection to a C++ application?

I'd like to be able to introspect a C++ class for its name, contents (i.e. members and their types) etc. I'm talking native C++ here, not managed C++, which has reflection. I realise C++ supplies some..

Git - What is the difference between push.default "matching" and "simple"

I have been using git for a while now, but I have never had to set up a new remote repo myself and I have been curious on doing so. I have been reading tutorials and I am confused on how to get "git p..

Convert JSONObject to Map

I have a JSONObject with some attributes that I want to convert into a Map<String, Object> Is there something that I can use from the or ObjectMapper?..

Delaying a jquery script until everything else has loaded

I have a jquery script which I need to run only once everything else on the page, including some other javascripts (over which I have no control) have finished doing their thing. I though perhaps the..

JSON to TypeScript class instance?

I've done quite some research, but I'm not totally satisfied with what I found. Just to be sure here's my question: What is actually the most robust and elegant automated solution for deserializing JS..

Return JSON for ResponseEntity<String>

I have a method in my controller that should returns a String in JSON. It returns JSON for non primitive types: @RequestMapping(value = "so", method = RequestMethod.GET, produces = MediaType.APPLICAT..

write a shell script to ssh to a remote machine and execute commands

I have two questions: There are multiple remote linux machines, and I need to write a shell script which will execute the same set of commands in each machine. (Including some sudo operations). How ..

How to make Twitter bootstrap modal full screen

<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-body"> <%= image_tag "Background.jpg" %&..

What is java pojo class, java bean, normal class?

Possible Duplicate: Difference between DTO, VO, POJO, JavaBeans? Hi please don't say my question is duplicate :-) I saw all questions but didn't understand the exact difference. Can someon..

Installing Bootstrap 3 on Rails App

I'm trying to install Bootstrap 3.0 on my Rails app. I recently finished Michael Hartl's tutorial and am now trying to build my own system using this new version of Bootstrap, but I have a few questio..

How to redirect and append both stdout and stderr to a file with Bash?

To redirect stdout to a truncated file in Bash, I know to use: cmd > file.txt To redirect stdout in Bash, appending to a file, I know to use: cmd >> file.txt To redirect both stdout and..

What is a good pattern for using a Global Mutex in C#?

The Mutex class is very misunderstood, and Global mutexes even more so. What is good, safe pattern to use when creating Global mutexes? One that will work Regardless of the locale my machine is in..

width:auto for <input> fields

Newbie CSS question. I thought width:auto for a display:block element meant 'fill available space'. However for an <input> element this doesn't seem to be the case. For example: <body> &l..

How to use GROUP BY to concatenate strings in MySQL?

Basically the question is how to get from this: foo_id foo_name 1 A 1 B 2 C to this: foo_id foo_name 1 A B 2 C ..

How to change a package name in Eclipse?

In Eclipse I have a simple Java project that contains a package named (default package) and inside this package I have a class. I want to rename this package into something like: com.myCompany.execut..

How can I update a single row in a ListView?

I have a ListView which displays news items. They contain an image, a title and some text. The image is loaded in a separate thread (with a queue and all) and when the image is downloaded, I now call ..

How to insert special characters into a database?

Can anyone tell me how to insert special characters into a MySQL database? I've made a PHP script which is meant to insert some words into a database, although if the word contains a ' then it wont be..

Why is "forEach not a function" for this object?

This is probably something really dumb, but I don't understand why this doesn't work. var a = {"cat":"large"}; a.forEach(function(value, key, map){ console.log(value); }); Uncaught TypeError: ..

Difference between wait and sleep

What is difference between wait and sleep?..

How to launch PowerShell (not a script) from the command line

I am new to PowerShell and am struggling with what I assume should be a simple operation—I am trying to launch a PowesShell window from the command line. If I launch a command line instance a..

TypeError : Unhashable type

I am trying to get a list of list of tuples : something like [ [(1,0),(2,0),(3,0)],[(1,1),(2,1),(3,1)....]] I used this statement set([(a,b)for a in range(3)]for b in range(3)) But it gives me an ..

GitHub - failed to connect to github 443 windows/ Failed to connect to gitHub - No Error

Q - I installed git to get the latest version of Angular. When I tried to run git clone I got failed to connect to github 443 error I even tried g..

PHP - remove <img> tag from string

Hey, I need to delete all images from a string and I just can't find the right way to do it. Here is what I tryed, but it doesn't work: preg_replace("/<img[^>]+\>/i", "(image) ", $content);..

Best way to require all files from a directory in ruby?

What's the best way to require all files from a directory in ruby ?..

from jquery $.ajax to angular $http

I have this piece of jQuery code that works fine cross origin: jQuery.ajax({ url: "", type: "POST", data: JSON.stringify({"foo":"bar"}), dataType: "..

Turning off eslint rule for a specific line

In order to turn off linting rule for a particular line in JSHint we use the following rule: /* jshint ignore:start*/ $scope.someVar = ConstructorFunction(); /* jshint ignore:end */ I have been try..

How to select/get drop down option in Selenium 2

I am converting my selenium 1 code to selenium 2 and can't find any easy way to select a label in a drop down menu or get the selected value of a drop down. Do you know how to do that in Selenium 2? ..

Get-WmiObject : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)

When I run Get-WmiObject win32_SystemEnclosure -Computer hostname | select serialnumber it works for both local and remote hosts. When I do this for a list of hosts using ForEach ($_ in gc u:\pub..

How to make a jquery function call after "X" seconds

I have a jquery function and I need to call it after opening the website in an Iframe. I am trying to open a weblink in an Iframe and after opening it I need to call the below function. So how do I d..

How to install Intellij IDEA on Ubuntu?

I'm new to Ubuntu and Linux in general. I want to code in Java on my computer, but I'm having problems installing IntelliJ IDEA on Ubuntu. I have downloaded and extracted the file and for some reason ..

Can one AngularJS controller call another?

Is it possible to have one controller use another? For example: This HTML document simply prints a message delivered by the MessageCtrl controller in the messageCtrl.js file. <html xmlns:ng="htt..

jQuery: set selected value of dropdown list?

What's wrong with this code? jQuery $(document).ready(function() { $("#routetype").val('quietest'); )}; HTML <select id="routetype" name="routetype"> <option value="fastest">F..

Print a list in reverse order with range()?

How can you produce the following list with range() in Python? [9, 8, 7, 6, 5, 4, 3, 2, 1, 0] ..

How to execute a JavaScript function when I have its name as a string

I have the name of a function in JavaScript as a string. How do I convert that into a function pointer so I can call it later? Depending on the circumstances, I may need to pass various arguments int..

Array initializing in Scala

I'm new to Scala ,just started learning it today.I would like to know how to initialize an array in Scala. Example Java code String[] arr = { "Hello", "World" }; What is the equivalent of the abov..

Difference between angle bracket < > and double quotes " " while including header files in C++?

Possible Duplicate: What is the difference between #include <filename> and #include “filename”? What is the difference between angle bracket < > and double quotes " " while ..

Set bootstrap modal body height by percentage

I am trying to make a modal with a body that will scroll when the content becomes too large. However, I want the modal to be responsive to the screen size. When I set the max-height to 40% it has no e..

How to display full (non-truncated) dataframe information in html when converting from pandas dataframe to html?

I converted a pandas dataframe to an html output using the DataFrame.to_html function. When I save this to a separate html file, the file shows truncated output. For example, in my TEXT column, df...

How does @synchronized lock/unlock in Objective-C?

Does @synchronized not use "lock" and "unlock" to achieve mutual exclusion? How does it do lock/unlock then? The output of the following program is only "Hello World". @interface MyLock: NSLock<N..

ADB Android Device Unauthorized

Since I reinstalled Eclipse (simply deleted and downloaded it again) I can't debug my applications on Samsung Galaxy i9001 (with CyanogenMod - Android 4.4.2). It worked fine before reinstallation. Un..

What is the LD_PRELOAD trick?

I came across a reference to it recently on proggit and (as of now) it is not explained. I suspect this might be it, but I don't know for sure...

Difference between == and === in JavaScript

What is the difference between == and === in JavaScript? I have also seen != and !== operators. Are there more such operators?..

How do you use global variables or constant values in Ruby?

I have a program that looks like: $offset =, 200); def draw(point) pointNew = $offset + point; drawAbsolute(point) end draw(, 4)); the use of $offset seems a bit weir..

How can I truncate a string to the first 20 words in PHP?

How can I truncate a string after 20 words in PHP?..

ASP.NET Background image

I am using VS2005 C#. I have a .aspx login page and I would like to implement a background image to it. Below is my current page screenshot: Below is my background code: <div align="center..

Timeout on a function call

I'm calling a function in Python which I know may stall and force me to restart the script. How do I call the function or what do I wrap it in so that if it takes longer than 5 seconds the script ca..

Basic example for sharing text or image with UIActivityViewController in Swift

I started my search by wanting to know how I could share to other apps in iOS. I discovered that two important ways are UIActivityViewController UIDocumentInteractionController These and other me..

What exactly is Apache Camel?

I don't understand what exactly Camel does. If you could give in 101 words an introduction to Camel: What exactly is it? How does it interact with an application written in Java? Is it something ..

error: expected unqualified-id before ‘.’ token //(struct)

I need to make a program that gets a fraction from the user and then simplifies it. I know how to do it and have done most of the code but I keep getting this error "error: expected unqualified-id be..

Xcode 7.2 no matching provisioning profiles found

Before upgrading Xcode to 7.2, I was using Xcode 7.1.1 to build and distribute apps. I have upgraded to Xcode 7.2 and none of my provisioning profiles (matched to that particular app's bundle ID) matc..

printf format specifiers for uint32_t and size_t

I have the following size_t i = 0; uint32_t k = 0; printf("i [ %lu ] k [ %u ]\n", i, k); I get the following warning when compiling: format ‘%lu’ expects type ‘long unsigned int’, but a..

Take a list of numbers and return the average

Doing GCSE computing and as a homework task I need to do the below. I'm only starting out with programming and I've been trying to figure out how to do it but to no avail. I believe I need to use a fu..

How do I make a Windows batch script completely silent?

There has been variants of this question asked for generations, but despite writing some quite complicated Windows scripts, I can't seem to find out how to make them actually silent. The following is..

Python - Extracting and Saving Video Frames

So I've followed this tutorial but it doesn't seem to do anything. Simply nothing. It waits a few seconds and closes the program. What is wrong with this code? import cv2 vidcap = cv2.VideoCapture('..

Use the auto keyword in C++ STL

I have seen code which use vector, vector<int>s; s.push_back(11); s.push_back(22); s.push_back(33); s.push_back(55); for (vector<int>::iterator it = s.begin(); it!=s.end(); it++) { co..

Java: get all variable names in a class

I have a class and I want to find all of its public fields (not methods). How can I do this? Thanks!..

PHP Remove elements from associative array

I have an PHP array that looks something like this: Index Key Value [0] 1 Awaiting for Confirmation [1] 2 Assigned [2] 3 ..

NoClassDefFoundError - Eclipse and Android

I'm having a problem trying to run an Android app which, up until adding a second external library to its build path, was working fine. Since having added the scoreninja jar, I now get a NoClassDefFou..

Undoing accidental git stash pop

I stashed some local changes before doing a complicated merge, did the merge, then stupidly forgot to commit before running git stash pop. The pop created some problems (bad method calls in a big cod..

List of installed gems?

Is there a Ruby method I can call to get the list of installed gems? I want to parse the output of gem list. Is there a different way to do this?..

What is the cleanest way to disable CSS transition effects temporarily?

I have a DOM element with some/all of the following effects applied: #elem { -webkit-transition: height 0.4s ease; -moz-transition: height 0.4s ease; -o-transition: height 0.4s ease; transit..

How can I get column names from a table in Oracle?

I need to query the database to get the column names, not to be confused with data in the table. For example, if I have a table named EVENT_LOG that contains eventID, eventType, eventDesc, and eventT..

Fully custom validation error message with Rails

Using Rails I'm trying to get an error message like "The song field can't be empty" on save. Doing the following: validates_presence_of :song_rep_xyz, :message => "can't be empty" ... only displ..

how can I enable scrollbars on the WPF Datagrid?

When I run the following Northwind WPF Toolkit Datagrid code from this article, I get a datagrid, but there are no scrollbars and hence the user can only see part of the datagrid. I am using the newes..

api-ms-win-crt-runtime-l1-1-0.dll is missing when opening Microsoft Office file

I am facing this .dll library missing error: This programme can't start because api-ms-win-crt-runtime-l1-1-0.dll is missing. Try to reinstall this. When I try to open an Microsoft Office file..

Parse XML using JavaScript

I need to be able to parse XML using JavaScript. The XML will be in a variable. I would prefer not to use jQuery or other frameworks. I have looked at this, XML > jQuery reading...

MessageBox with YesNoCancel - No & Cancel triggers same event

I have a message box with the YesNoCancel buttons... Pressing Yes will do some action and close the application - works fine Pressing No will do nothing and close the application - (see below) Press..

How to reset the state of a Redux store?

I am using Redux for state management. How do I reset the store to its initial state? For example, let’s say I have two user accounts (u1 and u2). Imagine the following sequence of events: User u..

'NOT NULL constraint failed' after adding to

I'm using userena and after adding the following line to my zipcode = models.IntegerField(_('zipcode'), max_length=5) I get the following error after I ..

What happened to console.log in IE8?

According to this post it was in the beta, but it's not in the release?..

What is difference between functional and imperative programming languages?

Most of the mainstream languages, including object-oriented programming (OOP) languages such as C#, Visual Basic, C++, and Java were designed to primarily support imperative (procedural) programming, ..

Base 64 encode and decode example code

Does anyone know how to decode and encode a string in Base64 using the Base64. I am using the following code, but it's not working. String source = "password"; byte[] byteArray = source.getBytes("UT..

Convert time span value to format "hh:mm Am/Pm" using C#

I have a value stored in variable of type System.TimeSpan as follows. System.TimeSpan storedTime = 03:00:00; Can I re-store it in another variable of type String as follows? String displayValue = ..

Remove stubborn underline from link

I am attempting to have a link show up in white, without an underline. The text color shows up correctly as white, but the blue underline is stubbornly persisting. I tried text-decoration: none; and t..

Preferred Java way to ping an HTTP URL for availability

I need a monitor class that regularly checks whether a given HTTP URL is available. I can take care of the "regularly" part using the Spring TaskExecutor abstraction, so that's not the topic here. The..

Failed to authenticate on SMTP server error using gmail

I'm trying to set up email for my first laravel project, and was thrilled that there's a laracast for it: I've followed the simple steps, chose gmail in

Get records with max value for each group of grouped SQL results

How do you get the rows that contain the max value for each grouped set? I've seen some overly-complicated variations on this question, and none with a good answer. I've tried to put together the si..

Stock ticker symbol lookup API

Is there any sort of API that just offers a simple symbol lookup service? i.e., input a company name and it will tell you the ticker symbol? I've tried just screen-scraping Google Finance, but after a..

Error "can't use subversion command line client : svn" when opening android project checked out from svn

I'm new to Android development and the development tools around it. I have checked out a project from svn using TortoiseSVN client (can't manage to do it from within Android Studio), then get this err..

Rounding to 2 decimal places in SQL

every time I want to round to 2 decimal places when it comes to zeros it doesnt want to round it... how could I round it to 2 decimal places with zeros at the end which would give me 92.00 instead of ..

jQuery UI Dialog individual CSS styling

I'm looking to style a modal dialog (using UI Dialog) with unique CSS that is separate from the traditional dialog, so in essence to have two jQuery dialogs that each look different. I've styled one,..

How to generate entire DDL of an Oracle schema (scriptable)?

Can anyone tell me how I can generate the DDL for all tables, views, indexes, packages, procedures, functions, triggers, types, sequences, synonyms, grants, etc. inside an Oracle schema? Ideally, I wo..

How to post object and List using postman

I am using postman packaged app to send a post request. I want to request the following controller. How to send a post requestbody using postman object(with values) and a list using the raw format? ..

Localhost : 404 not found

I am using XAMPP. and internal server of Django. When I browse to localhost or, It shows Not Found . HTTP Error 404. The requested resource is not found. It sometimes works fine and other ..

Why AVD Manager options are not showing in Android Studio

Why i'm unable to see Android Virtual Device (AVD) I'm facing problem to create AVD in android studio, the problem is i'm unable to see any of this option Tools —> Android —> AVD Manager below s..

Count number of vector values in range with R

In R, if you test a condition on a vector instead of a scalar, it will return a vector containing the result of the comparison for each value in the vector. For example... > v <- c(1,2,3,4,5) &..

Get individual query parameters from Uri

I have a uri string like: Is there an existing function that would convert query parameter string into a dictionary same way as ASP.NET Contex..

Hibernate Criteria Restrictions AND / OR combination

How would I achieve this using Hibernate Restrictions? (((A='X') and (B in('X',Y))) or ((A='Y') and (B='Z'))) ..

How to update a record using sequelize for node?

I'm creating a RESTful API with NodeJS, express, express-resource, and Sequelize that is used to manage datasets stored in a MySQL database. I'm trying to figure out how to properly update a record u..

C# refresh DataGridView when updating or inserted on another form

I have 2 forms which are form A and form B, form A allowes user to insert and update student information. form b is only a DataGridView and button there. When I insert student on form A, then I go ..

Save PHP variables to a text file

I was wondering how to save PHP variables to a txt file and then retrieve them again. Example: There is an input box, after submitted the stuff that was written in the input box will be saved to a t..


Ok, so my schema is this: Table: Timesheet_Hours Columns: Timesheet_Id (PK, int) Staff_Id (int) BookedHours (int) Posted_Flag (boolean) This is an extremely simplified version of the table, but it w..

How do I write the 'cd' command in a makefile?

For example, I have something like this in my makefile: all: cd some_directory But when I typed make I saw only 'cd some_directory', like in the echo command...

Deny access to one specific folder in .htaccess

I'm trying to deny users from accessing the site/includes folder by manipulating the URL. I don't know if I have to deny everything and manually make individual exceptions to allow, if I can just den..

Renaming a directory in C#

I couldn't find a DirectoryInfo.Rename(To) or FileInfo.Rename(To) method anywhere. So, I wrote my own and I'm posting it here for anybody to use if they need it, because let's face it : the MoveTo me..

Does dispatch_async(dispatch_get_main_queue(), ^{...}); wait until done?

I have a scenario in my app, where I want to do some time consuming task which consists of some data processing as well as UI update, in a method. My method looks like this, - (void)doCalculationsAnd..

batch/bat to copy folder and content at once

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

How to use classes from .jar files?

I read the Java tutorials on Sun for JAR files, but I still can't find a solution for my problem. I need to use a class from a jar file called jtwitter.jar, I downloaded the file, and tried executing ..

Parsing HTTP Response in Python

I want to manipulate the information at THIS url. I can successfully open it and read its contents. But what I really want to do is throw out all the stuff I don't want, and to manipulate the stuff ..

jQuery - Trigger event when an element is removed from the DOM

I'm trying to figure out how to execute some js code when an element is removed from the page: jQuery('#some-element').remove(); // remove some element from the page /* need to figure out how to inde..

jQuery - Redirect with post data

How can I redirect with post data? How to move to new page with $_POST? How to do this? How is it done and whyfore shall it be done..

Have a div cling to top of screen if scrolled down past it

I have a div which, when my page is first loaded, is about 100px from the top (it holds some buttons etc. for the page). When a user scrolls past it, I would like the div to "follow" the user in that..

PHP mySQL - Insert new record into table with auto-increment on primary key

Wondering if there is a shorthand version to insert a new record into a table that has the primary key enabled? (i.e. not having to include the key column in the query) Lets say the key column is call..

How to load specific image from assets with Swift

I'm new to Swift and I want to load a special image from assets. For example I have: image 1 for iphone 4s = [email protected] image 2 for iphone 5/5s = [email protected] image 3 for iphon..

Reliable and fast FFT in Java

since I don't want to do it on my own, I am searching for a good FFT implementation for java. First I used this one here FFT Princeton but it uses objects and my profiler told me, that its not really ..

How to break out of jQuery each Loop

How do I break out of a jQuery each loop? I have tried: return false; In the loop but this did not work. Any ideas? Update 9/5/2020 I put the return false; in the wrong place. When I put it inside t..

Make footer stick to bottom of page using Twitter Bootstrap

I have some webpages that do not have much content and the footer sits in the middle of the page, but I want it to be at the bottom. I have put all my pages in a "holder" #holder { min-height: 10..

How do I concatenate strings with variables in PowerShell?

I'm trying to build a file path in PowerShell and the string concatenation seems to be a little funky. I have a list of folders: c:\code\MyProj1 c:\code\MyProj2 I want to get the path to a DLL fil..

Testing Private method using mockito

public class A { public void method(boolean b){ if (b == true) method1(); else method2(); } private void method1() {} private void ..

reactjs giving error Uncaught TypeError: Super expression must either be null or a function, not undefined

I am using reactjs. When I run the code below the browser says: Uncaught TypeError: Super expression must either be null or a function, not undefined Any hints at all as to what is wrong would be a..

Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine

I am facing this problem since more than a month, here is what I see when I run java on command line: $ java -Xmx1300m Error occurred during initialization of VM Could not reserve enough space for o..

Can I set a breakpoint on 'memory access' in GDB?

I am running an application through gdb and I want to set a breakpoint for any time a specific variable is accessed / changed. Is there a good method for doing this? I would also be interested in othe..

Abstract Class vs Interface in C++

Possible Duplicate: How do you declare an interface in C++? This is a general question about C++. As you know, there is no clear distinction between interface and abstract class in C++ unli..

When and how should I use a ThreadLocal variable?

When should I use a ThreadLocal variable? How is it used?..

How can I get key's value from dictionary in Swift?

I have a Swift dictionary. I want to get my key's value. Object for key method is not working for me. How do you get the value for a dictionary's key? This is my dictionary: var companies = ["AAPL" ..

scp from Linux to Windows

I am running a putty client on a Windows machine to connect successfully to a Linux box. Now I want to be able to copy a file from the Linux machine under the path /home/ubuntu/myfile to C:/Users/Ansh..

What is the maximum recursion depth in Python, and how to increase it?

I have this tail recursive function here: def recursive_function(n, sum): if n < 1: return sum else: return recursive_function(n-1, sum+n) c = 998 print(recursive_function..

How to make an authenticated web request in Powershell?

In C#, I might do something like this: System.Net.WebClient w = new System.Net.WebClient(); w.Credentials = new System.Net.NetworkCredential(username, auth, domain); string webpage = w.DownloadString..

Can I add an image to an ASP.NET button?

I want to add an image, instead of the default button. I already have a CSS class for the image, will this work? <asp:Button ID="..." CssClass=""/> I am trying it now, and the image is all s..

Plot a horizontal line using matplotlib

I have used spline interpolation to smooth a time series and would also like to add a horizontal line to the plot. But there seems to be an issue that is out of my grips. Any assistance would be reall..

Pandas dataframe get first row of each group

I have a pandas DataFrame like following. df = pd.DataFrame({'id' : [1,1,1,2,2,3,3,3,3,4,4,5,6,6,6,7,7], 'value' : ["first","second","second","first", "se..

Line break (like <br>) using only css

Is it possible in pure css, that is without adding additional html tags, to make a line break like <br>? I want the line break after the <h4> element, but not before: HTML <li> T..

Convert and format a Date in JSP

From my JSP Page, I am getting Date in this format. Fri May 13 2011 19:59:09 GMT 0530 (India Standard Time) How can I convert this to the pattern yyyy-MM-dd HH:mm:ss?..

SQL query to get most recent row for each instance of a given key

I'm trying to get the ip, user, and most recent timestamp from a table which may contain both the current ip for a user and one or more prior ips. I'd like one row for each user containing the most re..

SqlException: DB2 SQL error: SQLCODE: -302, SQLSTATE: 22001, SQLERRMC: null

What does sqlcode -302 means? Where do i get the sqlcode definitions? Please advice Thanks,..

Uninstall mongoDB from ubuntu

I have installed MongoDB 3.0.1 following the commands in Install MongoDB Community Edition on Ubuntu on my ubuntu 14.04 64 bit system and I installed Robomongo interface to use that. When I try to c..

How to access first element of JSON object array?

I exptect that mandrill_events only contains one object. How do I access its event-property? var req = { mandrill_events: '[{"event":"inbound","ts":1426249238}]' } ..

MySQL: @variable vs. variable. What's the difference?

In another question I posted someone told me that there is a difference between: @variable and: variable in MySQL. He also mentioned how MSSQL has batch scope and MySQL has session scope. Can so..

What are the main performance differences between varchar and nvarchar SQL Server data types?

I'm working on a database for a small web app at my school using SQL Server 2005. I see a couple of schools of thought on the issue of varchar vs nvarchar: Use varchar unless you deal with a lot of ..

ASP.NET Core configuration for .NET Core console application

ASP.NET Core support a new configuration system as seen here: Is this model also supported in .NET Core console applications? If not wh..

How to create an empty array in PHP with predefined size?

I am creating a new array in a for loop. for $i < $number_of_items $data[$i] = $some_data; PHP keeps complaining about the offset since for each iteration I add a new index for the array, wh..

How to access environment variable values?

I set an environment variable that I want to access in my Python application. How do I get its value?..

jQuery if statement to check visibility

I'm trying to write a script that will hidden/show div depending on other elements visibility. The action should take place when i click on other element. Here's what I've wrote so far: $('#column-l..

Word-wrap in an HTML table

I've been using word-wrap: break-word to wrap text in divs and spans. However, it doesn't seem to work in table cells. I have a table set to width:100%, with one row and two columns. Text in columns, ..

How can I trigger a Bootstrap modal programmatically?

If I go here And click 'Launch demo modal' it does the expected thing. I'm using the modal as part of my signup process and there is server side..

Using Font Awesome icon for bullet points, with a single list item element

We'd like to be able to use a Font Awesome ( ) icon as a bullet point for unordered lists in a CMS. The text editor on the CMS only outputs raw HTML so add..

How to highlight cell if value duplicate in same column for google spreadsheet?

I am looking for formula for google spreadsheet highlight cell if value duplicate in same column can anyone please assist me for this query?..

E: Unable to locate package mongodb-org

I am trying to download mongodb and I am following the steps on this link. But when I get to the step: sudo apt-get install -y mongodb-org I get the following error: Reading package lists... Done..

How to install mscomct2.ocx file from .cab file (Excel User Form and VBA)

I have an Excel spreadsheet with a user form that uses the calendar control. It works fine on my machine, but others can't use it because they are missing the mscomct2.ocx file. I found where to dow..

Understanding __get__ and __set__ and Python descriptors

I am trying to understand what Python's descriptors are and what they are useful for. I understand how they work, but here are my doubts. Consider the following code: class Celsius(object): def _..

Convert nullable bool? to bool

How do you convert a nullable bool? to bool in C#? I have tried x.Value or x.HasValue .....

How do I prevent mails sent through PHP mail() from going to spam?

I am using PHP's mail() function to send emails (sendmail process is running). But all the mails are going to spam (in case of gmail). I have tried many tricks that I found on the net but none is work..

CLEAR SCREEN - Oracle SQL Developer shortcut?

With the aim of reducing mouse activity I was wondering if there was such a command shortcut (eg cls or Ctrl + L) to provide the SQL * Plus (?) "CLEAR SCREEN" command functionality found by clicking t..

How do I check if a file exists in Java?

How can I check whether a file exists, before opening it for reading in Java (the equivalent of Perl's -e $filename)? The only similar question on SO deals with writing the file and was thus an..

Why does JPA have a @Transient annotation?

Java has the transientkeyword. Why does JPA have @Transient instead of simply using the already existing java keyword?..

How to Ping External IP from Java Android

I am developing a Ping application for Android 2.2. I try my code and it works, but only in local IPs, that's my problem I want to do ping to external servers too. Here is my code: private OnClic..

How to deal with page breaks when printing a large HTML table

I have a project which requires printing an HTML table with many rows. My problem is the way the table is printed over multiple page. It will sometimes cut a row in half, making it unreadable because..

Is there a Sleep/Pause/Wait function in JavaScript?

Is there a JavaScript function that simulates the operation of the sleep function in PHP — a function that pauses code execution for x milliseconds, and then resumes where it left off? I found some..

Paste MS Excel data to SQL Server

I have a bunch of rows in Excel that I want to paste into a new table in MS SQL. Is there a simple way ?..

How to Convert double to int in C?

double a; a = 3669.0; int b; b = a; I am getting 3668 in b, instead of 3669. How do I fix This problem? And if have 3559.8 like that also I want like 3559 not 3560...

elasticsearch bool query combine must with OR

I am currently trying to migrate a solr-based application to elasticsearch. I have this lucene query (( name:(+foo +bar) OR info:(+foo +bar) )) AND state:(1) AND (has_image:(0) OR has_ima..

Simple UDP example to send and receive data from same socket

For some reason I am having a hard time sending and receiving data from the same socket. Anyways here is my client code: var client = new UdpClient(); IPEndPoint ep = new IPEndPoint(IPAddress.Parse("..

How to find MySQL process list and to kill those processes?

The MySQL database hangs, due to some queries. How can I find the processes and kill them?..

How to preview git-pull without doing fetch?

Is it even possible? Basically, there's a remote repository from which I pull using just: git pull Now, I'd like to preview what this pull would change (a diff) without touching anything on my sid..

Trying Gradle build - "Task 'build' not found in root project"

I just started to read "Pro Spring MVC with web flow" and it comes with a code sample that I want to follow. What I want - I want to build the applications as it's done in the book, using Gradle Wh..

Excel Define a range based on a cell value

Is it possible to define a range based on a value given in a cell. So, for example: My selection is A1:A5 That are five cells. is it possible to let excel determine this by setting a cell value (lik..

What is causing this error - "Fatal error: Unable to find local grunt"

I removed the old version of grunt first, then I installed the new grunt version, and then I got this error: D:\www\grunt-test\grunt grunt-cli: The grunt command line interface. (v0.1.4) Fa..

.NET: Simplest way to send POST with data and read response

To my surprise, I can't do anything nearly as simple as this, from what I can tell, in the .NET BCL: byte[] response = Http.Post ( url: "", contentType: "application/x-..

How can I select the row with the highest ID in MySQL?

How can I select the row with the highest ID in MySQL? This is my current code: SELECT * FROM permlog WHERE max(id) Errors come up, can someone help me?..

How to remove responsive features in Twitter Bootstrap 3?

Since Bootstrap 3 there's no longer seperate files for responsive and standard stylesheets. So how can I easily remove the responsive features?..

Pass parameters in setInterval function

Please advise how to pass parameters into a function called using setInterval. My example setInterval(funca(10,3), 500); is incorrect. ..

How do I determine k when using k-means clustering?

I've been studying about k-means clustering, and one thing that's not clear is how you choose the value of k. Is it just a matter of trial and error, or is there more to it?..

How to compare two dates in Objective-C

I have two dates: 2009-05-11 and the current date. I want to check whether the given date is the current date or not. How is this possible...

Access a URL and read Data with R

Is there a way I can specify and get data from a web site URL on to a CSV file for analysis using R?..

Make selected block of text uppercase

Can I make a multi-line selection of text all capitals in Visual Studio Code? In full Visual Studio it's CTRL+SHIFT+U to do this. The extension that exists that I have seen only do non-multi-line bl..

MySQL match() against() - order by relevance and column?

Okay, so I'm trying to make a full text search in multiple columns, something simple like this: SELECT * FROM pages WHERE MATCH(head, body) AGAINST('some words' IN BOOLEAN MODE) Now i want to order..

Importing two classes with same name. How to handle?

Say I've a code like: import java.util.Date; import my.own.Date; class Test{ public static void main(String [] args){ // I want to choose my.own.Date here. How? .. // I want to choos..

jQuery autohide element after 5 seconds

Is it possible to automatically hide an element in a web page 5 seconds after the form loads using jQuery? Basically, I've got <div id="successMessage">Project saved successfully!</div> ..

T-SQL - function with default parameters

I have this script: CREATE FUNCTION dbo.CheckIfSFExists(@param1 INT, @param2 BIT = 1 ) RETURNS BIT AS BEGIN IF EXISTS ( bla bla bla ) RETURN 1; RETURN 0; END GO I want to use it in ..

Running Node.js in apache?

We have an Apache Webserver installed on a machine which also serves pages using Perl. For a project I've decided to use Node.js instead of Perl/Ruby. Just wondering if it's possible to use Apache as..

How to Update Multiple Array Elements in mongodb

I have a Mongo document which holds an array of elements. I'd like to reset the .handled attribute of all objects in the array where .profile = XX. The document is in the following form: { "_i..