Daily Archives

Articles indexed Saturday May 15 2010

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

  • SQL Server 22005: Top 1 * for a unique column?

    - by Echilon
    I have data in a table (below), and I need to select the most recent update from each user. Here the data has been sorted by date, so the 'SomeData' column of the most recent unique value of each user. Top 1 SomeData isn't going to work because it will only return for one user. Is this even possible using only SQL? Date SomeData User ... 8/5/2010 2.2 UserC 4/5/2010 1.1 UserA 3/5/2010 9.4 UserB 1/5/2010 3.7 UserA 1/5/2010 6.1 UserB

    Read the article

  • file upload with php

    - by Rajanikant shukla
    Hi every body I am uploading file with php every thing is fine but move_uploded_file is not working every variable displayed record and all permission for file is set function uploadfile($filename) { $filetype=$filename["type"]; $filename=$filename['name']; $filetempname=$filename['tmp_name']; if($filetype=="application/msword") { move_uploaded_file($filetempname,"resume/".$filename); } }

    Read the article

  • Whats wrong with this C program?

    - by Prab
    It should give me the number of inputs entered by the user. But it gives 100. I compiled with gcc. #include <stdio.h> int arr[100]; int count=0; int max=100; int main(){ int i, input; printf("Enter integer values one by one, q to quit.\n"); for(i=0;i<max;i++){ scanf("%d",&input); arr[i]=input; if(input=='q')break; count++; } printf("You entered %d values.\n",count); return 0; }

    Read the article

  • please help me to choose good boks on algorithms

    - by davit-datuashvili
    i want to help me to choose good books on algorithms many people from this site say me that show me your code and now i ask u to help me to choose good books on algorithms please i have not books on algorithms and in case i decide to buy it of course must buy book which has high quality yes? so please any ideas ?links everything

    Read the article

  • Convert Apache Htaccess rules to Lighttpd, Please help

    - by Vineet
    Hi... I want to convert the following .htaccess rules to lighttpd. Can anyone please help me ? DirectoryIndex index.php RewriteEngine On #RewriteBase /your-sub-directory RewriteRule ^index.php/rewrite-test index.php/rewrite-pass [L] RewriteCond %{REQUEST_URI} ^(.*)//(.*)$ RewriteRule . %1/%2 [R=301,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^.*$ index.php?qa-rewrite=$0&%{QUERY_STRING} [L] Thanks!

    Read the article

  • HBase schema help

    - by Jody Powlette
    Coming from a SQL Server background, I'm a newbie with regard to HBase, but the technology looks to be a good fit for what we're doing and the cost is definitely right! I need to maintain a list of log entries which normally I would create in an RDBS as: create table Log ( UserID int, SiteID int, Page varchar(50), Date smalldatetime ) where one user may have 0 or 1000 rows in this simple table. Typical queries would be to find all the rows for one user or all the rows for one user on one site. How does this translate into a "map" in HBase where there is no "row key" AND the same (SiteID,Page) may appear many times. My first thought is that UserID is a row key, but I still don't understand "column families" and the other terminology well enough to understand how to setup the table to hold this data where the one UserID can have many (SiteID,Page,Date) "rows". Any direction is appreciated!

    Read the article

  • Is a new thread in a Visual Studio test project aborted when the test ends?

    - by Michel
    Hi, i have to do some message exchange with a 3rd party (in a website). When the client posts a page, i start the message exchange. When that doesn't succeed for some reason, i report this to the client by rendering the page with a message. On the background, in a separate thread, i start a process to send abort messages to the 3rd party. I can't do this while the user is waiting for the page to come back, because it might take a few minutes. But in a test project, the test ends when the message to the 3rd party is sent, and after the new thread is started. But it seems that the new thread also ends, when the test is done. Is that normal behaviour? I do start the thread in a new class with a reference to 2 objects from the class which tries to send the message in the first place, may that be a problem?

    Read the article

  • Fast ruby http library for large XML downloads

    - by Vlad Zloteanu
    I am consuming various XML-over-HTTP web services returning large XML files ( 2MB). What would be the fastest ruby http library to reduce the 'downloading' time? Required features: both GET and POST requests gzip/deflate downloads (Accept-Encoding: deflate, gzip) - very important I am thinking between: open-uri Net::HTTP curb but you can also come with other suggestions. P.S. To parse the response, I am using a pull parser from Nokogiri, so I don't need an integrated solution like rest-client or hpricot.

    Read the article

  • Data Mining project ideas?

    - by Andriyev
    Hi I am looking for project ideas in the field of data mining. I expect to complete it in a quarter and intend to use C++, Linux as the environment. The course I'm taking aims to build the basics of data mining and covers topics like Classification, Regression-Modeling, Clustering and Association learning. Please point me to some good ideas which I can chew on. cheers

    Read the article

  • Best practice when using WebMethods and session

    - by Abdel Olakara
    Hi all, I want to reduce postback in one of my application page and use ajax instead. I used the WebMethod to do so.. I have a static WebMethod that needs to access the session variables and modify. and on the client side, i am calling this method using jQuery. I tried accessing the session as follows: [WebMethod] public static void TestWebMethod() { if (HttpContext.Current.Session["pitems"] != null) { log.Debug("Using the existing list"); Product prod = (Product)HttpContext.Current.Session["pitems"]; List<Configs> confs = cart.GetConfigs(); foreach (Configs citem in confis) { log.Info(citem.Description); } } log.Info("Inside the method!"); } The values are displayed correctly and seems to work.. but i would like to know if this practice is allowed as the method is a static methods and would like to know how it will behave if multiple people access the application. I would also like to know how developers do these kind of tasks in ASP if this is not the right method. Thanks in advance for your suggestions and ideas, Abdel Olakara

    Read the article

  • passing uiimageview as a parameter in NStimer selector??

    - by hemant
    i created a function onTimer passing it a uiimageview parameter...but when i call this function in a NStimer call as shown below i get a syntax error?? is there any other way around it?? [NSTimer scheduledTimerWithTimeInterval:0.05 target:self selector:@selector(onTimer:image) userInfo:nil repeats:YES];

    Read the article

  • Converting a bash script to python (small script)

    - by Mestika
    Hi, I’ve a bash script I’ve been using for a Linux environment but now I have to use it on a Windows platform and want to convert the bash script to a python script which I can run. The bash script is rather simple (I think) and I’ve tried to convert it by google by way around but can’t convert it successfully. The bash script looks like this: runs=5 queries=50 outfile=outputfile.txt date >> $outfile echo -e "\n---------------------------------" echo -e "\n----------- Normal --------------" echo -e "\n---------------------------------" echo -e "\n----------- Normal --------------" >> $outfile for ((r = 1; r < ($runs + 1); r++)) do echo -e "Run $r of $runs\n" db2 FLUSH PACKAGE CACHE DYNAMIC python reads.py -r1 -pquery1.sql -q$queries -shotelspec -k6 -a5 >> $outfile done The main command, the python read.py … etc. is another python file I’ve been given and have the arguments as you see. I know it is a lot to ask for, but it would really help me out if someone could convert this to a python script I can use or at least give me some hints and directions. Sincerely Mestika

    Read the article

  • jqGrid visibility issues

    - by CoffeeCode
    jqGrid and IE8 are not making friends... ( the jqgrid is invisible in the IE, sometime when the mouse is over it, it appears, but still after sec it disappears. in FF, Chrome, Opera it works fine. is there a good explanation for this??

    Read the article

  • Nested loops break out unexpectedly

    - by Metju
    Hi guys, I'm trying to create a sudoku game, for those that do not know what it is. You have a 9x9 box that needs to be filled with numbers from 1-9, every number must be unique in its row and column, and also in the 3x3 box it is found. I ended up doing loads of looping within a 2 dimensional array. But at some point it just stops, with no exceptions whatsoever, just breaks out and nothing happens, and it's not always at the same position, but always goes past half way. I was expecting a stack overflow exception at least. Here's my code: public class Engine { public int[,] Create() { int[,] outer = new int[9, 9]; for (int i = 0; i < 9; i++) { for (int j = 0; j < 9; j++) { outer[i, j] = GetRandom(GetUsed(outer, i, j)); } } return outer; } List<int> GetUsed(int[,] arr, int x, int y) { List<int> usedNums = new List<int>(); for (int i = 0; i < 9; i++) { if (arr[x, i] != 0 && i != y) { if(!usedNums.Contains(arr[x, i])) usedNums.Add(arr[x, i]); } } for (int i = 0; i < 9; i++) { if (arr[i, y] != 0 && i != x) { if (!usedNums.Contains(arr[i, y])) usedNums.Add(arr[i, y]); } } int x2 = 9 - (x + 1); int y2 = 9 - (y + 1); if (x2 <= 3) x2 = 2; else if (x2 > 3 && x2 <= 6) x2 = 5; else x2 = 8; if (y2 <= 3) y2 = 2; else if (y2 > 3 && y2 <= 6) y2 = 5; else y2 = 8; for (int i = x2 - 2; i < x2; i++) { for (int j = y2 - 2; j < y2; j++) { if (arr[i, j] != 0 && i != x && j != y) { if (!usedNums.Contains(arr[i, j])) usedNums.Add(arr[i, j]); } } } return usedNums; } int GetRandom(List<int> numbers) { Random r; int newNum; do { r = new Random(); newNum = r.Next(1, 10); } while (numbers.Contains(newNum)); return newNum; } }

    Read the article

  • please help me to choose good books on algorithms [closed]

    - by davit-datuashvili
    Possible Duplicate: What is the best book for learning about Algorithms? i want to help me to choose good books on algorithms many people from this site say me that show me your code and now i ask u to help me to choose good books on algorithms please i have not books on algorithms and in case i decide to buy it of course must buy book which has high quality yes? so please any ideas ?links everything

    Read the article

  • Non RBAC User Roles and Permissions System: checking the user's City

    - by micha12
    We are currently designing a User Roles and Permissions System in our web application (ASP.NET), and it seems that we have several cases that do no fit within the classical Role-Based Access Control (RBAC). I will post several questions, each devoted to a particular case, this being the first post. We have the following case: not to allow a user view a certain page if the user lives in a particular city. This is a simple case that is coded in the following way: if (User.City == “Moscow”) // Allow the user to view the page. else // Do not allow the user to view this page. Though this case is very simple and straightforward, it has nothing to do with the RBAC. On StackOverflow, someone called this an Attribute-based Access Control. Under the classical RBAC, it seems that this case should be designed like this: introduce a permission “City where the person lives”, this permission will have a property City. Then create a role, add a permission of type “City = Moscow” to it and the assign the role to the user. Looks extremely cumbersome. The question is whether it is acceptable to introduce such non-RBAC approaches to our permissions system – does that break the design or not? This might seem a primitive question, but we found that most applications use pure RBAC, and we started to think that we might be doing something wrong. Thank you.

    Read the article

  • how to connect j2me application with gtalk

    - by Rishabh
    Hi, I have created a login page on mobile. after login with google username and password, i want connect it with g-talk. I need to see my all gtalk contacts on mobile application. How I authenticate and get contacts here, Is there any web service url for user authentication ? Please help me!

    Read the article

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