Search Results

Search found 693 results on 28 pages for 'muhammad ali rajput'.

Page 23/28 | < Previous Page | 19 20 21 22 23 24 25 26 27 28  | Next Page >

  • Node & Redis: Crucial Design Issues in Production Mode

    - by Ali
    This question is a hybrid one, being both technical and system design related. I'm developing the backend of an application that will handle approx. 4K request per second. We are using Node.js being super fast and in terms of our database struction we are using MongoDB, with Redis being a layer between Node and MongoDB handling volatile operations. I'm quite stressed because we are expecting concurrent requests that we need to handle carefully and we are quite close to launch. However I do not believe I've applied the correct approach on redis. I have a class Student, and they constantly change stages(such as 'active', 'doing homework','in lesson' etc. Thus I created a Redis DB for each state. (1 for being 'active', 2 for being 'doing homework'). Above I have the structure of the 'active' students table; xa5p - JSON stringified object #1 pQrW - JSON stringified object #2 active_student_table - {{studentId:'xa5p'}, {studentId:'pQrW'}} Since there is no 'select all keys method' in Redis, I've been suggested to use a set such that when I run command 'smembers' I receive the keys and later on do 'get' for each id in order to find a specific user (lets say that age older than 15). I've been also suggested that in fact I used never use keys in production mode. My question is, no matter how 'conceptual' it is, what specific things I should avoid doing in Node & Redis in production stage?. Are they any issues related to my design? Students must be objects and I sure can list them in a list but I haven't done yet. Is it that crucial in production stage?

    Read the article

  • Help needed to convert code from C# to Python.

    - by Ali
    Can you please convert this code from C# to Python to be run on IronPython? I don’t have any experience with Python. using System; using Baz; namespace ConsoleApplication { class Program { static void Main() { Portal foo = new Portal("Foo"); Agent bar = new Agent("Bar"); foo.Connect("127.0.0.1", 1234); foo.Add(bar); bar.Ready += new Agent.ReadyHandler(bar_Ready); } static void bar_Ready(object sender, string msg) { Console.WriteLine(msg.body); } } }

    Read the article

  • Generated sql from LINQ to SQL

    - by Muhammad Kashif Nadeem
    Following code ProductPricesDataContext db = new ProductPricesDataContext(); var products = from p in db.Products where p.ProductFields.Count > 3 select new { ProductIDD = p.ProductId, ProductName = p.ProductName.Contains("hotel"), NumbeOfProd = p.ProductFields.Count, totalFields = p.ProductFields.Sum(o => o.FieldId + o.FieldId) }; Generated follwing sql SELECT [t0].[ProductId] AS [ProductIDD], (CASE WHEN [t0].[ProductName] LIKE '%hotel%' THEN 1 WHEN NOT ([t0].[ProductName] LIKE '%hotel%') THEN 0 ELSE NULL END) AS [ProductName], ( SELECT COUNT(*) FROM [dbo].[ProductField] AS [t2] WHERE [t2].[ProductId] = [t0].[ProductId] ) AS [NumbeOfProd], ( SELECT SUM([t3].[FieldId] + [t3].[FieldId]) FROM [dbo].[ProductField] AS [t3] WHERE [t3].[ProductId] = [t0].[ProductId]) AS [totalFields] FROM [dbo].[Product] AS [t0] WHERE (( SELECT COUNT(*) FROM [dbo].[ProductField] AS [t1] WHERE [t1].[ProductId] = [t0].[ProductId] )) > 3 Why is this CASE statement for ProductName and because of this instead of ProductName i am just getting 0 in my result set. It should generate sql like following, (where ProductName like '%hotel%' SELECT [t0].[ProductId] AS [ProductIDD], [ProductName], ( SELECT COUNT(*) FROM [dbo].[ProductField] AS [t2] WHERE [t2].[ProductId] = [t0].[ProductId] ) AS [NumbeOfProd], ( SELECT SUM([t3].[FieldId] + [t3].[FieldId]) FROM [dbo].[ProductField] AS [t3] WHERE [t3].[ProductId] = [t0].[ProductId]) AS [totalFields] FROM [dbo].[Product] AS [t0] WHERE (( SELECT COUNT(*) FROM [dbo].[ProductField] AS [t1] WHERE [t1].[ProductId] = [t0].[ProductId] )) > 3 AND t0.ProductName like '%hotel%' Thanks.

    Read the article

  • update table in gtk

    - by ali
    I have window that contains a table on screen, now I want to attach a widget to that table I use gtk_table_attach(GTK_TABLE(table), label, ...) the function is correct and it runs without any error but table does not respond to that line I mean there is no change on my table, I think I need something to tell that table update it self but how? note= that line is inside a callback of a signal and I am sure that signal runs note2= I do not want to destroy window for that note3= I use gtk+ and pygtk note4= I am sure I attach that widget to a correct position ( it is free)

    Read the article

  • php regex replace slashes and spaces and hyphens

    - by Muhammad Shahzad
    I have fews combinations of strings that I need to bring in to one pattern, that is multiple spaces should be removed, double hyphens should be replaced with single hypen, and single space should be replaced with single hyphen. I have already tried this expression. $output = preg_replace( "/[^[:space:]a-z0-9]/e", "", $output ); $output = trim( $output ); $output = preg_replace( '/\s+/', '-', $output ); But this fails in few combinations. I need help in making all of these combinations to work perfectly: steel-black steel- black steel black I should also remove any of these as well "\r\n\t".

    Read the article

  • How do i connect with dart community to suggest something

    - by Muhammad Umer
    I am new to this stackoverflow and programming. So HI!!!! What i hope to do is tell something that i think is important to Dart community. If somehow it was possible to code android and or iphone apps using dart that would be very awesome and same for Dart.... There is one path, that is making program in dart compiling it to javascript and then making app using Adobe air..... .But looks inefficient. so is there any other way which i am unaware of, via which i can build an android app at least.. using dart i know you can build an app, using javascript..and css+html...so i am looking for html+css+dart. It'd be cool if adobe air supports dart language directly.

    Read the article

  • How can I search for an email using the zend framework?

    - by Ali
    Hi guys I need to build a functionality that involves searching through emails in an inbox for emails whose subjects match a certain user inputted keyword. SInce I'm using the zend framework I would like a solution that uses the zend framework libraries. Aside this I have noticed that the zend libraries are a bit limited with respect to my requirements for email handling. Is there any open library available in php which can be used for handling emails - when I mean handling emails I mean like: Ease to mark and flag emails Moving of emails from folder to folder. Parsing emails searching through emails SOrting emails etc - the stuff you would require if you wished to build a web client. EDIT ========= I'm looking for a generic solution here. The emails are in a regular email inbox on an IMAP server. I need a way to be able to read through and search for emails in the inbox using any specialized library to make it easier.

    Read the article

  • IP address of domain on shared host

    - by Ali
    I have domain on a shared hosting provider. How do I find the direct IP address of my domain using Python? Is it possible to post to a script on my domain using the IP address and not the website itself? Thanks.

    Read the article

  • Php file outputting javascript for include as a JS file - need to restrict so its not opened in a browser window

    - by Ali
    Hi guys, I'm storing configuration details in a database which I need to use in javascript. I'm accessing all this using php and instead of outputting all the details into inline javascript code on the main page I've instead created a php file that outputs content type javascript and refernce it in my main page as an external javascript file. I want to set it up so that it can't be viewed in a browser window i.e : <script type="text/javascript" src="phpFileThatDoesJS.php" ></script> should work but typing www.mysite.com/phpFileThatDoesJS.php in the browser shouldn't EDIT ========== The thing is that I have to edit a script that for some oddball reason stores the username and password of a user in a javascript Object and outputs it within script tags. I have to set it up so that this is not viewable by a simple view source action. Thats why I thought of referencing it as an external javascript. Isnt there any htaccess tricks that I could use?

    Read the article

  • Update table without using cursor and on date

    - by Muhammad Kashif Nadeem
    Please copy and run following script DECLARE @Customers TABLE (CustomerId INT) DECLARE @Orders TABLE ( OrderId INT, CustomerId INT, OrderDate DATETIME ) DECLARE @Calls TABLE (CallId INT, CallTime DATETIME, CallToId INT, OrderId INT) ----------------------------------------------------------------- INSERT INTO @Customers SELECT 1 INSERT INTO @Customers SELECT 2 ----------------------------------------------------------------- INSERT INTO @Orders SELECT 10, 1, DATEADD(d, -20, GETDATE()) INSERT INTO @Orders SELECT 11, 1, DATEADD(d, -10, GETDATE()) ----------------------------------------------------------------- INSERT INTO @Calls SELECT 101, DATEADD(d, -19, GETDATE()), 1, NULL INSERT INTO @Calls SELECT 102, DATEADD(d, -17, GETDATE()), 1, NULL INSERT INTO @Calls SELECT 103, DATEADD(d, -9, GETDATE()), 1, NULL INSERT INTO @Calls SELECT 104, DATEADD(d, -6, GETDATE()), 1, NULL INSERT INTO @Calls SELECT 105, DATEADD(d, -5, GETDATE()), 1, NULL ----------------------------------------------------------------- I want to update @Calls table and need following results. I am using the following query UPDATE @Calls SET OrderId = ( CASE WHEN (s.CallTime > e.OrderDate) THEN e.OrderId END ) FROM @Calls s INNER JOIN @Orders e ON s.CallToId = e.CustomerId and the result of my query is not what I need. Requirement: As you can see there are two orders. One is on 2010-12-12 and one is on 2010-12-22. I want to update @Calls table with relevant OrderId with respect to CallTime. In short If subsequent Orders are added, and there are further calls then we assume that a new call is associated with the most recent Order Note: This is sample data so this is not the case that I always have two Orders. There might be 10+ Orders and 100+ calls. Note2 I could not find good title for this question. Please change it if you think of any better. Thanks.

    Read the article

  • window form: Adding Emoticons

    - by Emaad Ali
    Hi, i am trying to develop a window form using c# with asp.net 3.5 framework. in that form i want to insert emoticons as we found in yahoo, hotmail etc messenger. can anyone tell me how i can implement that thing as it is done in messenger. please help me.

    Read the article

  • PHP Export to CSV

    - by Ali Hamra
    I'm not really familiar with PHP exporting to excel or csv, but I'm using PHP MySQL for a local point of sale. According to the code below, this actually works..But not in the way it should be ! All records are placed as 1 row inside the csv file, how can i fix that ? Also, How would I stop overwriting the same file...I mean When I click on a Button to export the csv, it should check if there is an existing csv file, If there is--Create new one ! Thank You require_once('connect_db.php'); $items_array = array(); $result = mysql_query("SELECT * FROM sold_items"); while($row = mysql_fetch_array($result)) { $items_array[] = $row['item_no']; $items_array[] = $row['qty']; } $f = fopen('C:/mycsv.csv', 'w'); fputcsv($f, $items_array); fclose($f);

    Read the article

  • send mouse movement via client-server application

    - by Ali
    I wana let the mouse appeared and move in client side as it moved in the server.For more explination my application is sending the server screen to the client side which appeared as a seperated window in the client .However, the screen is appeared but the mouse has not been seen the window as i wish .

    Read the article

  • how to start stop tomcat server using CMD?

    - by ali
    i set the path for the tomcat and set all variables like 1.JAVA_HOME=C:\Program Files (x86)\Java\jdk1.6.0_22 2.CATALINA_HOME=G:\springwork\server\apache-tomcat-6.0.29 3.CLASSPATH=G:\springwork\server\apache-tomcat-6.0.29\lib\servlet-api.jar;G:\springwork\server\apache-tomcat-6.0.29\lib\jsp-api.jar;.; when i go to bin folder and double click on startup.bat then my tomcat start and when i double click on shutdown.bat tomcat is stop. But I want using CMD start and stop the tomcat. And in any folder i write command startup.bat the server will start and when i write the server will stop...... Thanks in advace..........

    Read the article

  • Block temporarily interaction during wcf call!

    - by Muhammad Jamal Shaikh
    hi , Silverlight version : 4 Silverlight patter :MVVM Visual Studio template :Silverlight navigation application How do I block main navigation on (mainpage.xaml) as in any silverlight navigation application and block page's controls ( i.e whichever page is it in ) during async webservice calls in my viewmodel? Any best practices?

    Read the article

  • .htaccess subdomain redirect problem

    - by Ali
    Hi, I have a website let's say www.example.com and I have a subdomain something.example.com Both main domain and sub domain are pointing to directory "public_html" I have .htaccess on root which redirects any URL without www to www. For e.g. if user enters example.com then he will be redirected to www.example.com If user enters example.com/mypage.html then he will be redirected to www.example.com/mypage.html Now the problem is this is also affecting my subdomain. Because if someone enters something.example.com/visit.html then he is redirect to www.example.com/visit.html I don't want this! If user enters subdomain then I don't want to redirected to www domain. This is what I have in my .htacces file RewriteCond %{HTTP_HOST} !^www.stackoverflow.com$ [NC] RewriteRule ^(.*)$ http://www.stackoverflow.com/$1 [R=301,L] Can you please tell me what should I do to solve above problem? Thanks.

    Read the article

  • Entity framework generates values for NOT NULL columns which has default defined in db.

    - by Muhammad Kashif Nadeem
    Hi I have a table Customer. One of the columns in table is DateCreated. This column is NOT NULL but default values is defined for this column in db. When I add new Customer using EF4 from my code. var customer = new Customer(); customer.CustomerName = "Hello"; customer.Email = "[email protected]"; // Watch out commented out. //customer.DateCreated = DateTime.Now; context.AddToCustomers(customer); context.SaveChanges(); Above code generates following query. exec sp_executesql N'insert [dbo].[Customers]([CustomerName], [Email], [Phone], [DateCreated], [DateUpdated]) values (@0, @1, null, @2, null) select [CustomerId] from [dbo].[Customers] where @@ROWCOUNT > 0 and [CustomerId] = scope_identity() ',N'@0 varchar(100),@1 varchar(100),@2 datetime2(7) ',@0='Hello',@1='[email protected]',@2='0001-01-01 00:00:00' And throws following error The conversion of a datetime2 data type to a datetime data type resulted in an out-of-range value. The statement has been terminated. Can you please tell me how NOT NULL columns which has default values at db level should not have values generated by EF? DB: DateCreated DATETIME NOT NULL DateCreated Properties in EF: Nullable: False Getter/Setter: public Type: DateTime DefaultValue: None Thanks.

    Read the article

< Previous Page | 19 20 21 22 23 24 25 26 27 28  | Next Page >