Questions Tagged with #Sharepoint 2010

For SharePoint-specific questions, please see the SharePoint Stack Exchange site at http://sharepoint.stackexchange.com/

exceeds the list view threshold 5000 items in Sharepoint 2010

I'm upgrade my sp 2007 to sp 2010 and I have a form library has more then 5000 items. Default view of form library filter items and show only 10-20 item to users. After upgrade sp2010 All users get b..

Could not load file or assembly '' or one of its dependencies

Any help please? I have only one library and it is driving me crazy. this is the error that I receive. I am not using any other dependancies. Could not load file or assembly 'FOD.Intranet.Lib, Versi..

Solving SharePoint Server 2010 - 503. The service is unavailable, After installation

Installed: SharePoint Server 2010 for Internet Enterprise Beta (x64) On: Windows Server 2008 Standard (x64) on 64 bit hardware Attempts to access the Central Administration console led to IIS returni..

Error :The remote server returned an error: (401) Unauthorized

I want get picture of internet and insert into word . I use this code . MainDocumentPart mainPart = wordprocessingDocument.MainDocumentPart; System.Net.WebRequest request = System.Net.HttpWebRe..

Can two or more people edit an Excel document at the same time?

I have a SharePoint 2010 site with a document library for storing Excel files. If someone is editing an Excel file (using stand-alone Excel, not Excel services), everyone else will be forced to open ..

How do I delay a function call for 5 seconds?

I want widget.Rotator.rotate() to be delayed 5 seconds between calls... how do I do this in jQuery... it seems like jQuery's delay() wouldn't work for this.....

How to Compare a long value is equal to Long value

long a = 1111; Long b = 1113; if(a == b) { System.out.println("Equals"); }else{ System.out.println("not equals"); } the above code prints a "equals" in console, which is wrong answer. my qe..

PHP Session timeout

I am creating a session when a user logs in like so: $_SESSION['id'] = $id; How can I specify a timeout on that session of X minutes and then have it perform a function or a page redirect once it h..

Mockito - NullpointerException when stubbing Method

So I started writing tests for our Java-Spring-project. What I use is JUnit and Mockito. It's said, that when I use the when()...thenReturn() option I can mock services, without simulating them or s..

Angular 2 two way binding using ngModel is not working

