Search Results

Search found 378 results on 16 pages for 'alvin ng'.

Page 6/16 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • Inferring type from method generics

    - by ng
    I am from a Java background and I am looking from the equivalent in c# for the following. public interface Reader { <T> T read(Class<? extends T> type); } Such that I can do the following, constraining the parameter and inferring the return type. Cat cat = reader.read(Cat.class); Dog dog = reader.read(Dog.class); I was hoping something like this would work in c# but I am not sure it will. public interface Reader { T Read<T>(); } And and do this. public class TypeReader : Reader { public T Read<T>() { Type type = T.GetType(); ... } } Is something like this even possible in c#?

    Read the article

  • Extending abstract classes in c#

    - by ng
    I am a Java developer and I have noticed some differences in extending abstract classes in c# as opposed to Java. I was wondering how a c# developer would achived the following. 1) Covarience public abstract class A { public abstract List<B> List(); } public class BList : List<T> where T : B { } public abstract class C : A { public abstract BList List(); } So in the above hierarchy, there is covarience in C where it returns a type compatible with what A returns. However this gives me an error in Visual Studio. Is there a way to specify a covarient return type in c#? 2) Adding a setter to a property public abstract class A { public abstract String Name { get; } } public abstract class B : A { public abstract String Name { get; set } } Here the compiler complains of hiding. Any suggestions? Please do not suggest using interfaces unless that is the ONLY way to do this.

    Read the article

  • Socket c# not listen on port over internet?

    - by Nguy?n Van Th?ng
    Code server I have server listen on port 1450: //Using UDP sockets clientSocket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); EndPoint ourEP = new IPEndPoint(IPAddress.Any, 1450); //Listen asynchronously on port 1450 for coming messages (Invite, Bye, etc). clientSocket.Bind(ourEP); //Receive data from any IP. EndPoint remoteEP = (EndPoint)(new IPEndPoint(IPAddress.Any, 0)); byteData = new byte[1024]; //Receive data asynchornously. clientSocket.BeginReceiveFrom(byteData, 0, byteData.Length, SocketFlags.None, ref remoteEP, new AsyncCallback(OnReceive), null); but code on not open port 1450 and client connect: otherPartyIP = new IPEndPoint(IPAddress.Parse(txtCallToIP.Text), 1450); otherPartyEP = (EndPoint)otherPartyIP; When i run code client and server in lan network it's ok. but run over network i check port 1450 in lan not open. tell me how open port 1450 in code server? thanks

    Read the article

  • Unable to remove file using 'rm'

    - by Alvin Sim
    Hi all, In one of our severs (IBM AIX), we have a file in path /data/1002/ which we were not able to remove or delete using the 'rm' command. The error message we got is "rm: A1208001.002: A file or directory in the path name does not exist." With the "-f" option, no error message was displayed, but the file is still there. This file has a '0' byte size and when i use the command "touch A120001.002", i see two files with the same file name in that directory. The directory listing is as below: $ ls -l total 56 -rwxrwxrwx 1 oracle dba 0 Feb 09 11:57 S1208001.002 drwxrwxrwx 4 nobody dba 24576 Feb 09 13:36 backup How do I remove this bogus fie? Thanks.

    Read the article

  • Dell XPS 15z/ L511Z merging partitions

    - by Alvin M
    i have a situation here, i bought a new dell xps 15z and was successful in making drive partitions through the help of this site (http://superuser.com/questions/313082/dell-xps-15-l502x-hard-drive-partition) now i have drive C with 100.55gb and a new volume with 578.45gb im planning to use EaseUS again to undo this and resize my drive C but im scared i might cause damage to my drive, is there a proper way to undo this and transfer the remaining 78.45gb from the new volume back to my drive C again? please help

    Read the article

  • Server vendor that allows 3rd party disks

    - by Alvin S
    As noted here, Dell is no longer allowing 3rd party disks to be used with their latest servers. As in, they don't work period. Which means that if you buy one of these boxes and want to upgrade the storage later, you have buy disks from Dell at significant premiums. Dell has just given me a very strong reason to take my server business elsewhere. My company buys (instead of leasing) our servers, and typically uses them for 5 years. I need to be able to upgrade/repurpose storage periodically, and do not want to be locked in to whatever Dell might have in stock, at inflated prices to boot. As you will see in the comments of the above link, it seems HP is doing the same thing. I am looking for a server vendor that offers 3-5 year warranty with same day/next day onsite service, and allows me to use 3rd party disks. Suggestions?

    Read the article

  • load balancing in Tomcat

    - by Alvin
    Hi All, I want to implement the load balancing in tomcat 6.0 so that we can create more than one instance of a tomcat and when any of the instance is down then other instance will run our application. so that our application will never be down even when the large number of concurrent request comes. But i have no idea to implement it. Please give your precious suggestions.

    Read the article

  • Is there a way to force spam-filter to change their policy or remove them as recognized spam service?

    - by Alvin Caseria
    As per mxtoolbox I got 1 blacklist still active for quite sometime now. UCEPROTECTL1's is running on 7 day policy since last spam mail. This is too strict compared to the 98 other spam filters out there as per mxtoolbox. (Or at least to the other 4 that detected the problem) I have no problem with our e-mail since it is hosted locally. But our domain is hosted outside the country and it run on a different IP. I contacted them but since it is the spam-filter's rule, there's nothing to be done but wait. I do believe services like spam-filters should at lease be bounded by guidelines and standards for this matter. Otherwise problem on delivering valid (after the fix) e-mails will be disastrous. Is there a way to force UCEPROTECT to change their policy or remove them as recognized spam service? Apart from contacting them in case they do not answer. Currently they are charging for fast removal if you pay by PayPal. I'm still looking for guideline/standard on how they should operate regarding this matter. Appreciate the help.

    Read the article

  • How could I easily pack a directory to an ext4 loop partition image?

    - by Alvin Wong
    I would like to pack the content of a directory into an ext4 partition image easily, without mounting a loop device. Background: I am building a version of Android which will mount system partitions as a loop device for ARM. Though I can create those partition images by hand using loop devices, it is very troublesome. I want to use an sh script to automatically do the work, and without needing to loop mount the dd-created image and use cp -rp. The best is to directly pack the files into an image file. Question: Is there any simple command-line tools without needing loop mount and root permission that can pack files into an ext4 partition image?

    Read the article

  • Windows7 IIS7: zips don't have php5isapi.dll Can I use php.dll instead?

    - by Pete Alvin
    The page: How to Install PHP 5.2 on IIS 7and Windows Vista (and a few others) reference a mysterious php5isapi.dll which is not in the Windows install, or the zip files: php-5.3.2-Win32-VC9-x86.zip - VC9 x86 Thread Safe php-5.3.2-nts-Win32-VC9-x86.zip - VC9 x86 Non Thread Safe There was another post on stackoverflow that said it's obsolete and replaced by "fastapi" but no instructions mention this. I did find a php.dll in the zip file. Can I use that instead of php5isapi.dll? It's very frustrating trying to install basic PHP5 on Windows with MySQL.

    Read the article

  • Can't find Role Services in Windows 7

    - by Pete Alvin
    I'm trying to install PHP on Windows 7 Home Premium using these instructions: Using FastCGI to Host PHP Applications on IIS 7 and a 1/3 of the way down on the page I have to do this: Server Manager -> Roles -> Add Role Services and just cannot find Roles or Role Services. Any ideas? PHP is giving me a 500 error and I'm wondering if it's because I haven't done this role services thing.

    Read the article

  • USB 3.0 hard disk not detected on a particular host controller?

    - by Alvin Wong
    I have a USB 3.0 hard disk which has always been working on my desktop with an XHCI. Now I just bought a notebook with an XHCI (something with Intel's Ivy Bridge setup). The first time I plug the hard disk in its 3.0 port it is detected and working. A few hours later I try to connect it again, but seems that the notebook just ignored it! The light on the hard disk didn't blink as usual (instead it is hold at on). I then tested it with my desktop again and it is working perfectly. It gets trickier when I plug it in the USB 2.0 port of that notebook it is detected and working perfectly (despite the slower speed). Then I try to plug in an USB 2.0 USB flash drive to that USB 3.0 port, and it is detected (of course as USB 2.0). So, there are two USB 3.0 ports on my notebook's XHCI. Both of them are not working with my hard disk but working perfectly fine with my USB 2.0 UFD. What's wrong with it? When I plug in the hard disk, device manager doesn't change. I've tried re-installing the driver for the XHCI, but it changes nothing. Had I broke the USB 3.0-specific pins of both USB 3.0 ports?

    Read the article

  • Does PHP *have* to serialize/unserialize session data between each HTTP request? Or is there a sett

    - by Pete Alvin
    I think I understand why sessions are evil but for snappy client user experience I don't want to have to re-query the database on each HTTP request. (As a comparision, Java servlets can effortlessly keep tons of session objects in memory.) Can PHP be set to do this or does it have to serialize because it runs from CGI/FastCGI and therefore by definition is a new process each time a request comes in? I will be running PHP using LAMP.

    Read the article

  • Solr dataimporthandler problem import data latin

    - by Alvin
    I'm using Solr 1.4 and Tomcat6. DB mysql 5.1 store data latin. when i run dataimporthandler this data = view data in solr admin error font. <doc> <str name="id">295</str> <str name="subject">Tuấn Tú</str> - ...<arr name="title"> <str>tunt721</str> </arr> </doc> True data view : <doc> <str name="id">295</str> <str name="subject">Tu?n Tú</str> - ...<arr name="title"> <str>tunt721</str> </arr> </doc> help me fix problem. Many thanks

    Read the article

  • Monitor Processes' Memory Usage

    - by Alvin Sim
    We have an IBM P series box running AIX 5.3. This is our application server, whereby our J2EE application is running in Oracle's Applications Server (version 10g r2). At around 11pm till the next day 7am, we have shell scripts running, which executes Java class programs. Recently, this server has been experiencing some high memory usage, which caused some of the Java class programs throwing "Out of memory" exception . We normally use NMON to monitor the server's resources, such as CPU, I/O, memory, etc. But because of this OOM issue, we would like to know throughout the day, what are the processes which are running and how much memory each process consumed. NMON is not able to show this. Even with the "-T" parameter, it only shows the top processes and not all. Is there any thing we can use to monitor all the processes' memory?

    Read the article

  • How to copy a cell's formatting using a formula?

    - by Alvin Lim
    For example, cell A1 contains the text "Hello World" which is in bold. In cell A2, I use the formula =A1. Therefore cell A2 now also contains "Hello World", but it is not in bold. How can I modify the formula to also copy the formatting (in this case, bold) of A1? A more complex example is strikethrough properties, i.e. A1 contains "Orange/Red". How do I show the same content in cell A2 dynamically, so that any changes made in A1 will update A2 as well?

    Read the article

  • CVS gives error files fail to update, but they are updated on the server

    - by Alvin Sim
    We are using CVSNT on machine running Windows XP Pro. After using it for more than 5 years, today we have an issue with CVS. When we try to update a subdirectory in a repository, some of the files failed to update with message "Permission denied" and some files fail with the message "ABC.java is no longer in the repository". But when we login to the CVS machine itself and browse the subdirectory, we can see the files are there. We have checked the Windows folder permissions and they seem correct.

    Read the article

  • HDD not detected whenever first power on (detected at BIOS level)

    - by Alvin Lim
    I am using Asus P8H61-M LX Motherboard with latest version of BIOS: 4401 One SATA-3 Western Digital Black Series 1.5TB is attached to SATA port 0 A Samsung 22x DVDRW SATA drive attached to SATA Port 1. ps/2 Logitech mouse and keyboard. CPU is i3 with DDR3 8Gb RAM. no other devices are installed. My problem is that when I turn on the computer, the WD HDD is not detected. ie cannot be booted. I have to press ctrl+alt+del in order to get it detected. I'd used the WD data lifeguard software to scan the HDD, the smart status is OK, the surface scan does not show any error at all. Where did I do wrong? Any advice is greatly appreciated.

    Read the article

  • Timeperiod Setting

    - by Alvin G. Matunog
    I am running Nagios 3.2.3 on CentOS 5.7 32bit and I have a bit of a problem scheduling timeperiods. Please help me. Objective, to stop monitoring during server restart (since the server will be restarted and will be restarted automatically because of updates and system backup). The restart is scheduled every 1st Sunday of every month. My monitoring runs 24x7 but during restarts I want to stop the monitoring and resume after 30 mins. So every 1st Sunday I want my schedule to be 00:00-11:30,12:00-24:00. This means that it will stop at 11:30 and resumes on 12:00nn. If I set this on every Sunday there is no problem. But if I set this time on every 1st Sundays, it stops at 11:30 but resumes on the next day (Monday) and not on 12:00nn Sunday. I don't know what I am missing. If I set on regular weekdays there is no problem. But on Offset weekdays (1st Sunday) it doesn`t work the way it should have. Here is my definition; define timeperiod{ name 1st_sunday timeperiod_name 1st_sunday alias No monitoring every 1st Sunday thursday 1 00:00-11:30,12:00-24:00 } define timeperiod{ timeperiod_name irregular alias regular checking use 1st_sunday sunday 08:30-22:00 monday 08:30-22:00 tuesday 08:30-22:00 wednesday 08:30-22:00 thursday 08:30-19:10,19:20-22:00 friday 08:30-22:00 saturday 08:30-22:00 } Can anyone help me? Please? Thank you.

    Read the article

  • Filtering a dropdown in Angular IE11 issue

    - by Brian S.
    I have a requirement for a select html element that can be duplicated multiple times on a page. The options for these select elements all come from a master list. All of the select elements can only show all of the items in the master list that have not been selected in any of the other select elements unless they just were duplicated. So I wrote a custom filter to do this in Angular and it seems to work just fine provided you are not using IE11. In IE when you select a new item from a duplicated select element, it seems to select the option after the one you selected even though the model still has the correct one set. I realize this sounds convoluted, so I created a jFiddle example. Using IE 11 try these steps: Select Bender Click the duplicate link Select Fry Notice that the one that is selected is Leela but the model still has Fry (id:2) as the one selected Now if you do the same thing in Chrome everything works as expected. Can anyone tell me how I might get around this or what I might be doing wrong? Here is the relevant Angular code: myapp.controller('Ctrl', function ($scope) { $scope.selectedIds = [{}]; $scope.allIds = [{ name: 'Bender', value: 1}, {name: 'Fry', value: 2}, {name: 'Leela', value: 3 }]; $scope.dupDropDown = function(currentDD) { var newDD = angular.copy(currentDD); $scope.selectedIds.push(newDD); } }); angular.module('appFilters',[]).filter('ddlFilter', function () { return function (allIds, currentItem, selectedIds) { //console.log(currentItem); var listToReturn = allIds.filter(function (anIdFromMasterList) { if (currentItem.id == anIdFromMasterList.value) return true; var areThereAny = selectedIds.some(function (aSelectedId) { return aSelectedId.id == anIdFromMasterList.value; }); return !areThereAny; }); return listToReturn; } }); And here is the relevant HTML <div ng-repeat="aSelection in selectedIds "> <a href="#" ng-click="dupDropDown(aSelection)">Duplicate</a> <select ng-model="aSelection.id" ng-options="a.value as a.name for a in allIds | ddlFilter:aSelection:selectedIds"> <option value="">--Select--</option> </select> </div>

    Read the article

  • Cracking WEP wireless networks [closed]

    - by John
    I have a problem.I am new to linux and would like to know how to crack a WEP and WAP wireless encrypted network.I have been typing the command "airmon-ng" i have even initialized the wlan0 with the following command on Backtrack 4 but it has failed,When I use airmon-ng command, it does not display my wireless driver.SomeOne please xplain to me from scratch.Would really appreciate it.

    Read the article

  • angular-ui-router : breadcrumps ok but view ko

    - by anakin59490
    this is my app.router.js : agentRouter.config([ '$stateProvider', '$urlRouterProvider', function($stateProvider, $urlRouterProvider) { var root = { name: 'root', abstract: true, url: '', title: 'home', views: { 'header': { templateUrl: 'views/headers/header.app.html', controller: 'HeaderCtrl' }, 'body': { templateUrl: "views/root.html" }, 'footer': { templateUrl: 'views/footers/footer.app.html' } } }; var agent = { name: 'root.agent', url: '/agent', title: 'agent', views: { 'root.sidebar': { templateUrl: "views/main.sidebar.html" }, 'root.container': { templateUrl: "views/partials/agent/list.container.html" } } }; var detail = { name: 'root.agent.detail', url: '/detail/:id', title: 'agentDetail', // use for breadcrumb views: { 'root.sidebar': { templateUrl: "views/main.sidebar.html" }, 'root.container': { templateUrl: "views/partials/agent/list.chantier.html" } } }; /.../ $stateProvider.state(root); $stateProvider.state(agent); $stateProvider.state(detail); } ]); and this is my root.html : <!--Breadcrumb content--> <ul class="row breadcrumb"> <i class="glyphicon glyphicon-home" style=""></i> <li ng-repeat="state in $state.$current.path"> <a ng-href="#{{state.url.format($stateParams)}}"><span ng-bind="state.title"></span></a> <span ng-hide="$last" class=""></span> </li> </ul> <!--Sidebar content--> <div ui-view="root.sidebar">default root.sidebar</div> <!--Container content--> <div style="background-color: #f9f9f9" ui-view="root.container">default root.container</div> I can access to my "agent" page (a list of person) and my breadcrumb is right : home / agent but when i click on an item of the list i got always the same page but my breadcrumb is right : home / agent / agentDetail but in app.router.js if change detail like this : var detail = { name: 'root.detail', // référence initiale + detail (fils) url: '/agent/detail/:id', // réference utilisée dans les fichiers HTML, attention c'est la suite de l'url précédente!!! title: 'agentDetail', // référence utilisée pour le breadcump views: { 'root.sidebar': { templateUrl: "views/main.sidebar.html" }, 'root.container': { templateUrl: "views/partials/agent/list.chantier.html" } } }; i got the right page (list.chantier.xml) but the breadcrumb is false : home / agentDetail instead of home / agent / agentDetail I would like to got the right breadcrumb (home / agent / agentDetail) with the right page (list.chantier.html) when i click on an item of the agent list page (list.container.html) Thank you in advance for your help

    Read the article

  • How to specify java script files required by an angular app

    - by Vishal Kaushik
    I'm looking for a way to specify required js files by an angular app. So that, we don't need to include an array of tag for all the files which may be required by some ng-app. The main idea behind this requirement is - we might not need to load all the resources on the browser at once. Which ever ng-app gets loaded onto the screen, will fetch its dependencies on its own from the server. Is there any existing way within angularJS to achieve this goal..?

    Read the article

  • Angularjs: addition of integers even after I parse the variable as integer

    - by Shiv Kumar
    I really have a weird problem in adding two numbers. Here is my code, in the first controller everything is working fine, but in the second controller instead of 0 if I add 10, the output is completely weird Here is html code <div ng-app=""> <div ng-controller="Controller1"> <br/>**** Controller-1 <br/>Add 0 : {{update1(0)}} <br/>Add 10 : {{update1(10)}} <br/>Add 50 : {{update1(50)}} <br/>Add -60 : {{update1(-60)}}</div> <div ng-controller="Controller2"> <br/>**** Controller-2 <br/>Add 10 : {{update2(10)}} <br/>Add 10 : {{update2(10)}} <br/>Add 50 : {{update2(50)}} <br/>Add -60 : {{update2(-60)}}</div> </div> Here is my javascript function Controller1($scope) { var x = 0; $scope.update1 = function (smValue) { x += parseInt(smValue); return x; } } function Controller2($scope) { var y = 0; $scope.update2 = function (smValue) { y += parseInt(smValue); return y; } } and here is the output **** Controller-1 Add 0 : 0 Add 10 : 10 Add 50 : 60 Add -60 : 0 **** Controller-2 Add 0 : 110 Add 10 : 120 Add 50 : 170 Add -60 : 110 here is the link to try: http://jsfiddle.net/6VqqN/ can anyone please explain me why it is behaving like that. Even if I add a 3or4 digit number, output is completely different then what I expected.

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >