Search Results

Search found 1117 results on 45 pages for 'angularjs directive'.

Page 31/45 | < Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >

  • Simplest LINQ in C# troubleshooting.

    - by Jay
    I'm trying to learn a bit of LINQ but I'm having compile issues right off the bat. Is there any specific reason why this won't work? using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace HelloLINQ { class HelloLINQ { public static void Main() { Example1(); } public static void Example1() { var numbers = new int[] { 1, 5, 3, 7, 3, 8, 9, 3, 6, 6, 2 }; var under5 = from n in numbers select n; foreach (var n in under5) { Console.WriteLine(n); } } } } The error is: Could not find an implementation of the query pattern for source type 'int[]'. 'Select' not found. Are you missing a reference to 'System.Core.dll' or a using directive for 'System.Linq'?

    Read the article

  • using sudo with mercurial and ssh authentication

    - by Shawn
    How do i run ssh-add key sudo hg clone [email protected]/etc/etc but use my ssh keys and not the superusers. Hey everyone, when i use sudo with for example, sudo hg clone [email protected]/etc/etc after i have added a key to my user account it doesnt work. I remember this is because the sudo is ran as the superuser but that user cannot have keys added to it. I remember setting some directive (im using debian) that allowed me to run that command as sudo, but still have my ssh keys taken from my normal user account but i didnt make a note of it at the time. Thanks.

    Read the article

  • Output Unicode to Console Using C++

    - by Jesse Foley
    I'm still learning C++, so bear with me and my sloppy code. The compiler I use is Dev C++. I want to be able to output Unicode characters to the Console using cout. Whenver i try things like: # #include directive here (include iostream) using namespace std; int main() { cout << "Hello World!\n"; cout << "Blah blah blah some gibberish unicode: ÐAßGg\n"; system("PAUSE"); return 0; } It outputs strange characters to the console, like µA¦Gg. Why does it do that, and how can i get to to display ÐAßGg? Or is this not possible with Windows?

    Read the article

  • Using module include in OCaml

    - by Geoff
    In OCaml 3.11, I want to "extend" an existing module using the include directive, like so: module MyString = struct include String let trim s = ... end No problem. But now I want to expose this module's type explicitly (i.e. in a .mli file). I want something like this: module MyString : sig include String val trim : string -> string end But the include syntax is not correct because String refers to a module, not a module type (and the compiler does indeed barf). How can I refer to the module type for String here (without having write it out explicitly in a sig expression)? Thanks!

    Read the article

  • What would prevent ASP.NET from Output Caching?

    - by amarsuperstar
    I have an ASP.NET application, and am trying to output cache a certain page, however on every request, the debugger is still hitting the OnLoad method and I get a 200 response back. I have placed the output cache directive on a page like so: <%@ OutputCache Duration="60" VaryByParam="None" %> And ensured I have the OutputCache module <add name="OutputCache" type="System.Web.Caching.OutputCacheModule"/> And have also bypassed URL rewriting just in case. I have tried this using Cassini and IIS 5.1 (XP), however the page is not caching at all. Are there any other factors which I have not looked at which could affect this feature? Thanks

    Read the article

  • ASP.NET page parser error and Compilation ERROR and HALF INLINE CODING and HALF CODE BEHIND FILE

    - by dnlearner
    Frequently i came accross a problem that is Page parse error.... to get out of this hell i used to remove inherit attribute in Page Directive. After that it is showing compliation error??? How to solve it ???? what i have to do for the page compilation problem and page parser error tooo????? And 1 more thing is i had written the code of a button1 click event k after after i had opened that project if i double click on that button i am going to inline coding.. How to solve it..Even though i took 1 button in that button events i doube clicked on a event still there is no use...I am redirecting to inline coding. How to solve the problem of that page. I should redirect to code behind file only

    Read the article

  • How Iostream file is located in computer by c++ code during execution

    - by user3702024
    i want to know that in a c++ code during execution how iostream file is founded. we write #include in c++ program and i know about #include which is a preprocessor directive to load files and is a file name but i don't know that how that file is located. i have some questions in my mind... Is Standard library present in compiler which we are using? Is that file is present in standard library or in our computer? Can we give directory path to locate the file through c++ code if yes then how?

    Read the article

  • How can I convert a specific .cs file into either a .bat or a .exe file?

    - by user2974969
    I am trying to convert around 1,900 .txp files (a proprietary Sony image format) to .png. However, the .exe program I am using to convert these files only allows me to select one file at a time. I am running Windows 7. There's a TXP.CS file in the 'src' folder of the program, so I figured that if I was able to turn that into an executable file, I'd be able to use it to mass convert these files to PNG. However, whenever I try to convert the file using csc.exe, I get the CS0246 error (the type or namespace name 'Tools' could not be found. Are you missing a using directive or an assembly reference?). I can't use Microsoft Visual Studio right now, so I'm hoping someone can walk me through this, or maybe convert the file to either a .bat or an .exe for me. Thank you. TXP.CS

    Read the article

  • Securely using exec with PHP to run ffmpeg

    - by Venkat D.
    I would like to run ffmpeg from PHP for video encoding purposes. I was thinking of using the exec or passthru commands. However, I have been warned that enabling these functions is a security risk. In the words of my support staff: The directive 'disable_functions' is used to disable any functions that allow the execution of system commands. This is for more security of the server. These PHP functions can be used to crack the server if not used properly. I'm guessing that if exec is enabled, then someone could (possibly) execute an arbitrary unix command. Does anyone know of a secure way to run ffmpeg from PHP? By the way, I'm on a dedicated server. Thanks ahead of time!

    Read the article

  • MySQL does not work on localhost without Local Area Connection

    - by user985171
    I use WampServer(Apache, PHP, MySQL) and have no problems when some kind of network adapter(wireless or lan) is connected(i-e Local Area Connection has status connected) 'even if i am not connected to the internet'(for example when i am connected to the router but that is not connected to the internet). When there is no network connection, i get a php error like MySQL could not connect to 127.0.0.1 on port 3306. Interestingly, 'telnet 127.0.0.1 3306' says that it could not connect to the port, even when the server and MySQL are running fine(i-e when some kind of local area connection is connected). So i turned off all kinds of firewall(antivirus and windows) but still no difference in anything. And that is why this issue is quite puzzling. Things i have already tried(will update this list along the way):- -The skip-networking directive in my.ini.

    Read the article

  • PHP fails silently when function not defined?

    - by John Isaacks
    I am migrating from PHP4 to PHP5 I have this in my .htaccess: php_flag display_errors on php_value error_reporting 2039 Which used to show all errors. I am still getting some errors but I used to get an error when I called a function that was not defined, but now it stops where it is at and send the client everything up to the error and nothing after. With no error message. Here is what phpinfo is telling me: Directive Local Value Master Value display_errors On Off error_reporting 2039 6143 I would like to be able to see my error messages for trouble shooting purposes. Can someone tell me what I need to do? Thanks!!

    Read the article

  • How to map a virtual directory to a website in VS?

    - by salvationishere
    I am developing a C# VS 2008 website, trying to add a Master file. I created a virtual directory in IIS housing the "Master" folder, containing the Master files. Now how do I reference these files from my website in VS? One problem is I do not know where I need to publish this Master folder to. Other problem is I do not know how to reference this Master file in my aspx Page directive. FYI, this master folder is physically located outside of c:\inetpub\ in a totally separate file location. Is this a problem?

    Read the article

  • Add a custom class name to Wordpress body tag?

    - by Scott B
    I'd like to place a directive in my theme's functions.php file which appends a classname to the wordpress body tag. Is there a built-in API method for this? For example, my body tag code is... <body <?php if(function_exists("body_class") && !is_404()){body_class();} else echo 'class="page default"'?>> And it results in the following being written to the body tag (depending on the context in which the page is presented (page, post, logged-in, etc) <body class="home blog logged-in"> Depending on the child theme I'm using at the time, I want it to be... <body class="home blog logged-in mychildthemename">

    Read the article

  • ASP.NET MVC CHECKBOXES PROBLEM

    - by mazhar
    CONTROLLER public ActionResult Index() { GroupRepository grouprepository = new GroupRepository(); ViewData["Group"] = grouprepository.FindGroups(); return View(); } <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" % <% foreach (Group i in ViewData["Group"] as List) { % " checked="checked" / <% } % The thing is that it is not able to find group id and displaying the following error. What is the solution? CS1061: 'System.Text.RegularExpressions.Group' does not contain a definition for 'int_GroupId' and no extension method 'int_GroupId' accepting a first argument of type 'System.Text.RegularExpressions.Group' could be found (are you missing a using directive or an assembly reference?)

    Read the article

  • Enableeventvalidation in web user control

    - by Khushi
    Hi, i have a web user control containing a repeater. The repeater contains three buttons. On button click it gives the following error : Invalid postback or callback argument. Event validation is enabled using in configuration or <%@ Page EnableEventValidation="true" % in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation. Since user control does not have page directive, so i changed the enableEventValidation to false, but it restricted the itemcommand event of the repeater. Can someone guide me, how to solve this problem?

    Read the article

  • Why Controller doesn't recognize a public method which (yet) appears in the intellisense ?

    - by Richard77
    Hello, I'm using an helper class that I called CreateEditOrganizationService where I put all the helper methods. In my controller, I've createService as object of that class. So far, I've got 5 methods. Now, I've just defined a 6th method called Set_TypeOrganization. I'm getting the Set_TypeOrganization in the intellisense, but after I've chose it, I get the following error: *CreateEditOrganizationService does not contain a definition for Set_TypeOrganization are you missing a directive or a reference?* public List<TypeOrganization> Set_TypeOrganization(string choice) { //Definition goes here... } and in my Controller CreateEditOrganizationService createService = new CreateEditOrganizationService(); //... ViewData["TypeOrganizations"] = createService.Set_TypeOrganization(choice); Unfortunately, VS shows me the error? Yet, the method appear in the intellisense when I type a dot after the createService object. Thannks for helping

    Read the article

  • nginx - how do I get rewrite directives to execute before index directives?

    - by Daniel Hai
    I'm trying a simple internal rewrite with nginx to navigate to a sub-directory depending on the user_agent -- mobile browsers go to /mobile, otherwise they go to /www however it seems that when I rewrite these urls, the index directive is processed before the rewrites, so I end up getting 403 forbidden. # TEST FOR INDEX index index.php # TEST PHONES if ($http_user_agent ~* '(iPhone|iPod)') { rewrite ^(.*)$ /mobile$1 break; } # OTHERWISE WE ARE DONE rewrite ^(.*)$ /www$1 break; when I turn off the re-writes and hit the hostname (http://www.somehost.com/) the index is displayed correctly. When they are on, I have to explicitly navigate to somehost.com/index.php to get the script to run ... Do I have to explicity test for directories, and then re-write to an index.php file, or is there a simpler solution?

    Read the article

  • C# Why does calling an interface member from a class generate an error?

    - by Jack
    So I have an interface: interface IFoo { int Bar(); int this[int i] {get; set;} } And a class that derives from it class Foo : IFoo { public int IFoo.Bar() { //Implementation { public int IFoo.this[int i] { //Implementation } } Now, I try to do this: var fooey = new Foo(); int i = Fooey.Bar(); or this: int i = Fooey[4]; I would expect these to work properly. However, the compiler generates an error as if such members don't exist. Why is that? I am aware I can cast Foo as IFoo, but I am also aware that casting is costly to performance, which is often the reason to use interfaces in the first place. EDIT 1: These are the errors generated 'Foo' does not contain a definition for 'Bar' and no extension method 'Bar' accepting a first argument of type 'Foo' could be found (are you missing a using directive or an assembly reference?) "Cannot apply indexing to an expression of type 'Foo'"

    Read the article

  • Output Caching - why doesn't it seem to do the job?

    - by Jon
    Hi, I have quite a big user control which creates an ASP.NET tab menu and within each tab a lengthy set of icons/menus. The menu is dynamically created from the database. I thought I could wrap the user control with an output cache directive to speed things up. I set OutputCache varybyparam="none" and duration to 120 seconds. When I navigate to my page, the usercontrol containing the tab menus and icons etc just vanishes? I thought ASP.NET was supposed to deliver some HTML that would previously have been cached. So why isn't this working? It doesn't seem to do what the label says on the tin?!? ;)

    Read the article

  • Changing the value of a macro at run time

    - by BrandiNo
    I'm working in Visual Studio 2010, using C++ code. What I'm trying to do is change the value of a preprocessor directive during run time, not sure if it's possible but i've tried this.. somefile.h static int mValue = 0; #define POO = mValue; ... #if POO 0 //define class methods #else //define class methods differently } main.cpp main() { //Code calls constructor and methods allowed when POO is 0 //Code increments mValue //Code calls constructor and methods allowed when POO is 1 } How can POO be changed so that class objects uses a different implementation of other methods? Or if it's not possible, what's a another approach to this?

    Read the article

  • ViewStateMode in ASP.Net 4.0

    - by sreejukg
    When asp.net introduced the concept of viewstate, it changed the way how developers maintain the state for the controls in a web page. Until then to keep the track of the control(in classic asp), it was the developer responsibility to manually assign the posted content before rendering the control again. Viewstate made allowed the developer to do it with ease. The developers are not bothered about how controls keep there state on post back. Viewstate is rendered to the browser as a hidden variable __viewstate. Since viewstate stores the values of all controls, as the number of controls in the page increases, the content of viewstate grows large. It causes some websites to load slowly. As developers we need viewstate, but actually we do not want this for all the controls in the page. Till asp.net 3.5, if viewstate is disabled from web.config (using <pages viewstate=”false”/> ..</pages>), then you can not enable it from the control level/page level. Both <%@ Page EnableViewState=”true”…. and <asp:textbox EnableViewState=”true” will not work in this case. Lot of developers demands for more control over viewstate. It will be useful if the developers are able to disable it for the entire page and enable it for only those controls that needed viewstate. With ASP.NET 4.0, this is possible, a happy news for the developers. This is achieved by introducing a new property called ViewStateMode. Let us see, What is ViewStateMode – Is a new property in asp.net 4.0, that allows developers to enable viewstate for individual control even if the parent has disabled it. This ViewStateMode property can contain either of three values Enabled- Enable view state for the control even if the parent control has view state disabled. Disabled - Disable view state for this control even if the parent control has view state enabled Inherit - Inherit the value of ViewStateMode from the parent, this is the default value. To disable view state for a page and to enable it for a specific control on the page, you can set the EnableViewState property of the page to true, then set the ViewStateMode property of the page to Disabled, and then set the ViewStateMode property of the control to Enabled. Find the example below. Page directive - <%@ Page Language="C#"  EnableViewState="True" ViewStateMode="Disabled" .......... %> Code for the control  - <asp:TextBox runat="server" ViewStateMode="Enabled" ............../> Now the viewstate will be disabled for the whole page, but enabled for the TextBox. ViewStateMode gives developers more control over the viewstate.

    Read the article

  • Keeping up with New Releases

    - by Jeremy Smyth
    You can keep up with the latest developments in MySQL software in a number of ways, including various blogs and other channels. However, for the most correct (if somewhat dry and factual) information, you can go directly to the source.  Major Releases  For every major release, the MySQL docs team creates and maintains a "nutshell" page containing the significant changes in that release. For the current GA release (whatever that is) you'll find it at this location: https://dev.mysql.com/doc/mysql/en/mysql-nutshell.html  At the moment, this redirects to the summary notes for MySQL 5.6. The notes for MySQL 5.7 are also available at that website, at the URL http://dev.mysql.com/doc/refman/5.7/en/mysql-nutshell.html, and when eventually that version goes GA, it will become the currently linked notes from the URL shown above. Incremental Releases  For more detail on each incremental release, you can have a look at the release notes for each revision. For MySQL 5.6, the release notes are stored at the following location: http://dev.mysql.com/doc/relnotes/mysql/5.6/en/ At the time I write this, the topmost entry is a link for MySQL 5.6.15. Each linked page shows the changes in that particular version, so if you are currently running 5.6.11 and are interested in what bugs were fixed in versions since then, you can look at each subsequent release and see all changes in glorious detail. One really clever thing you can do with that site is do an advanced Google search to find exactly when a feature was released, and find out its release notes. By using the preceding link in a "site:" directive in Google, you can search only within those pages for an entry. For example, the following Google search shows pages within the release notes that reference the --slow-start-timeout option:     site:http://dev.mysql.com/doc/relnotes/mysql/ "--slow-start-timeout" By running that search, you can see that the option was added in MySQL 5.6.5 and also rolled into MySQL 5.5.20.   White Papers Also, with each major release you can usually find a white paper describing what's new in that release. In MySQL 5.6 there was a "What's new" whitepaper at this location: http://www.mysql.com/why-mysql/white-papers/whats-new-mysql-5-6/ You'll find other white papers at: http://www.mysql.com/why-mysql/white-papers/ Search the page for "5.6" to see any papers dealing specificallly with that version.

    Read the article

  • PHP `virtual()` with Apache MultiViews not working after upgrade to 12.04

    - by Izzy
    I use PHP's virtual() directive quite a lot on one of my sites, including central elements. This worked fine for the last ~10 years -- but after upgrading to 12.04 it somehow got broken. Example setup (simplified) To make it easier to understand, I simplify some things (contents). So say I need a HTML fragment like <P>For further instructions, please look <A HREF='foobar'>here</P> in multiple pages. 10 years ago, I used SSI for that, so it is put into a file in a central place -- so if e.g. the targeted URL changes, I only need to update it in one place. To serve multiple languages, I have Apache's MultiViews enabled -- and at $DOCUMENT_ROOT/central/ there are the files: foobar.html (English variant, and the default) foobar.html.de (German variant). Now in the PHP code, I simply placed: <? virtual("/central/foobar"); ?> and let Apache take care to deliver the correct language variant. The problem As said, this worked fine for about 10 years: German visitors got the German variant, all others the English (depending on their preferred language). But after upgrading to Ubuntu 12.04, it no longer worked: Either nothing was delivered from the virtual() command, or (in connection with framesets) it even ended up in binary gibberish. Trying to figure out what happens, I played with a lot of things. I first thought MultiViews was (somehow) not available anymore -- but calling http://<server>/central/foobar showed the right variant, depending on the configured language preferences. This also proved there was nothing wrong with file permissions. The error.log gave no clues either (no error message thrown). Finally, just as a "last ressort", I changed the PHP command to <? virtual("central/foobar.html"); ?> -- and that very same file was in fact included. But the language dependend stuff obviously did no longer work. Of course I tried to find some change (most likely in PHP's virtual() command), using Google a lot, and also searching the questions here -- unfortunately to no avail. Finally: The question Putting "design questions" aside (surely today I would design things differently -- but at least currently I miss the time to change that for a quite huge amount of pages): What can be done to make it work again? I surely missed something -- but I cannot figure out what...

    Read the article

  • Cannot boot into system after deleting partition

    - by Clayton
    Okay...so this was kind of a stupid thing for me to do now that I think back on it. I was experiencing a ton of lag and not as much memory that I could use after installing Ubuntu 12.04. So after remembering I had installed multiple server versions of Ubuntu 12.04 by mistake, I went into Disk Management and proceeded to delete each and every one. Everything went fine. Up until this week, I have not experienced any problems. But starting yesterday I began to get lag just as I had before, and nothing fixed the problem. I decided to remove the Ubuntu partition, since I was also experiencing a visual error when given the option to select one to boot(the screen doesn't come up at all, and I recieved a monitor resolution error instead, but could still access both Windows and Ubuntu via arrow keys). After deleting the Ubuntu partition, so that I could see if running just Windows would fix the problem, I proceeded with what I was doing, installing a few programs that were not tied to my prediciment in any way. Upon rebooting my desktop, however, I recieved the following error: error: unknown filesystem. grub rescue> Hoping I could boot into Ubuntu via a pendrive and possibly backup my important files and wipe the hard drive to start fresh, I installed Ubuntu 13.04, but even that does not boot. Instead, I get this message on a terminal screen: SYSLINUX 4.06. EDD 4.06-pre1 Copyright (C) 1994-2011 H. Peter Anvin et al ERROR: No configuration file found No DEFAULT or UI configuration directive found! boot: So more or less, my desktop is screwed. I need to be able to get to the files inside because of my job as an artist, as well as retrieve my documents for my stories stored on Windows. Once I can succeed in solving this once and for all, I know for a fact I will stick to Ubuntu only, and install what is required to be able to run any Windows applications I used to use or need to use. I would rather not reformat the hard drive, and if I need to, it is a last resort. And I doubt I can use a Windows Recovery Disk to get my files back, as my mom has thrown out a lot of the installation disks and paperwork I would need to even follow through with that. :\ Keep in mind that I am a novice/newbie when it comes to Linux, but am hoping ot become better at it as time goes by. I appreciate any help you guys can give me. This will probably be the last time I attempt to do anything that could risk the well-being of my PC. (I've also looked through various questions on the site and tested a lot of the solutions. None seem to have worked.)

    Read the article

  • Apache - create multiple aliases

    - by mc3mcintyre
    I'm trying to setup two websites on my Apache server. One is www.domain.com and the other is test.domain.com. Currently, my 000-default.conf file reads as follows: <VirtualHost www:80> # The ServerName directive sets the request scheme, hostname and port that # the server uses to identify itself. This is used when creating # redirection URLs. In the context of virtual hosts, the ServerName # specifies what hostname must appear in the request's Host: header to # match this virtual host. For the default virtual host (this file) this # value is not decisive as it is used as a last resort host regardless. # However, you must set it for any further virtual host explicitly. #ServerName www.domain.com #ServerAlias www ServerAdmin [email protected] DocumentRoot /var/www/domain.com/ # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, # error, crit, alert, emerg. # It is also possible to configure the loglevel for particular # modules, e.g. #LogLevel info ssl:warn ErrorLog ${APACHE_LOG_DIR}/domain.error.log CustomLog ${APACHE_LOG_DIR}/domain.access.log combined UseCanonicalName on allow from all Options +Indexes # For most configuration files from conf-available/, which are # enabled or disabled at a global level, it is possible to # include a line for only one particular virtual host. For example the # following line enables the CGI configuration for this host only # after it has been globally disabled with "a2disconf". #Include conf-available/serve-cgi-bin.conf </VirtualHost> <VirtualHost test:80> DocumentRoot "/var/www/domain.com/test/" ServerName test.domain.com ServerAdmin [email protected] ErrorLog ${APACHE_LOG_DIR}/test.domain.error.log CustomLog ${APACHE_LOG_DIR}/test.domain.access.log combined UseCanonicalName on allow from all Options +Indexes </VirtualHost> # vim: syntax=apache ts=4 sw=4 sts=4 sr noet As is, when I use a browser to go to the www location, it show me a directory listing. However, if I remove the www:80 on Line 1 and replace it with *:80, it correctly displays the webpage. I don't understand why. Can anyone help me configure this 000-default.conf file so that www goes to "/var/www/domain.com" and that test goes to "/var/www/domain.com/test"? Thank you.

    Read the article

< Previous Page | 27 28 29 30 31 32 33 34 35 36 37 38  | Next Page >