Search Results

Search found 152 results on 7 pages for 'uma kant verma'.

Page 3/7 | < Previous Page | 1 2 3 4 5 6 7  | Next Page >

  • how to move and print squares visited by a knight in following order?

    - by josh kant
    Lets say you have a 5/5 board and you place and the knight started moving form the middle square. Every time knight moves it has to follow the following pattern. its easy if you draw what i mean. I am trying to code for the possible moves and print out the no. of moves in the nXn (in this case 5X5) board. The print out should be the no. of order in which the knight moved. { //move 1 //2 squares up and 1 to the left //move 2 //2 squares up and 1 to the right //move 3 //1 square up and 2 to the right //move 4 //1 square down and 2 to the right //move 5 //2 squares down and 1 to the right //move 6 //2 squares down and 1 to the left //move 7 //1 square down and 2 to the left //move 8 //one square up and 2 to the left } Any help would be appreciated. Thank you in advance..

    Read the article

  • Knight movement.... " how to output all possible moves. "

    - by josh kant
    The following is the code i wrote.. I have to write it for nXn but for easyness i tried to test it for 5X5. It does not display my output... could anybody tell me whats wrong with the following code: { #include <iostream> #include <iomanip> using namespace std; void knight ( int startx, int starty, int n, int p[][5], int used [][5], int &count); int main ( ) { const int n = 5; // no. of cloumns and rows int startx = 0; int starty = 0; int p[5][5]; int used[5][5]; int count = 1; int i= 0; int j = 0; //initializing the array for ( i = 0; i < 5; i++) { for ( j = 0; j < 5; j++) { p[i][j] = 0; used [i][j] = 0; } } //outputting the initialized array.. i=0; while ( i< 5) { for ( j = 0; j < 5; j++) { cout << setw(3) << p[i][j]; } i++; cout << endl; } knight (startx,starty,n,p,used,count); return 0; } void knight ( int x, int y, int n, int p[][5], int used [][5], int &count) { int i = 0; //knight (x,y,n,p,used,count) for ( i = 0; i < n*n; i++) { if ( used [x][y] == 0 ) { used[x][y] = 1; // mark it used; p[x][y] += count; //inserting step no. into the solution //go for the next possible steps; //move 1 //2 squares up and 1 to the left if (x-1 < 0 && y+2 < n && p[x-1][y+2] == 0) { used[x-1][y+2] = 1; p[x-1][y+2] += count; knight (x-1,y+2,n,p,used,count); used[x-1][y+2] = 0; } //move 2 //2 squares up and 1 to the right if ( x+1 < n && y+2 < n && p[x+1][y+2] == 0 ) { used[x+1][y+2] = 1; p[x+1][y+2] += count; knight (x+1,y+2,n,p,used,count); used[x+1][y+2] = 0; } //move 3 //1 square up and 2 to the right if ( x+2 < n && y+1 < n && p[x+2][y+1] == 0 ) { used[x+2][y+1] = 1; p[x+2][y+1] += count; knight (x+2,y+1,n,p,used,count); used[x+2][y+1] = 0; } //move 4 //1 square down and 2 to the right if ( x+2 < n && y-1 < n && p[x+2][y-1] == 0 ) { used[x+2][y-1] = 1; p[x+2][y-1] += count; knight (x+2,y-1,n,p,used,count); used[x+2][y-1] = 0; } //move 5 //2 squares down and 1 to the right if ( x+1 < n && y-2 < n && p[x+1][y-2] == 0 ) { used[x+1][y-2] = 1; p[x+1][y-2] += count; knight (x+1,y-2,n,p,used,count); used[x+1][y-2] = 0; } //move 6 //2 squares down and 1 to the left if ( x-1 < n && y-2 < n && p[x-1][y-2] == 0 ) { used[x-1][y-2] = 1; p[x-1][y-2] += count; knight (x-1,y-2,n,p,used,count); used[x-1][y-2] = 0; } //move 7 //1 square down and 2 to the left if ( x-2 < n && y-1 < n && p[x-2][y-1] == 0 ) { used[x-2][y-1] = 1; p[x-2][y-1] += count; knight (x-2,y-1,n,p,used,count); used[x-2][y-1] = 0; } //move 8 //one square up and 2 to the left if ( x-2 < n && y+1< n && p[x-2][y+1] == 0 ) { used[x-2][y+1] = 1; p[x-2][y+1] += count; knight (x-2,y+1,n,p,used,count); used[x-2][y+1] = 0; } } } if ( x == n-1 && y == n-1) { while ( i != n) { for ( int j = 0; j < n; j++) cout << setw(3) << p[i][j]; i++; } } } Thank you!!

    Read the article

  • ssh over a tunnel in order to configure auto login

    - by Vihaan Verma
    I m trying to copy the id_rsa.pub key to the server. The server in my case also has a virutal machine called dev which runs on the host machine. I copied the id_rsa.pub key to the host for auto log in using this command. ssh-copy-id -i ~/.ssh/id_rsa.pub vickey@host which worked fine and I can auto log in to host. I also wanted to auto log in to the dev machine. I know I can just copy the contents of authorized_keys from the host machine to the dev machine but I m looking for a command line of doing things. Creating a tunnel seemed like the solution ssh vickey@host -L 2000:dev:22 -N now when I tried ssh-copy-id -i ~/.ssh/id_rsa.pub vickey@localhost -P 2000 the password that worked here was of my local machine , I expected it to ask me password of my dev machine. The above command adds the pub key to the local machine and not to the dev machine. However this commands asks me for the dev password and copies the files. scp -P 2000 vickey@localhost:/home/vickey/trash/vim . vickey@localhost's password: vim 100% 111 0.1KB/s 00:00 How do I do the same with ssh-copy-id ?

    Read the article

  • DNS resolution not working on Browsers but on Shell

    - by Shyam Sunder Verma
    Running dig/ping on any domain, give me correct ip. When I try to browse google.com in browser it does not work. When I pick the IP (via ping) and use it in browser, website open via IP fine. But further work does not work, because of name resolution problem. DO NOT works fine on : Ubuntu 9.10 installed in Virtual Box over Windows. Ubuntu 10.10 installed in Virtual Box over Windows. Ubuntu 9.10 installed on laptop. But Internet works fine on windows vista installed on laptop.

    Read the article

  • xampp admin page access forbidden

    - by Vihaan Verma
    I m new to apache world ! I read some docs online to setup virtual host . Which works fine ! Here are the content of httpd-vhosts.conf file <Directory C:/vhosts> Order Deny,Allow Allow from all </Directory> NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot "C:/htdocs" ServerName localhost </VirtualHost> <VirtualHost *:80> DocumentRoot "C:/vhosts/phpdw" ServerName phpdw </VirtualHost> But now when I access the xampp control panel and try accessing the apache admin page I get access defined eror (403) . My guess is that there needs to be some more configuration in this file to allow access to localhost. I could not find anything relevant . Thanks

    Read the article

  • which is the best dataware housing tool to learn in present market?

    - by uma
    I am graguating in dis may in electrical engg...but i would like to learn any one of the data ware housing tools....can any one please suggest me which is the best data ware housing tool for non-computer science graduates...so that it is easy to learn...and can get job... like (business objects,informatica,hyperion, datastage and cognos)?

    Read the article

  • What are some of the best automated web QA tools out there?

    - by Kant
    Issue We have a series of websites built in ASP.NET that we deploy frequently. Due to the lack of a QA team, we are unable to test the functionality and load of every web page within the site. Question What are some of the top tools for doing QA testing. The tool should include some basic functionality, such as: Notifying parties when unexpected results occur. Expected results should be configurable (i.e. Hit web page A, if the response doesn't have the string, "My intranet portal" in it, notify the appropriate parties). Any help is appreciated.

    Read the article

  • Continuously check nestat output for a particular program

    - by Vihaan Verma
    I have a android emulator running on port 5554. I want to continuously watch the netstat output concerning emulator stuff. right now I have to manually execute this command every time sudo netstat -plant | grep emulator I thought doing something like this would repeat above command automatically every 2 sec. watch sudo netstat -plant | grep emulator but instead it hangs the terminal. How to achieve such functionality ? Thanks

    Read the article

  • Share PC over network

    - by Sachin Verma
    I have a server installed on one local Win7 machine (say as 192.168.2.14:8080/myAPP) and I want to access that server from different computer (say ip as 192.168.2.16). Even they are connected to same network I can't access server from other computer. I guess the problem is in firewall. This is working when I disable firewall and not working when I allow certain ports in windows firewall but keeping firewall on (As a rule to allow incoming connections).

    Read the article

  • Using a comma seperated data in MYSQL "IN" clause

    - by Sashi Kant
    I have a column in one of my table where I store multiple ids seperated by comma's. Is there a way in which I can use this column's value in the "IN" clause of a query. The column(city) has values like 6,7,8,16,21,2 I need to use as Select * from table where e_ID in (Select city from locations where e_Id=?) I am satisfied with Crozin's answer, but I am open to suggestions, views and options. Feel free to share your views.

    Read the article

  • jQuery AJAX call working in IE but not FF?

    - by Uma Maheshwar
    $.ajax({ type: "GET", url: 'http://services.somewhere.com/MethodName', data: { 'param1':'something', 'param2': 'somethingElse' }, cache: false, dataType: 'jsonp', contentType: "application/json; charset=utf-8", success: function(view) { alert('success'); }, error: function(xhr, ajaxOptions, thrownError) { alert(xhr.status); alert(xhr.responseText); alert(xhr.statusText); } });

    Read the article

  • Web Deploy no ASP.NET 4 no VS 2010

    - by renatohaddad
    Pessoal, nunca foi tão fácil fazer deploy de aplicações ASP.NET 4 no VS 2010, é impressionante a facilidade. Para o Road Show eu criei uma conta no provedor orcsweb que já hospeda .NET 4, fiz uma simples aplicação que inclusive lê um banco de dados e a url é http://173.46.159.126/Default.aspx Durante o Road Show, faremos o deploy ao VIVO e "com emoção", é claro :). O fato é que o ASP.NET permite vc criar diversos Web.Config para seus ambientes de deenvlvimento, testes, homologação, produção, etc, inclusive com características próprias de cada ambiente. Assim, ninguém mais precisa ter aquele Web.Config com toneladas de comentários para rodar em um outro ambiente. Bom, espero todos no road show. abração. Renatão 

    Read the article

  • XML ou JSON? (pt-BR)

    - by srecosta
    Depende.Alguns de nós sentem a necessidade de escolher uma nova técnica / tecnologia em detrimento da que estava antes, como uma negação de identidade ou como se tudo que é novo viesse para substituir o que já existe. Chega a parecer, como foi dito num dos episódios de “This Developer’s Life”, que temos de esquecer algo para termos espaço para novos conteúdos. Que temos de abrir mão.Não é bem assim que as coisas funcionam. Eu vejo os colegas abraçando o ASP.NET MVC e condenando o ASP.NET WebForms como o anticristo. E tenho observado a mesma tendência com o uso do JSON para APIs ao invés de XML, como se o XML não servisse mais para nada. Já vi, inclusive, módulos sendo reescritos para trabalhar com JSON, só porque “JSON é melhor” ™.O post continua no meu blog: http://www.srecosta.com/2012/11/22/xml-ou-json/Grande abraço,Eduardo Costa

    Read the article

  • VADs (Value Added Distributors) Oracle em Portugal

    - by Paulo Folgado
    Com a recente incorporação da Sun na Oracle, e o consequente acolhimento no seu canal de revenda dos distribuidores de Hardware (designados até então pela Sun por CDP - Channel Development Provider), a Oracle aproveitou para fazer, a nível global, uma reformulação do seu canal de distribuição.Essa reformulação pretendeu alcançar vários objectivos: Uniformizar as condições comerciais e de processos entre os CDPs Sun agora incorporados e os VAD Oracle já existentes Reduzir o número total de VADs a nível global Dar preferência a VADs com operações internacionais, em detrimento das operações puramente locais num só país Conceder a cada um dos VADs seleccionados a distribuição de todas as linhas de produtos Oracle, incluindo Software e Hardware.Assim, em resultado dessa reformulação, temos o prazer de anunciar que a Oracle Portugal passa a operar com os dois seguintes VADs: Cada um destes VADs passa a distribuir indistintamente, como acima foi referido, as linhas de produtos Software e Hardware. Para mais detalhes sobre as 2 empresas e os respectivos contactos, favor consultar em: http://blogs.oracle.com/opnportugal/vad/vad.html. Estamos certos que esta reformulação virá contribuir para uma ainda maior dinamização do ecosistema de parceiros da Oracle Portugal.

    Read the article

  • A verdade sobre o NuGet e seu futuro (pt-BR)

    - by srecosta
    uma série de mal-entendidos sobre o NuGet e sobre o ecossistema do qual ele faz parte: ele é da Microsoft ou ele é da comunidade; ele é open source ou ele não é; ele existe fora do Visual Studio ou só nele? Neste post, que é uma tradução de um post do Phil Haack (o @haacked) que eu pedi pra traduzir, ele tenta responder alguns deles e deixar claro qual é a missão do NuGet e o que a comunidade pode fazer para torná-lo melhor.O post continua no meu blog: http://www.srecosta.com/2012/11/19/a-verdade-sobre-o-nuget-e-seu-futuro/Abraços,Eduardo Costa

    Read the article

  • Webcast Replay Available: SOA Integration Options for E-Business Suite

    - by BillSawyer
    I am pleased to release the replay and presentation for the latest ATG Live Webcast: SOA Integration Options for E-Business Suite (Presentation)Abhishek Verma, Manager, Applications Technology Group and Rajesh Ghosh, Group Manager, ATG Development discussed the web service and SOA integration options for Oracle E-Business Suite. The presentation covered Oracle's integration tools and technologies, including the Oracle Applications Adapter and the Integrated SOA Gateway.Finding other recorded ATG webcastsThe catalog of ATG Live Webcast replays, presentations, and all ATG training materials is available in this blog's Webcasts and Training section.

    Read the article

  • taglib link errors

    - by Vihaan Verma
    I m using taglib for one of my projects . The Debug/Release library is build using MSVC 10. On compiling the code with the library in taglib/taglib/Release some linker error are thrown . id3.cpp.1.o : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class TagLib::AudioPropertie s * __cdecl TagLib::FileRef::audioProperties(void)const " (__imp_?audioProperties@FileRef@TagLib@@QEBAPEAVAudioProp erties@2@XZ) referenced in function "struct MetaData __cdecl ID3::getMetaDataOfFile(class std::basic_string<char,st ruct std::char_traits<char>,class std::allocator<char> >)" (?getMetaDataOfFile@ID3@@YA?AUMetaData@@V?$basic_string@ DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) id3.cpp.1.o : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl TagLib::Stri ng::~String(void)" (__imp_??1String@TagLib@@UEAA@XZ) referenced in function "struct MetaData __cdecl ID3::getMetaDa taOfFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?getMetaDataOfF ile@ID3@@YA?AUMetaData@@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) id3.cpp.1.o : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::basic_string<char ,struct std::char_traits<char>,class std::allocator<char> > __cdecl TagLib::String::to8Bit(bool)const " (__imp_?to8 Bit@String@TagLib@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_N@Z) referenced in function "struct MetaData __cdecl ID3::getMetaDataOfFile(class std::basic_string<char,struct std::char_traits<char>,class s td::allocator<char> >)" (?getMetaDataOfFile@ID3@@YA?AUMetaData@@V?$basic_string@DU?$char_traits@D@std@@V?$allocator @D@2@@std@@@Z) id3.cpp.1.o : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl TagLib::File Ref::~FileRef(void)" (__imp_??1FileRef@TagLib@@UEAA@XZ) referenced in function "struct MetaData __cdecl ID3::getMet aDataOfFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?getMetaData OfFile@ID3@@YA?AUMetaData@@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) id3.cpp.1.o : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class TagLib::Tag * __cdecl TagLib::FileRef::tag(void)const " (__imp_?tag@FileRef@TagLib@@QEBAPEAVTag@2@XZ) referenced in function "struct Meta Data __cdecl ID3::getMetaDataOfFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator <char> >)" (?getMetaDataOfFile@ID3@@YA?AUMetaData@@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z ) id3.cpp.1.o : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __cdecl TagLib::FileRef ::isNull(void)const " (__imp_?isNull@FileRef@TagLib@@QEBA_NXZ) referenced in function "struct MetaData __cdecl ID3: :getMetaDataOfFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?getM etaDataOfFile@ID3@@YA?AUMetaData@@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) id3.cpp.1.o : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl TagLib::FileRef::Fil eRef(class TagLib::FileName,bool,enum TagLib::AudioProperties::ReadStyle)" (__imp_??0FileRef@TagLib@@QEAA@VFileName @1@_NW4ReadStyle@AudioProperties@1@@Z) referenced in function "struct MetaData __cdecl ID3::getMetaDataOfFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?getMetaDataOfFile@ID3@@YA?AU MetaData@@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) id3.cpp.1.o : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl TagLib::FileName::Fi leName(char const *)" (__imp_??0FileName@TagLib@@QEAA@PEBD@Z) referenced in function "struct MetaData __cdecl ID3:: getMetaDataOfFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?getMe taDataOfFile@ID3@@YA?AUMetaData@@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) I m only including tag.lib from taglib/taglib/Release folder . Is there some other library I m missing out?

    Read the article

  • Database EAV model, record listing as per search

    - by Shyam Sunder Verma
    I am building a dynamic application. I have three tables : ( EAV model style) 1: Items ( ItemId, ItemName) 2: Fields (FieldId, FieldName) 3: Field Values ( ItemID, FieldId, Value) Can you tell me how to write SINGLE query to get starting 20 records from ALL items where FieldId=4 is equal to TRUE. Expected Result : Columns = ItemID | Name | Field1 | Field2 | Field3 Each Row= ItemId | ItemName| Value1 | Value2 | Value3 Important concerns : 1: Number of fields per item are not known 2: I need one to write ONE query. 3: Query will be running on 100K records, so performance is concern. 4: I am using MySQL 5.0, so need solution for MYSQL Should I denormalize the tables if above query is not possible at all ? Any advice ?

    Read the article

  • Repeating parallax using Cocos2D on Android

    - by Saurabh Verma
    I want to draw a infinitely repeating parallax using Cocos2D on Android. Now, there are some solutions given to this problem in Objective C, but I'm stuck with my implementation in Android. I have tried using CCSprite background = CCSprite.sprite("background_island.png"); CCTexParams params = new CCTexParams(GL10.GL_LINEAR,GL10.GL_LINEAR,GL10.GL_REPEAT,GL10.GL_REPEAT); background.getTexture().setTexParameters(params); But it only extends the background in 1 direction. I guess I have to use 2 sprites, such that as soon as 1st finishes, the other starts and vice versa, but I'm stuck with the implementation.

    Read the article

  • Copying only the changed files while mirroring a website

    - by Rishi Verma
    I am using wget to mirror website using this code $ wget \ --recursive \ --no-clobber \ --page-requisites \ --html-extension \ --convert-links \ --restrict-file-names=windows \ --domains website.org \ --no-parent \ www.website.org/tutorials/html/ The next time I run it it starts downloading the same files again, however I want only the changed files to be downloaded next time. I am open to use any other tool or script(preferably PHP,Curl) apart from using wget.

    Read the article

< Previous Page | 1 2 3 4 5 6 7  | Next Page >