Can't bind to 'ngModel' since it isn't a know property of the 'input' element and there are no matching directives with a corresponding property Note: im using alpha.31 import { Component, View, boo..

Detect iPad users using jQuery?

Is there a way to detect if the current user is using an iPad using jQuery/JavaScript?..

Calling a particular PHP function on form submit

I was trying to call a particular php function in submit of a form both the form and php scripts are in same page. My code is below.(it is not working and so I need help) <html> <body>..

How do I search for a pattern within a text file using Python combining regex & string/file operations and store instances of the pattern?

So essentially I'm looking for specifically a 4 digit code within two angle brackets within a text file. I know that I need to open the text file and then parse line by line, but I am not sure the bes..

How to write a bash script that takes optional input arguments?

I want my script to be able to take an optional input, e.g. currently my script is #!/bin/bash somecommand foo but I would like it to say: #!/bin/bash somecommand [ if $1 exists, $1, else, foo..

Adding a newline character within a cell (CSV)

I would like to import product descriptions that need to be logically broken according by things like description, dimensions, finishes etc. How can I insert a line break so that when I import the fi..

Generating an MD5 checksum of a file

Is there any simple way of generating (and checking) MD5 checksums of a list of files in Python? (I have a small program I'm working on, and I'd like to confirm the checksums of the files)...

How to replace space with comma using sed?

I would like to replace the empty space between each and every field with comma delimiter.Could someone let me know how can I do this.I tried the below command but it doesn't work.thanks. My command:..

How to run an external program, e.g. notepad, using hyperlink?

I'm generating an HTML report by C# to print pairs of files in a table which has 3 columns: the first two columns used for the filenames and the 3rd column is a hyperlink Compare - I want this link to..

Linux find and grep command together

I am trying to find a command or create a Linux script that can do this two comands and list the otuput find . -name '*bills*' -print this prints all the files ./may/batch_bills_123.log ./april/ba..

Excel VBA - exit for loop

I would like to exit my for loop when a condition inside is met. How could I exit my for loop when the if condition has been met? I think some kind of exit at the end of my if statement, but don't kno..

Why doesn't TFS get latest get the latest?

Why Why WHY doesn't TFS's get latest work consistently? You would have thought that feature would have been tested thoroughly. What I have to do is, get specific version, then check both overwrite w..

Error :The remote server returned an error: (401) Unauthorized

I want get picture of internet and insert into word . I use this code . MainDocumentPart mainPart = wordprocessingDocument.MainDocumentPart; System.Net.WebRequest request = System.Net.HttpWebRe..

MySQL said: Documentation #1045 - Access denied for user 'root'@'localhost' (using password: NO)

I installed xampp,but when I tried to run it I got an error as thus: Error MySQL said: Documentation 1045 - Access denied for user 'root'@'localhost' (using password: NO) Connection for controluser as..

Trigger function when date is selected with jQuery UI datepicker

How can I trigger onSelect event when I select a selected date on jQuery UI datepicker?..

SQL left join vs multiple tables on FROM line?

Most SQL dialects accept both the following queries: SELECT a.foo, b.foo FROM a, b WHERE a.x = b.x SELECT a.foo, b.foo FROM a LEFT JOIN b ON a.x = b.x Now obviously when you need an outer join, th..

C# Listbox Item Double Click Event

I have a list box with some items. Is there anyway I can attach a double click event to each item? Item 1 Item 2 Item 3 If i was to double click Item 2, a Messagebox saying "Item 2" would pop up H..

sqlite copy data from one table to another

SQLITE I have 2 tables "Source" and "Destination" that have the same fields. ID and COUNTRY, though they both have other fields too that are not in common. I need to copy the Source.Country value to..

How do you stop tracking a remote branch in Git?

How do you stop tracking a remote branch in Git? I am asking to stop tracking because in my concrete case, I want to delete the local branch, but not the remote one. Deleting the local one and pushin..

Xcode - How to fix 'NSUnknownKeyException', reason: … this class is not key value coding-compliant for the key X" error?

I'm trying to link a UILabel with an IBOutlet created in my class. My application is crashing with the following error. What does this mean? How can I fix it? *** Terminating app due to uncau..

Python - How do you run a .py file?

I've looked all around Google and its archives. There are several good articles, but none seem to help me out. So I thought I'd come here for a more specific answer. The Objective: I want to run this..

Making button go full-width?

I want a button to take up the full width of the column, but having difficulties... <div class="span9 btn-block"> <button class="btn btn-large btn-block btn-primary" type="button">Blo..

How to set True as default value for BooleanField on Django?

I am using BooleanField in Django. By default, the checkbox generated by it is unchecked state. I want the state to be checked by default. How do I do that?..

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

Java Error opening registry key

I get this error when I try to do anything with Java in command prompt: Error opening registry key 'Software\JavaSoft\Java Runtime Environment.3' Error: could not find Java.dll Error: could not find ..

Elasticsearch difference between MUST and SHOULD bool query

What is the difference between MUST and SHOULD bool query in ES? If I ONLY want results that contain my terms should I then use must ? I have a query that should only contain certain values, and als..

List of all special characters that need to be escaped in a regex

I am trying to create an application that matches a message template with a message that a user is trying to send. I am using Java regex for matching the message. The template/message may contain spec..

What is ToString("N0") format?

This code is from Charles Pettzold's "Programming Windows Sixth Edition" book: public object Convert(object value, Type targetType, object parameter, string language) { return ((double)value).T..

Determine a string's encoding in C#

Is there any way to determine a string's encoding in C#? Say, I have a filename string, but I don't know if it is encoded in Unicode UTF-16 or the system-default encoding, how do I find out?..

What's the proper way to install pip, virtualenv, and distribute for Python?

Short Question What is the proper way to install pip, virtualenv, and distribute? Background In my answer to SO question 4314376, I recommended using ez_setup so that you could then install pip and ..

Table Naming Dilemma: Singular vs. Plural Names

Academia has it that table names should be the singular of the entity that they store attributes of. I dislike any T-SQL that requires square brackets around names, but I have renamed a Users table..

json_decode to array

I am trying to decode a JSON string into an array but i get the following error. Fatal error: Cannot use object of type stdClass as array in C:\wamp\www\temp\asklaila.php on line 6 Here is..

Getting json body in aws Lambda via API gateway

I'm currently using NodeJS to build a bot on AWS lambda via AWS Api Gateway and I'm running into an issue with POST requests and JSON data. My api uses 'Use Lambda Proxy integration' and even when I t..

Regex matching beginning AND end strings

This seems like it should be trivial, but I'm not so good with regular expressions, and this doesn't seem to be easy to Google. I need a regex that starts with the string 'dbo.' and ends with the str..

Reduce git repository size

I tried looking for a good tutorial on reducing repo size, but found none. How do I reduce my repo size...it's about 10 MB, but the thing is Heroku only allows 50 MB and I'm no where near finished dev..

Change working directory in my current shell context when running Node script

I am trying to change the working directory of my Node.js script when it is run from a bin script. I have something like the following: #!/usr/bin/env node process.chdir('/Users') When I then run t..

How to get a file directory path from file path?

In Bash, if VAR="/home/me/mydir/file.c", how do I get "/home/me/mydir"?..

What is the use of ObservableCollection in .net?

What is the use of ObservableCollection in .net?..

What's the common practice for enums in Python?

Possible Duplicate: How can I represent an 'enum' in Python? What's the common practice for enums in Python? I.e. how are they replicated in Python? public enum Materials { Shaded, ..

python numpy vector math

What is the numpy equivalent to euclid's 2d vector classes / operations ? ( like: euclid.Vector2 ) So far I have this. Create two vectors import numpy as np loc = np.array([100., 100.]) vel = np.a..

Setting DataContext in XAML in WPF

I have following code: MainWindow.xaml <Window x:Class="SampleApplication.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.mic..

UICollectionView - dynamic cell height?

I need to display a bunch of collectionViewCells that have different heights. the views are too complex and I don't want to manually calculate the expected height. I want to enforce auto-layout to cal..

Visual Studio Code compile on save

How can I configure Visual Studio Code to compile typescript files on save? I see it is possible to configure a task to build the file in focus using the ${file} as an argument. But I would like th..

Want to move a particular div to right

I want to move a particular div more to the right side so that the div in the left gets some more space to display the contents in it. I tried few things in CSS, but I know I am doing something wrong..

Scanner vs. StringTokenizer vs. String.Split

I just learned about Java's Scanner class and now I'm wondering how it compares/competes with the StringTokenizer and String.Split. I know that the StringTokenizer and String.Split only work on String..

Android Studio: Module won't show up in "Edit Configuration"

I've imported a project to Android Studio with several subprojects. I want to run a subproject. I successfully made this subproject's build.gradle as a module. In order to run it, I went to Run ..

Short circuit Array.forEach like calling break

[1,2,3].forEach(function(el) { if(el === 1) break; }); How can I do this using the new forEach method in JavaScript? I've tried return;, return false; and break. break crashes and return does no..

Wrap long lines in Python

How do I wrap long lines in Python without sacrificing indentation? For example: def fun(): print '{0} Here is a really long sentence with {1}'.format(3, 5) Suppose this goes over the 79 cha..

How to return JSON with ASP.NET & jQuery

I cannot get how I can return JSON data with my code. JS $(function () { $.ajax({ type: "POST", url: "Default.aspx/GetProducts", data: "{}", contentType: "application..

QString to char* conversion

I was trying to convert a QString to char* type by the following methods, but they don't seem to work. //QLineEdit *line=new QLineEdit();{just to describe what is line here} QString temp=line->te..

How to extract numbers from a string in Python?

I would extract all the numbers contained in a string. Which is the better suited for the purpose, regular expressions or the isdigit() method? Example: line = "hello 12 hi 89" Result: [12, 89] ..

Click in OK button inside an Alert (Selenium IDE)

I need to click the 'Ok' button inside an alert window with a Selenium command. I've tried assertAlert or verifyAlert but they don't do what I want. It's possible the click the 'Ok' button? If so, ca..

Python Set Comprehension

So I have these two problems for a homework assignment and I'm stuck on the second one. Use a Python Set Comprehension (Python's equivalent of Set Builder notation) to generate a set of all of the ..

Twitter Bootstrap button click to toggle expand/collapse text section above button

I have recently come accross bootstrap and I am working on extending the hero example. I want to add the following behaviour to my page: When a button (i.e. an element with selector '.row .btn') is c..

Symfony 2 EntityManager injection in service

I've created my own service and I need to inject doctrine EntityManager, but I don't see that __construct() is called on my service, and injection doesn't work. Here is the code and configs: <?p..

Recursive query in SQL Server

I have a table with following structure Table name: matches That basically stores which product is matching which product. I need to process this table And store in a groups table like below. Tab..

Throw HttpResponseException or return Request.CreateErrorResponse?

After reviewing an article Exception Handling in ASP.NET Web API I am a bit confused as to when to throw an exception vs return an error response. I am also left wondering whether it is possible to mo..

Why doesn't margin:auto center an image?

<html> <head> <title>Test</title> </head> <body> <div> <img src="queuedError.jpg" style="margin:auto; width:200px;" /> </div> <..

How to run an awk commands in Windows?

I have downloaded gawk from here, but I can't seem to figure out how to use it. I am simply trying to run a command, not to write one...

Update Tkinter Label from variable

I wrote a Python script that does some task to generate, and then keep changing some text stored as a string variable. This works, and I can print the string each time it gets changed. I can get the ..

How to customize a Spinner in Android

I want to add a custom height to the dropdown of a Spinner, say 30dp, and I want to hide the dividers of the dropdown list of Spinner. So far I tried to implement following style to the Spinner: <..

An unhandled exception occurred during the execution of the current web request. ASP.NET

I just ran my program and I got this error message An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the..

GetFiles with multiple extensions

Possible Duplicate: Can you call Directory.GetFiles() with multiple filters? How do you filter on more than one extension? I've tried: FileInfo[] Files = dinfo.GetFiles("*.jpg;*.tiff;*.bm..

Determine number of pages in a PDF file

I need to determine the number of pages in a specified PDF file using C# code (.NET 2.0). The PDF file will be read from the file system, and not from an URL. Does anyone have any idea on how this c..

Executing periodic actions in Python

I am working on Windows. I want to execute a function foo() every 10 seconds. How do I do this?..

Printing Lists as Tabular Data

I am quite new to Python and I am now struggling with formatting my data nicely for printed output. I have one list that is used for two headings, and a matrix that should be the contents of the tabl..

Python 3 Building an array of bytes

I need to build a tcp frame with raw binary data, but all examples and tutorials I've found talking about bytes always involve conversion from a string, and that's not what I need. In short, I need t..

jQuery AJAX Character Encoding

I'm currently coding a French website. There's a schedule page, where a link on the side can be used to load another day's schedule. Here's the JS I'm using to do this: <script type="text/jav..

Is there a better way to do optional function parameters in JavaScript?

I've always handled optional parameters in JavaScript like this: function myFunc(requiredArg, optionalArg){ optionalArg = optionalArg || 'defaultValue'; // Do stuff } Is there a better way to ..

java.lang.IllegalStateException: Fragment not attached to Activity

I am rarely getting this error while making an API call. java.lang.IllegalStateException: Fragment not attached to Activity I tried putting the code inside isAdded() method to check whether fragm..

Is there a way to access an iteration-counter in Java's for-each loop?

Is there a way in Java's for-each loop for(String s : stringArray) { doSomethingWith(s); } to find out how often the loop has already been processed? Aside from using the old and well-known for(..

Manually Set Value for FormBuilder Control

This is driving me nuts, I'm under the gun and can't afford to spend another whole day on this. I am trying to manually set a control value ('dept') within the component, and it's just not working - ..

How to solve error "Missing `secret_key_base` for 'production' environment" (Rails 4.1)

I created a Rails application, using Rails 4.1, from scratch and I am facing a strange problem that I am not able to solve. Every time I try to deploy my application on Heroku I get an error 500: Mi..

String comparison: InvariantCultureIgnoreCase vs OrdinalIgnoreCase?

Which would be better code: int index = fileName.LastIndexOf(".", StringComparison.InvariantCultureIgnoreCase); or int index = fileName.LastIndexOf(".", StringComparison.OrdinalIgnoreCase); ..

How do I print a list of "Build Settings" in Xcode project?

Alternate Titles List of Xcode build variables Print a list of Xcode Build Settings Clang Environment Variables Canonical list of Xcode Environment Variables Is there a Canonical list of Xcode Envir..

How do I dump the data of some SQLite3 tables?

How do I dump the data, and only the data, not the schema, of some SQLite3 tables of a database (not all the tables)? The dump should be in SQL format, as it should be easily re-entered into the datab..

How to get current relative directory of your Makefile?

I have a several Makefiles in app specific directories like this: /project1/apps/app_typeA/Makefile /project1/apps/app_typeB/Makefile /project1/apps/app_typeC/Makefile Each Makefile includes a .inc..

Fastest way to determine if record exists

As the title suggests... I'm trying to figure out the fastest way with the least overhead to determine if a record exists in a table or not. Sample query: SELECT COUNT(*) FROM products WHERE produc..

Make one div visible and another invisible

I have two div tags, one is for the search and the other is for the results. What I need is for when the submit button is clicked the results are returned and placed into the results div (with an ifra..

Relative path in HTML

I am creating a website on localhost. I want to make all of link resources in my website to relative path ( I mean only internal resources). website is located in http://localhost/mywebsite I rea..

Inserting a value into all possible locations in a list

I am trying to do print all the possible outcomes of a given list and I was wondering how to put a value into various locations in the list. For example, if my list was [A, B], I want to insert X into..

What is the difference between SQL, PL-SQL and T-SQL?

What is the difference between SQL, PL-SQL and T-SQL? Can anyone explain what the differences between these three are, and provide scenarios where each would be relevantly used?..

Retrieving Android API version programmatically

Is there any way to get the API version that the phone is currently running?..

Use Excel VBA to click on a button in Internet Explorer, when the button has no "name" associated

I'm trying to use excel to automate the value entering in a time sheet. The time sheet is on a web page. Right now I'm able to load the page, enter my username and password and then entering the time..

How do I convert a Swift Array to a String?

I know how to programmatically do it, but I'm sure there's a built-in way... Every language I've used has some sort of default textual representation for a collection of objects that it will spit ou..

How to Set/Update State of StatefulWidget from other StatefulWidget in Flutter?

For Example in the below code plus button works and able to update the text but the minus button does not. But if we press FloatingActionButton then the State is refreshed . The minus button is chang..

align 3 images in same row with equal spaces?

i want to align 3 images in same row in a div, the 1st image should be aligned to complete left of page, the third image should be aligned to complete right of the page and the 2nd image should be ali..

How can I get a list of Git branches, ordered by most recent commit?

I want to get a list of all the branches in a Git repository with the "freshest" branches at the top, where the "freshest" branch is the one that's been committed to most recently (and is, therefore, ..

How to display multiple notifications in android

I am receiving only one notification and if there comes another notification, it replaces the previous one and here is my code private static void generateNotification(Context context, String message..

Java 8 Filter Array Using Lambda

I have a double[] and I want to filter out (create a new array without) negative values in one line without adding for loops. Is this possible using Java 8 lambda expressions? In python it would be t..

Float a div above page content

I've implemented a popup box that dynamically displays search options. I want the box to "float" above all of the site content. Currently, when the box is displayed it displaces all of the content b..

Meaning of numbers in "col-md-4"," col-xs-1", "col-lg-2" in Bootstrap

I am confused with the grid system in the new Bootstrap, particularly these classes: col-lg-* col-md-* col-xs-* (where * represents some number). Can anyone please explain the following: How tha..

How to get a list of installed android applications and pick one to run

I asked a similar question to this earlier this week but I'm still not understanding how to get a list of all installed applications and then pick one to run. I've tried: Intent intent = new Inten..

How to convert JSON to a Ruby hash

I have a JSON object holding the following value: @value = {"val":"test","val1":"test1","val2":"test2"} I want to loop through it in Ruby to get the key/value pairs. When I use @each, it doesn't it..

Center align a column in twitter bootstrap

I've started learning Bootstrap. My question is how to center align a column horizontally, bootstrap contains 12 column layout, there is no middle number. To be more clear if it was 11 column layout, ..

Entity Framework: One Database, Multiple DbContexts. Is this a bad idea?

My impression to date has been that a DbContext is meant to represent your database, and thus, if your application uses one database, you'd want only one DbContext. However, some colleagues want to b..

Global variables in Javascript across multiple files

A bunch of my JavaScript code is in an external file called helpers.js. Inside the HTML that calls this JavaScript code I find myself in need of knowing if a certain function from helpers.js has been ..

How to change MenuItem icon in ActionBar programmatically

How to change MenuItem icon in ActionBar programmatically? I tried to use MenuItem menuItem = (MenuItem)findViewById(R.id.action_settings); menuItem.setIcon(getResources().getDrawable(R.drawable.ic_l..

How to subtract days from a plain Date?

Is there an easy way of taking a olain JavaScript Date (e.g. today) and going back X days? So, for example, if I want to calculate the date 5 days before today...

How to filter multiple values (OR operation) in angularJS

I want to use the filter in angular and want to filter for multiple values, if it has either one of the values then it should be displayed. I have for example this structure: An object movie which..

Get product id and product type in magento?

I am creating magento store. I am beginner in magento. I want to get product id and product input type in my phtml file is this possible? please guide me.. I am trying to this way to get product typ..

How to remove square brackets from list in Python?

LIST = ['Python','problem','whatever'] print(LIST) When I run this program I get [Python, problem, whatever] Is it possible to remove that square brackets from output?..

How to check the differences between local and github before the pull

Before using pull, I want to check if there are any differences between my local and github master. How can I do it?..

How do I run all Python unit tests in a directory?

I have a directory that contains my Python unit tests. Each unit test module is of the form test_*.py. I am attempting to make a file called all_test.py that will, you guessed it, run all files in the..

Selenium WebDriver and DropDown Boxes

If I want to select an option of a dropdown box, there are several ways to do that. I always used: driver.findElement(By.id("selection")).sendKeys("Germany"); But that didn't work every time. Som..

How can I pass an Integer class correctly by reference?

I am hoping that someone can clarify what is happening here for me. I dug around in the integer class for a bit but because integer is overriding the + operator I could not figure out what was going ..

Variable name as a string in Javascript

Is there a way to get a variable name as a string in Javascript? (like NSStringFromSelector in Cocoa) I would like to do like this: var myFirstName = 'John'; alert(variablesName(myFirstName) + ":" +..

How to write a PHP ternary operator

How do I write a PHP ternary operator with the elseif portion? I see basic examples with the if and else portions of the PHP ternary operator like this: echo (true) ? "yes" : "no"; //prints yes ..

How schedule build in Jenkins?

How do I schedule a Jenkins build such that it would be able to build only at specific hours every day? For example to start at 4 PM 0 16 1-7 * * I understand that as: 0 minutes, at 4 o'clock PM f..

Dynamically add script tag with src that may include document.write

I want to dynamically include a script tag in a webpage however I have no control of it's src so src="source.js" may look like this. document.write('<script type="text/javascript">') document.w..

How to add external library in IntelliJ IDEA?

I am trying to add external library (places it in the /libs directory) to my project. When I try to use the methods from that library, I see that they are in red color which means that the library is ..

How to delete shared preferences data from App in Android

How do I delete SharedPreferences data for my application? I'm creating an application that uses a lot of web services to sync data. For testing purposes, I need to wipe out some SharedPreferences va..

I get exception when using Thread.sleep(x) or wait()

I have tried to delay - or put to sleep - my Java program, but an error occurs. I'm unable to use Thread.sleep(x) or wait(). The same error message appears: unreported exception java.lang.Interr..

Oracle SQL - select within a select (on the same table!)

I'll try and explain what I'm trying to achieve quickly, since I have no idea how to explain it otherwise! We have a table here that shows all employment history for all employees, I want the "Start_..

Iterate all files in a directory using a 'for' loop

How can I iterate over each file in a directory using a for loop? And how could I tell if a certain entry is a directory or if it's just a file?..

How can I generate a 6 digit unique number?

How can I generate a 6 digit unique number? I have verification mechanisms in place to check for duplicate entries...

Purpose of a constructor in Java?

What is the purpose of a constructor? I've been learning Java in school and it seems to me like a constructor is largely redundant in things we've done thus far. It remains to be seen if a purpose com..

How to quickly test some javascript code?

What would be a good way to test Javascript on a browser? Should there be a localhost in my computer? and how to create one?..

DataTables: Cannot read property style of undefined

I am getting this error with the following: jquery.dataTables.js:4089 Uncaught TypeError: Cannot read property 'style' of undefined(…) _fnCalculateColumnWidths @ jquery.dataTables.js:4089 _fnInitia..

Programmatically Creating UILabel

I know this should be very simple, but I've been really struggling with creating a UILabel programmatically and getting it to behave the way I would like. All I want is to be able to create a label, ..

Copying PostgreSQL database to another server

I'm looking to copy a production PostgreSQL database to a development server. What's the quickest, easiest way to go about doing this?..

What is the use of printStackTrace() method in Java?

I am going through a socket program. In it, printStackTrace is called on the IOException object in the catch block. What does printStackTrace() actually do? catch(IOException ioe) { ioe.printStac..

Android Fragment onClick button Method

I'm trying to invoke the method in my onClick (View v) XML, but does not work with Fragment. This is the error. 01-17 12:38:36.840: E/AndroidRuntime(4171): java.lang.IllegalStateException: Could not..

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

Using a SELECT statement within a WHERE clause

SELECT * FROM ScoresTable WHERE Score = (SELECT MAX(Score) FROM ScoresTable AS st WHERE st.Date = ScoresTable.Date) Is there a name to describe using a SELECT statement within a WHERE clause? Is ..

What does "export" do in shell programming?

As far as I can tell, variable assignment is the same whether it is or is not preceded by "export". What's it for?..

PHP CURL & HTTPS

I found this function that does an AWESOME job (IMHO): http://nadeausoftware.com/articles/2007/06/php_tip_how_get_web_page_using_curl /** * Get a web file (HTML, XHTML, XML, image, etc.) from a URL...

What is the difference between Double.parseDouble(String) and Double.valueOf(String)?

I want to convert String to a Double data type. I do not know if I should use parseDouble or valueOf. What is the difference between these two methods?..

Extract first item of each sublist

I am wondering what is the best way to extract the first item of each sublist in a list of lists and append it to a new list. So if I have: lst = [[a,b,c], [1,2,3], [x,y,z]] and I want to pull out ..

How can I read inputs as numbers?

Why are x and y strings instead of ints in the below code? (Note: in Python 2.x use raw_input(). In Python 3.x use input(). raw_input() was renamed to input() in Python 3.x) play = True while play:..

Convert string to buffer Node

I am using a library which on call of a function returns the toString of a buffer. The exact code is return Buffer.concat(stdOut).toString('utf-8'); But I don't want string version of it. I just..

How can I remove space (margin) above HTML header?

I am creating a website. I have written the HTML part and now I am writing the stylesheet. But there is always some space above my header. How can I remove it? My HTML and CSS code is given below. ..

Is it possible to overwrite a function in PHP

Can you declare a function like this... function ihatefooexamples(){ return "boo-foo!"; }; And then redeclare it somewhat like this... if ($_GET['foolevel'] == 10){ function ihatefooexamples()..

Equivalent function for DATEADD() in Oracle

I have to get a date that is 6 months from the system date in Oracle. And I have to get it by running an open-query from SQL. DATEADD(MONTH,-6, GETDATE()) function serves the purpose in SQL. Does the..

Writing to a TextBox from another thread?

I cannot figure out how to make a C# Windows Form application write to a textbox from a thread. For example in the Program.cs we have the standard main() that draws the form: static void Main() { ..

How to update (append to) an href in jquery?

I have a list of links that all go to a google maps api. the links already have the daddr (destination) parameter in them as static. I am using Geo-Location to find the users position and I want to a..

Why is 1/1/1970 the "epoch time"?

Why is 1 January 1970 00:00:00 considered the epoch time?..

Parsing Json rest api response in C#

I am trying to pull a value from a rest api json response using C#. I have the following code: client.BaseUrl = "https://api.cloud.appcelerator.com"; request.Resource = "/v1/chats/create.json?key=" ..

Python Accessing Nested JSON Data

I'm trying to get the zip code for a particular city using zippopotam.us. I have the following code which works, except when I try to access the post code key which returns TypeError: expected string ..

Eclipse DDMS error "Can't bind to local 8600 for debugger"

I get the following error in Eclipse: [timestamp - ddms] Can't bind to local 8600 for debugger Why?..

How to set String's font size, style in Java using the Font class?

Suppose I have a String, "Hello World". I want to change the style of this string to a BOLD font, and set the size of all the characters from 12 to 18 [pt]. After that I want to use this string in a J..

javascript change background color on click

Can you show me Javascript that allows you to change the background color of the page to another color. For example, I have a blue background color and I want to change it to green. The color must be ..

How would you count occurrences of a string (actually a char) within a string?

I am doing something where I realised I wanted to count how many /s I could find in a string, and then it struck me, that there were several ways to do it, but couldn't decide on what the best (or eas..

Using HTML5 file uploads with AJAX and jQuery

Admittedly, there are similar questions lying around on Stack Overflow, but it seems none quite meet my requirements. Here is what I'm looking to do: Upload an entire form of data, one piece of whi..

Does Java read integers in little endian or big endian?

I ask because I am sending a byte stream from a C process to Java. On the C side the 32 bit integer has the LSB is the first byte and MSB is the 4th byte. So my question is: On the Java side when we ..

Is it a good practice to use an empty URL for a HTML form's action attribute? (action="")

I am wondering if anyone can give a "best practices" response to using blank HTML form actions to post back to the current page. There is a post asking what a blank HTML form action does here and som..

How do I make the first letter of a string uppercase in JavaScript?

How do I make the first letter of a string uppercase, but not change the case of any of the other letters? For example: "this is a test" -> "This is a test" "the Eiffel Tower" -> "The Eiffel Tower"..

SQL Server - Convert date field to UTC

I have recently updated my system to record date/times as UTC as previously they were storing as local time. I now need to convert all the local stored date/times to UTC. I was wondering if there is ..

Calling ASP.NET MVC Action Methods from JavaScript

I have sample code like this: <div class="cart"> <a onclick="addToCart('@Model.productId');" class="button"><span>Add to Cart</span></a> </div> <div cl..

How to reset Jenkins security settings from the command line?

Is there a way to reset all (or just disable the security settings) from the command line without a user/password as I have managed to completely lock myself out of Jenkins?..

Programmatically Check an Item in Checkboxlist where text is equal to what I want

In C#, I am trying to Check an item in a CheckBoxList where the text equals what I require. I would modify the code to check items that exist in the database. If you would like an example, I need to s..

How to get < span > value?

There are a piece of code,but can not use <id> tag. So,how do I get to the <span> 1 2 3 4? <div id="test"> <span>1</span> <span>2</span> <spa..

C++ - unable to start correctly (0xc0150002)

I'm trying to run an OpenCV application through Microsoft Visual C++ 2010 Express, and get the following message: How can I solve this issue?..

What does "static" mean in C?

I've seen the word static used in different places in C code; is this like a static function/class in C# (where the implementation is shared across objects)? ..

How to decrypt an encrypted Apple iTunes iPhone backup?

I've been asked by a number of unfortunate iPhone users to help them restore data from their iTunes backups. This is easy when they are unencrypted, but not when they are encrypted, whether or not the..

How to call on a function found on another file?

I'm recently starting to pick up C++ and the SFML library, and I was wondering if I defined a Sprite on a file appropriately called "player.cpp" how would I call it on my main loop located at "main.cp..

How to set up devices for VS Code for a Flutter emulator

I'd like to use VS Code as my editor for Flutter development, but I don't know how to get the emulator going. I've installed VS Code on Ubuntu 17.10. I followed the first half of instructions as outli..

symfony 2 twig limit the length of the text and put three dots

How can I limit the length of the text, e.g., 50, and put three dots in the display? {% if myentity.text|length > 50 %} {% block td_text %} {{ myentity.text}}{% endblock %} {%endif%} ..

rotating axis labels in R

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

How do I replace part of a string in PHP?

I am trying to get the first 10 characters of a string and want to replace space with '_'. I have $text = substr($text, 0, 10); $text = strtolower($text); But I am not sure what to do next. I..

Composer could not find a composer.json

I tried to install composer via brew per: In usr/local/bin (which was not on Mavricks and I had to make personally) I did. brew tap josegonzalez/homebrew-php brew install josegonzalez/php/composer..

Android studio Error "Unsupported Modules Detected: Compilation is not supported for following modules"

I am using Android studio 1.0.1. I have a java module referred by other modules in my project. I have checked it out from SVN But now every Unsupported Modules Detected: Compilation is not supported..

How to get a shell environment variable in a makefile?

In shell when I enter echo $demoPath it prints /usr/local/demo How can I get the value of this variable $demoPath in a makefile?..

How to convert a string to lower case in Bash?

Is there a way in bash to convert a string into a lower case string? For example, if I have: a="Hi all" I want to convert it to: "hi all" ..

How to replace (or strip) an extension from a filename in Python?

Is there a built-in function in Python that would replace (or remove, whatever) the extension of a filename (if it has one)? Example: print replace_extension('/home/user/somefile.txt', '.jpg') In my ..

Changing default shell in Linux

How is it possible to change the default shell? The env command currently says: SHELL=/bin/tcsh and I want to change that to Bash...

What is a database transaction?

Can someone provide a straightforward (but not simpler than possible) explanation of a transaction as applied to computing (even if copied from Wikipedia)? ..

Pytesseract : "TesseractNotFound Error: tesseract is not installed or it's not in your path", how do I fix this?

I'm trying to run a basic and very simple code in python. from PIL import Image import pytesseract im = Image.open("sample1.jpg") text = pytesseract.image_to_string(im, lang = 'eng') print(text) ..

Detect Safari browser

How to detect Safari browser using JavaScript? I have tried code below and it detects not only Safari but also Chrome browser. function IsSafari() { var is_safari = navigator.userAgent.toLowerCase..

How to fade changing background image

I want to fade the images when I do this code: $("#large-img").css('background-image', 'url('+$img+')'); I've tried putting fade in so many places. Thanks..

Determine installed PowerShell version

How can I determine what version of PowerShell is installed on a computer, and indeed if it is installed at all?..

Ternary operator in PowerShell

From what I know, PowerShell doesn't seem to have a built-in expression for the so-called ternary operator. For example, in the C language, which supports the ternary operator, I could write somethin..

Could not load file or assembly ... An attempt was made to load a program with an incorrect format (System.BadImageFormatException)

I have two projects, ProjectA and ProjectB. ProjectB is a console application, which depends on ProjectA. Yesterday, everything was working fine, but suddenly today when I run ProjectB I get this: ..

In DB2 Display a table's definition

Hello everybody I am learning DB2 and would like to know how to see a table's characteristics after I create one. Similar to the EXPLAIN TABLE command in MySQL. Thank you...

Re-sign IPA (iPhone)

I currently build all my applications with hudson using xcodebuild followed by a xcrun without any problems I've received a couple of IPA files from different people that I would like to re-sign with..

Eclipse Java error: This selection cannot be launched and there are no recent launches

I have looked everywhere on the internet and tried everything the forums say to do and nothing works. This error keeps coming up. I have tried running my java project (not for android) even the drop d..

Combining two expressions (Expression<Func<T, bool>>)

I have two expressions of type Expression<Func<T, bool>> and I want to take to OR, AND or NOT of these and get a new expression of the same type Expression<Func<T, bool>> expr..

Render a string in HTML and preserve spaces and linebreaks

I have an MVC3 app that has a details page. As part of that I have a description (retrieved from a db) that has spaces and new lines. When it is rendered the new lines and spaces are ignored by the ht..

Alert after page load

This is my script : <% if (TempData["Resultat"] != null){ %> <script type="text/javascript"> alert('<%: TempData["Resultat"]%>'); </script> <% } %> In this..

How to redirect to Login page when Session is expired in Java web application?

I'm running a web application in JBoss AS 5. I also have a servlet filter which intercepts all the requests to the server. Now, I want to redirect the users to the login page, if the session has expir..

How to clear the cache in NetBeans

I created a project in NetBeans, and I would like to clear the NetBeans cache. I'm running NetBeans 7.0.1 on a Windows 7 machine. How do I do this?..

How do you auto format code in Visual Studio?

I know Visual Studio can auto format to make my methods and loops indented properly, but I cannot find the setting...

Substring a string from the end of the string

I need to remove two characters from the end of the string. So: string = "Hello Marco !" must be Hello Marco How can I do it?..

How do I get the SQLSRV extension to work with PHP, since MSSQL is deprecated?

I upgraded to PHP 5.3, and noticed that php_mssql.dll is missing. After googling a bit, it seems that 5.3 has dropped support for mssql. So I downloaded the drivers from microsoft, but I can't seem ..

How to use cURL to send Cookies?

I read that Send cookies with curl works, but not for me. I have a REST endpoint as: class LoginResource(restful.Resource): def get(self): print(session) if 'USER_TOKEN' in sessi..

What is the proper way to check if a string is empty in Perl?

I've just been using this code to check if a string is empty: if ($str == "") { // ... } And also the same with the not equals operator... if ($str != "") { // ... } This seems to work (I th..

Parsing JSON from URL

Is there any simplest way to parse JSON from a URL? I used Gson I can't find any helpful examples...

Changing :hover to touch/click for mobile devices

I've had a look around but can't quite find what i'm looking for. I currently have a css animation on my page which is triggered by :hover. I would like this to change to 'click' or 'touch' when the ..

What is the difference between single and double quotes in SQL?

What is the difference between single quotes and double quotes in SQL?..

applying css to specific li class

I have a problem with my list. I want to specify certain colors for each li element but can't seem to do it. It keeps doing it for all of them. Here's my CSS: #sub-nav-container ul { positio..

Calling a Fragment method from a parent Activity

I see in the Android Fragments Dev Guide that an "activity can call methods in a fragment by acquiring a reference to the Fragment from FragmentManager, using findFragmentById() or findFragmentByTag()..

Encoding an image file with base64

I want to encode an image into a string using the base64 module. I've ran into a problem though. How do I specify the image I want to be encoded? I tried using the directory to the image, but that sim..

Fastest way to implode an associative array with keys

I'm looking for a fast way to turn an associative array in to a string. Typical structure would be like a URL query string but with customizable separators so I can use '&amp;' for xhtml links or ..

Dealing with commas in a CSV file

I am looking for suggestions on how to handle a csv file that is being created, then uploaded by our customers, and that may have a comma in a value, like a company name. Some of the ideas we are loo..

How to open .SQLite files

I'm trying to open a .sqlite file on Windows, but I don't know how to. Do you know a good program for it? It contains data for statistical analysis, but I prefer having a .txt file. I also have a .s..

How to add a list item to an existing unordered list?

I have code that looks like this: <div id="header"> <ul class="tabs"> <li><a href="/user/view"><span class="tab">Profile</span></a></li> ..