What is the difference between mvc2 and mvc3 template in visual studio? Can I use MVC2 template instead of MVC3 template? Just a beginner, so want to create some samples in MVC3 framework.
I am working on a UNIX system and I'd like to merge thousands of PDF files into one file in order to print it. I don't know how many pages they are in advance. I'd like to print it double sided, such that two files will not be on the same page. Therefore it I'd the merging file to be aligned such that every file will begin in odd page and a blank page will be added if the next place to write is an even page.
I've just been reading the HTML5 author spec. It states that the <html>, <head> and <body> tags are optional. Does that mean that you can leave them out completely and still have a valid HTML5 document? If I'm interpreting this correctly, it means this should be completely valid: <!DOCTYPE html> <p>Hello!</p> Is this correct? You can check out the spec here: http://dev.w3.org/html5/spec-author-view/syntax.html#syntax "8.1.2.4 Optional tags" is the bit out about it being OK to omit <html>, <head> and <body>
I have the HTML code below: <select> <option>Volvo</option> <option>Saab</option> <option>Mercedes</option> <option>Audi</option> </select> How can I check whether or not the text 'Hyndai' is in the list of options.
I am not a software programmer but I have a task to create a TCP Server (a program that is listening on its network card interfaces for incoming data streams). I have searched on the internet and I found that I can use two methods: Socket or TCPListener class. I have created an example for the Socket class, but I was wondering how I can test it? If another computer in the network sends some string data to the listener computer, then the message should be displayed. Here is the example from Microsoft that I am using for the TCP server using a Socket: Public Shared Sub Main() ' Data buffer for i
I am looking at some CSS and I see the following: #header-nav>ul>li ul li:last-child { -moz-border-radius:0 0 5px 5px; -webkit-border-radius:0 0 5px 5px; border-radius:0 0 5px 5px; behavior:url(PIE.htc); } I don't know anything about this. What's behavior and what is PIE.htc. I have never seen these before.
I am writing some code to participate in an AI challenge. The main objective for the AI challenge is to take a simulated robot and navigate it through a maze to a destination zone. The secondary objective which is optional is to find a recharger placed in the maze at an unknown location. This is all done in a 2D grid. My program can call a method to get a distance measurement from the recharger. So using trilateration I should be able to locate the recharger by calling this method, recording my ai's current position and the distance the recharger is away from that point 3 times over. I found t
Below is the snippet of a shell script from a larger script. It removes the quotes from the string that is held by a variable. I am doing it using sed, but is it efficient? If not, then what is the efficient way? #!/bin/sh opt="\"html\\test\\\"" temp=`echo $opt | sed 's/.\(.*\)/\1/' | sed 's/\(.*\)./\1/'` echo $temp
I want to create a word document which has a text part, checkboxes and tables in it. I want to create a template of this document and use the template to create a word document using java. Can anyone please suggest me an easiest way to do the same. I tried doing xml mapping but it only works fine with text and tables. I am more concerned about the checkboxes in the word document. Please help!
Is there any quick command or script to check for the version of CUDA installed? I found the manual of 4.0 under the installation directory but I'm not sure whether it is of the actual installed version or not.
Is it possible to disable the scroll wheel changing the number in an input number field? I've messed with webkit-specific CSS to remove the spinner but I'd like to get rid of this behavior altogether. I like using type=number since it brings up a nice keyboard on iOS.
I have two gcc compilers installed on my system, one is gcc 4.1.2 (default) and the other is gcc 4.4.4. How can I check the libc version used by gcc 4.4.4, because /lib/libc.so.6 shows the glibc used by gcc 4.1.2, since it is the default compiler.
I have a class with a constructor with 4 integer arguments. It is configured in Spring XML like so: <bean id="mySearchService" class="app.service.MySearchService" c:maxConnectionsPerHost="${maxConnectionsPerHost}" c:maxTotalConnections="${maxTotalConnections}" c:connectionTimeout="${connectionTimeout}" c:soTimeout="${soTimeout}" /> My properties file has: maxConnectionsPerHost=50 maxTotalConnections=50 connectionTimeout=500 soTimeout=100 But I get the following error: Error creating bean with name 'mySearchService' defined in class path resource [applicationContext.xml]: Unsatisfied dependency
I am having one InfoPath form and I am having code on VSTA project as well, now on certain condition I have to show a pop-up message in the form (I am running this form as browser enabled form). How to achieve this?
I'm stuck with what is causing this issue. If i'm logged in as my account, the code below does not show user: 100000920350966 but if i logout & back into my wife's account I can now see that users profile picture. Error I get logged into my FB account: http://sphotos.xx.fbcdn.net/hphotos-snc6/230962_10150332269178009_784368008_9751025_7802946_n.jpg An example of one that does work: http://a4.sphotos.ak.fbcdn.net/hphotos-ak-ash4/419763_10151360491990078_877370077_23594484_2739927_n.jpg the code I am using is the PHP SDK and this piece for getting an image: function randomUser() { $query = mysql
I want to parse user input using named captures for readability. When they type a command I want to capture some params and pass them. I'm using RegExps in a case statement and thus I can't assign the return of /pattern/.named_captures. Here is what I would like to be able to do (for example): while command != "quit" print "Command: " command = gets.chomp case command when /load (?<filename>\w+)/ load(filename) end end
I'm trying to open files from within Java with something like this: java.awt.Desktop.getDesktop().open(new File("c:\\coolfile.txt"); Of course, it all works fine and dandy in most cases. HOWEVER! When I have a file with the unicode character u3000, I cannot open it! Even if the file exists. For example: java.awt.Desktop.getDesktop().open(new File("c:\\coolfile\u3000withweirdname.txt"); I get an Exception, EVEN WHEN THE FILE EXISTS [java] java.io.IOException: Failed to open file:/E:/_prog/test%E3%80%80.txt. Error message: The system cannot find the path specified. Please help me! I tried pretty
I just installed JDK in Ubuntu with sudo apt-get install openjdk-6-jdk command, after the installation where's the Java bin directory located? And how can I set the environment path for that directory? I have little experience with Ubuntu, can anyone give some advice or suggest any good website for reference?
I made sequence of operations (on local disk): Copy file to ###.bak Save file to ### Delete file ###.bak Code: File.Copy(filename, filename + ".bak"); TextWriter writer = new StreamWriter(filename); writer.Write(content); writer.Close(); File.Delete(filename + ".bak"); During deleting I got exception: IOException: There is not enough space on the disk. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite) Size of both files is maximum few MB. And I checked - there is enough free space
If I have an array full of information, is there any way I can a default for values to be returned if the key doesn't exist? function items() { return array( 'one' => array( 'a' => 1, 'b' => 2, 'c' => 3, 'd' => 4, ), 'two' => array( 'a' => 1, 'b' => 2, 'c' => 3, 'd' => 4, ), 'three' => array( 'a' => 1, 'b' => 2, 'c' => 3, 'd' => 4, ), ); } And in my code $items = items(); echo $items['one']['a']; // 1 But can I have a default value to be returned if I give a key that doesn't exist like, $items = items(); echo $items['four']['a']; // DOESN'T EXIST RETURN DEFAULT OF 99
I want to set the delimiter inside an sql file (because I cannot rely on users to do that through the terminal). Is there a mysql statement that will allow me to set the delimiter? Using DELIMITER // throws an error. # Categories schema # --- !Ups CREATE TABLE IF NOT EXISTS `category` ( `id` INT NOT NULL AUTO_INCREMENT , `pid` INT NULL DEFAULT 0 , `label` VARCHAR(64) NULL , `active` TINYINT NULL DEFAULT 0, PRIMARY KEY (`id`) ); DELIMITER // CREATE FUNCTION hierarchy_connect_by_parent_eq_prior_id(value INT) RETURNS INT NOT DETERMINISTIC READS SQL DATA BEGIN DECLARE _id INT; DECLARE _parent INT;
Note: This question is specific for mapping but I'd like to be able to use it when I plot in a standard Cartesian coordinate system. I love base graphics but also like ggplot2 for many things. One of my most used base functions for fine tuning a graph is locator(n) but this produces an error in ggplot2. library(ggplot2) county_df <- map_data('county') #mappings of counties by state ny <- subset(county_df, region=="new york") #subset just for NYS ny$county <- ny$subregion ggplot(ny, aes(long, lat, group=group)) + geom_polygon(colour='black', fill=NA) locator(1) Now grid.locator() as pointed out
Is there a way to make your own signing certificate in order to sign files, such as installation packages? Is the problem that the certificate supplier has to be a trusted source with Windows, otherwise you will get warning messages?
I want to find and count all the files on my system that begin with some string, say "foo", using only one line in bash. I'm new to bash so I'd like to avoid scripting if possible - how can I do this using only simple bash commands and maybe piping in just one line? So far I've been using find / -name foo*. This returns the list of files, but I don't know what to add to actually count the files.
I want to write something like the following: internal class InternalData { } public class PublicData { } abstract internal class Base { internal Base() { } private static InternalData CreateInternalDataFromPublicData(PublicData publicData) { throw new NotImplementedException(); } abstract protected void DoProcess(InternalData internalData); public void Process(PublicData publicData) { InternalData internalData = CreateInternalDataFromPublicData(publicData); DoProcess(internalData); } } public sealed class Derived : Base { protected override void DoProcess(InternalData internalData) { throw ne
I'm trying to copy some files created in my server to FTP using code in below method. But weird thing is i'm getting below error randomly and i couldn't figure out what is happening. Exception =org.apache.commons.net.io.CopyStreamException: IOException caught while copying. Below is the code by which i'm copying the files to FTP. public void copyDumpsToFTP() throws SocketException, IOException { FTPClient f= new FTPClient(); f.connect(dumpProperties.getProperty("ftpIPAddress")); boolean flag =f.login(dumpProperties.getProperty("ftpUser"),dumpProperties.getProperty("ftpPassword")); System.out.p
Assuming connectionDetails is a Python dictionary, what's the best practice/most Pythonic way of refactoring code like this? if "host" in connectionDetails: host = connectionDetails["host"] else: host = someDefaultValue
Is there anyway to read from STDIN with PHP that is non blocking: I tried this: stream_set_blocking(STDIN, false); echo fread(STDIN, 1); and this: $stdin = fopen('php://stdin', 'r'); stream_set_blocking($stdin, false); echo 'Press enter to force run command...' . PHP_EOL; echo fread($stdin, 1); but it still blocks until fread gets some data. I noticed a few open bug reports about this (7 years old), so if it can't be done, does any one know any crude hacks that could accomplish this (on Windows and Linux)? https://bugs.php.net/bug.php?id=34972 https://bugs.php.net/bug.php?id=47893 https://bugs