Search Results

Search found 174 results on 7 pages for 'saurabh deshpande'.

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

  • Arrow operator (->) usage in C

    - by Mohit Deshpande
    I am currently learning C by reading a good beginner's book called "Teach Yourself C in 21 Days" (I have already learned Java and C# so I am moving at a much faster pace). I was reading the chapter on pointers and the - (arrow) operator came up without explanation. I think that it is used to call members and functions (like the equivalent of the . (dot) operator, but for pointers instead of members). But I am not entirely sure. Could I please get an explanation and a code sample?

    Read the article

  • Imitate database in C

    - by Mohit Deshpande
    I am fairly new to C. (I have good knowledge of C# [Visual Studio] and Java [Eclipse]) I want to make a program that stores information. My first instinct was to use a database like SQL Server. But I don't think that it is compatible with C. So now I have two options: Create a struct (also typedef) containing the data types. Find a way to integrate SQLite through a C header file Which option do you think is best? Or do you have another option? I am kind of leaning toward making a struct with a typedef, but could be pursuaded to change my mind.

    Read the article

  • The concept of an Intent in Android?

    - by Mohit Deshpande
    I don't really understand the use and concept of an Intent. I DO understand that an activity are one visual interface and one endeavour that the user can partake in. I THINK an intent is used to launch and communicate between different activities. If so, then how would you accomplish that? A code sample would be helpful.

    Read the article

  • whats wrong in this LINQ synatx?

    - by Saurabh Kumar
    Hi, I am trying to convert a SQL query to LINQ. Somehow my count(distinct(x)) logic does not seem to be working correctly. The original SQL is quite efficient(or so i think), but the generated SQL is not even returning the correct result. I am trying to fix this LINQ to do what the original SQL is doing, AND in an efficient way as the original query is doing. Help here would be really apreciated as I am stuck here :( SQL which is working and I need to make a comparable LINQ of: SELECT [t1].[PersonID] AS [personid] FROM [dbo].[Code] AS [t0] INNER JOIN [dbo].[phonenumbers] AS [t1] ON [t1].[PhoneCode] = [t0].[Code] INNER JOIN [dbo].[person] ON [t1].[PersonID]= [dbo].[Person].PersonID WHERE ([t0].[codetype] = 'phone') AND ( ([t0].[CodeDescription] = 'Home') AND ([t1].[PhoneNum] = '111') OR ([t0].[CodeDescription] = 'Work') AND ([t1].[PhoneNum] = '222') ) GROUP BY [t1].[PersonID] HAVING COUNT(DISTINCT([t1].[PhoneNum]))=2 The LINQ which I made is approximately as below: var ids = context.Code.Where(predicate); var rs = from r in ids group r by new { r.phonenumbers.person.PersonID} into g let matchcount=g.Select(p => p.phonenumbers.PhoneNum).Distinct().Count() where matchcount ==2 select new { personid = g.Key }; Unfortunately, the above LINQ is NOT generating the correct result, and is actually internally getting generated to the SQL shown below. By the way, this generated query is also reading ALL the rows(about 19592040) around 2 times due to the COUNTS :( Wich is a big performance issue too. Please help/point me to the right direction. Declare @p0 VarChar(10)='phone' Declare @p1 VarChar(10)='Home' Declare @p2 VarChar(10)='111' Declare @p3 VarChar(10)='Work' Declare @p4 VarChar(10)='222' Declare @p5 VarChar(10)='2' SELECT [t9].[PersonID], ( SELECT COUNT(*) FROM ( SELECT DISTINCT [t13].[PhoneNum] FROM [dbo].[Code] AS [t10] INNER JOIN [dbo].[phonenumbers] AS [t11] ON [t11].[PhoneType] = [t10].[Code] INNER JOIN [dbo].[Person] AS [t12] ON [t12].[PersonID] = [t11].[PersonID] INNER JOIN [dbo].[phonenumbers] AS [t13] ON [t13].[PhoneType] = [t10].[Code] WHERE ([t9].[PersonID] = [t12].[PersonID]) AND ([t10].[codetype] = @p0) AND ((([t10].[codetype] = @p1) AND ([t11].[PhoneNum] = @p2)) OR (([t10].[codetype] = @p3) AND ([t11].[PhoneNum] = @p4))) ) AS [t14] ) AS [cnt] FROM ( SELECT [t3].[PersonID], ( SELECT COUNT(*) FROM ( SELECT DISTINCT [t7].[PhoneNum] FROM [dbo].[Code] AS [t4] INNER JOIN [dbo].[phonenumbers] AS [t5] ON [t5].[PhoneType] = [t4].[Code] INNER JOIN [dbo].[Person] AS [t6] ON [t6].[PersonID] = [t5].[PersonID] INNER JOIN [dbo].[phonenumbers] AS [t7] ON [t7].[PhoneType] = [t4].[Code] WHERE ([t3].[PersonID] = [t6].[PersonID]) AND ([t4].[codetype] = @p0) AND ((([t4].[codetype] = @p1) AND ([t5].[PhoneNum] = @p2)) OR (([t4].[codetype] = @p3) AND ([t5].[PhoneNum] = @p4))) ) AS [t8] ) AS [value] FROM ( SELECT [t2].[PersonID] FROM [dbo].[Code] AS [t0] INNER JOIN [dbo].[phonenumbers] AS [t1] ON [t1].[PhoneType] = [t0].[Code] INNER JOIN [dbo].[Person] AS [t2] ON [t2].[PersonID] = [t1].[PersonID] WHERE ([t0].[codetype] = @p0) AND ((([t0].[codetype] = @p1) AND ([t1].[PhoneNum] = @p2)) OR (([t0].[codetype] = @p3) AND ([t1].[PhoneNum] = @p4))) GROUP BY [t2].[PersonID] ) AS [t3] ) AS [t9] WHERE [t9].[value] = @p5 Thanks!

    Read the article

  • Learning MVVM for WPF

    - by Mohit Deshpande
    I am now very comfortable with WPF, but I read some articles about MVP and MVVM that find the default project solution ineffective. Then I realized how ineffective it was and how the MVVM pattern is much better. So I want to really learn this pattern. Can I be directed to some resources like maybe a tutorial or a video or something?

    Read the article

  • Query Returning value as 0

    - by NIMISH DESHPANDE
    I am trying to execute following PL/SQL script in SQL Developer. The loop should return count of nulls but somehow everytime it is returning 0. set serveroutput on DECLARE --v_count number; v_count_null number; BEGIN execute immediate 'select count(*) from SP_MOSAIX' into v_count; FOR i in (select column_name from all_tab_COLUMNS where table_name = 'SP_MOSAIX') LOOP select count(*) into v_count_null from SP_MOSAIX where i.column_name IS NULL ; dbms_output.put_line(v_count_null); END LOOP; END; So when I run this, following output is what i get: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 But if I manually execute the query subsituting column_name I get the result. select count(*) into v_count_null from SP_MOSAIX where i.column_name IS NULL; Can anybody help on this?

    Read the article

  • WCF large message exception

    - by Saurabh Lalwani
    Hi, I have a web service which is returning data to the desktop application. The problem I am having is, when the web service returns small volume of data everything works fine but when the volume of data is large it throws the following exception: System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. Can it be because it is taking a good 4-5 seconds to fetch all the records from the database and the session times out or something? Also, when I am debugging the web service, I see that this particular method is called twice and it is also returning the correct value both times, but for some reason the desktop application seems to be throwing the aforementioned exception. I found similar posts before on stackoverflow but they did not solve my problem. Can anybody please tell me what's going on in here? Thanks!

    Read the article

  • What version of the .NET framework is installed on Windows XP, Vista, and 7?

    - by Mohit Deshpande
    I have an application that uses the .NET framework 3.5. I am building this application for a college to help students to study. Most students usually have Windows XP SP2, Windows Vista, or Windows 7. (Sorry Mac users! The Mac version will come out in about 6 months) What version of the .NET framework is installed on Windows XP, Vista, and 7; and will my application run on all of those platforms?

    Read the article

  • What kind of events should be created for a CRUD application?

    - by Mohit Deshpande
    I have an application that is centered around a database (ORM is LINQ-SQL) that has a table called Assignment. I am using the repository pattern to manipulate the database. My application is basically going to perform CRUD operations. I am new to delegates and events and I am asking you what events I should create (like maybe AssignmentCreating, AssignmentCreated) and what kind of delegate to use (like maybe a custom delegate or just an EventHandler)?

    Read the article

  • Declare variable as exern if initialized in header?

    - by Mohit Deshpande
    Say I declare a header file with a variable: int count; Then in the source file, I want to use count. Do I have to declare it as: extern int count Or can I just use it in my source file? All assuming that I have #include "someheader.h". Or should I just declare it in the source file? What is the difference between putting count in the header file vs the source file? Or does it not matter?

    Read the article

  • BlackBerry - Exception with null message when sending sms using Connector

    - by vikram deshpande
    I used code given but I am getting "IOCancelledException" and "IOException". And IOCancelledException.getMessage() / IOException.getMessage() giving null string, it does not give error message. Please help me understaing reason. class SMSThread extends Thread { Thread myThread; MessageConnection msgConn; String message; String mobilenumber; public SMSThread(String textMsg, String mobileNumber) { message = textMsg; mobilenumber = mobileNumber; } public void run() { try { msgConn = (MessageConnection) Connector.open("sms://+" + mobilenumber); TextMessage text = (TextMessage) msgConn .newMessage(MessageConnection.TEXT_MESSAGE); text.setPayloadText(message); msgConn.send(text); msgConn.close(); } catch (IOCancelledException ioce) { System.out .println("IOCancelledException: " + ioce.getMessage()); } catch (IOException ioe) { System.out.println("IOException: " + ioe.getMessage()); } catch (Exception e) { System.out.println("Exception: " + e); } } }

    Read the article

  • Compare Database container and class container

    - by Mohit Deshpande
    I am using a SQL Server database in my current project. I was watching the MVC Storefront videos (specifically the repository pattern) and I noticed that Rob (the creator of MVC Storefront) used a class called Category and Product, instead of a database and I have notice that using LINQ-SQL or ADO.NET, that a class is generated. Is there an advantage to using a class over a database to store information? Or is it the other way around? Or are they even comparable?

    Read the article

  • Ideas for a C/C++ library

    - by Mohit Deshpande
    I thought one of the best ways to familiarise myself with C/C++, is to make a helpful library. I was maybe thinking like a geometry library, like to calculate areas, surface area, etc. It would be useful in game programming. Or maybe an algebra library, like for different formulas like the distance formula, quadratic formula, etc. Or maybe like a standard library for very simple functions, like calculating the number of items in an array.

    Read the article

  • Generating dynamic css using php and javascript

    - by Onkar Deshpande
    I want to generate tooltip based on a dynamically changing background image in css. This is my my_css.php file. <?php header('content-type: text/css'); $i = $_GET['index']; if($i == 0) $bg_image_path = "../bg_red.jpg"; elseif ($i == 1) $bg_image_path = "../bg_yellow.jpg"; elseif ($i == 2) $bg_image_path = "../bg_green.jpg"; elseif ($i == 3) $bg_image_path = "../bg_blue.jpg"; ?> .tooltip { white-space: nowrap; color:green; font-weight:bold; border:1px solid black;; font-size:14px; background-color: white; margin: 0; padding: 7px 4px; border: 1px solid black; background-image: url(<?php echo $bg_image_path; ?>); background-repeat:repeat-x; font-family: Helvetica,Arial,Sans-Serif; font-family: Times New Roman,Georgia,Serif; filter:alpha(opacity=85); opacity:0.85; zoom: 1; } In order to use this css I added <link rel="stylesheet" href="css/my_css.php" type="text/css" media="screen" /> in my html <head> tag of javascript code. I am thinking of passing different values of 'index' so that it would generate the background image dynamically. Can anyone tell me how should I pass such values from a javascript ? I am creating the tooltip using var tooltip = document.createElement("div"); document.getElementById("map").appendChild(tooltip); tooltip.style.visibility="hidden"; and I think before calling this createElement, I should set background image.

    Read the article

  • null pointer exception at org.hibernate.tuple.AbstractEntityTuplizer.createProxy

    - by saurabh
    I am using hibernate 3.2 with struts 1.2 framework I got this exception when i m trying to load the object I am using this code to load the object public Currentprofile findById(java.lang.String id) { log.debug("getting Currentprofile instance with id: " + id); try { Currentprofile instance = (Currentprofile) getSession().get( "com.hibermappings.Currentprofile", id); return instance; } catch (RuntimeException re) { log.error("get failed", re); throw re; } } my hbm file is this <one-to-one name="referenceDb" lazy="proxy" class="com.hibermappings.ReferenceDb" cascade="all" constrained="false" /> <one-to-one name="registration" lazy="proxy" class="com.hibermappings.Registration" cascade="all" constrained="false" /> <one-to-one name="jobseekerpackagedetails" lazy="proxy" class="com.hibermappings.Jobseekerpackagedetails" cascade="all" constrained="false" /> <property name="keyWords" type="java.lang.String"> <column name="keyWords" length="5000" /> </property> <property name="totalExp" type="java.lang.String"> <column name="totalExp" length="100" /> </property> <property name="hqualification" type="java.lang.String"> <column name="hQualification" length="100" /> </property> <property name="preferedLocation" type="java.lang.String"> <column name="preferedLocation" length="100" /> </property> <property name="functionalArea" type="java.lang.String"> <column name="functionalArea" length="1000" /> </property> <property name="expSalary" type="java.lang.String"> <column name="expSalary" length="100" /> </property> <property name="designation" type="java.lang.String"> <column name="designation" length="100" /> </property> <property name="resumeTitle" type="java.lang.String"> <column name="resumeTitle" length="500" /> </property> <property name="profileDetails" type="java.lang.String"> <column name="profileDetails" length="65535" /> </property> <property name="requiredProfile" type="java.lang.String"> <column name="requiredProfile" length="65535" /> </property> <property name="activatedOn" type="java.util.Date"> <column name="activatedOn" length="0" /> </property> <set name="resumes" inverse="true" cascade="save-update"> <key> <column name="jobseekerId" length="50" /> </key> <one-to-many class="com.hibermappings.Resume" /> </set> </class> the same code runs well when I m using in a simple java class within main method .. full stack trace of exception is java.lang.NullPointerException at org.hibernate.tuple.AbstractEntityTuplizer.createProxy(AbstractEntityTuplizer.java:372) at org.hibernate.persister.entity.AbstractEntityPersister.createProxy(AbstractEntityPersister.java:3121) at org.hibernate.event.def.DefaultLoadEventListener.createProxyIfNecessary(DefaultLoadEventListener.java:232) at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:173) at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:87) at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:862) at org.hibernate.impl.SessionImpl.load(SessionImpl.java:781) at org.hibernate.impl.SessionImpl.load(SessionImpl.java:774) at com.DAOs.CurrentprofileDAO.getLoad(CurrentprofileDAO.java:71) at com.action.JobSekeerManage.viewProfile(JobSekeerManage.java:447) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:270) at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:187) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at com.filter.HibernateFilter.doFilter(HibernateFilter.java:24) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:731) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:526) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) Error::null

    Read the article

  • R.java file not updating with UI element's id

    - by Mohit Deshpande
    I added some UI elements to the main.xml file in the res\layout folder and when I try to access them through the call, R.layout.my_uielement, the UI element that I created is not there. Even when I add a new xml file with UI elements, it still doesn't show up in the R.layout class. I have made checked the ids on them and they have the correct format (I think): android:id="@+id/my_button". What could be the problem? Do I need to compile the code first?

    Read the article

  • Online Sports betting website using Drupal

    - by Saurabh
    I wanted to know how suitable is Drupal for making a sports betting website similar to http://www.sportsinteraction.com/ . I am aware that there are modules like Bookmaker in Drupal which could help . However, I am puzzled about how to handle the user accounts can be extended to keep a track of the money in each individual account. Also I have with me betting scripts purchased from http://sportbettingscript.com/ . Can the same be integrated with Drupal? Wish to know your thoughts. Any help would be appreciated. Thanks.

    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

  • Pros and Cons of C vs C++ programming

    - by Mohit Deshpande
    I am trying to decide on whether I should learn C or C++. I come from a very object-oriented background of java and C#. I have heard that C++ is more object-oriented than C, BUT I have also heard that a C program compiles and runs faster than a C++ program. Please help me get the facts straight by giving pros and cons of BOTH points of views. (Points of views being C over C++, or C++ over C)

    Read the article

  • Most popular mobile platform to develop on?

    - by Mohit Deshpande
    This question may not directly relate to programming. I have noticed that the technology of today has gone mobile. I want to go mobile with it. What is the most popular mobile OS?(excluding iPhone OS. Sorry, I don't have a Mac to develop on) Some choices could be BlackBerry OS, Windows Phone, Symbian OS, Android OS, etc. I want to make and sell applications for a mobile OS.

    Read the article

  • ISO C++ forbids declaration of 'QPushButton' with no type in QT Creator

    - by Mohit Deshpande
    I am running QT Creator on a Linux Ubuntu 9.10 machine. I just got started with QT Creator, and I was going through the tutorials when this error popped up while I was trying to build my project: "ISO C++ forbids declaration of 'QPushButton' with no type". This problem appears in my header file: #ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QtGui/QWidget> namespace Ui { class MainWindow; } class MainWindow : public QWidget { Q_OBJECT public: MainWindow(QWidget *parent = 0); ~MainWindow(); public slots: void addContact(); void submitContact(); void cancel(); private: Ui::MainWindow *ui; QPushButton *addButton; QPushButton *submitButton; QPushButton *cancelButton; QLineEdit *nameLine; QTextEdit *addressText; QMap<QString, QString> contacts; QString oldName; QString oldAddress; }; #endif // MAINWINDOW_H

    Read the article

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