Search Results

Search found 19093 results on 764 pages for 'max path'.

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

  • Select *, max(date) works in phpMyAdmin but not in my code

    - by kdobrev
    OK, my statement executes well in phpMyAdmin, but not how I expect it in my php page. This is my statement: SELECT egid , group_name , limit , MAX( date ) FROM employee_groups GROUP BY egid ORDER BY egid DESC ; This is may table: CREATE TABLE employee_groups ( egid int(10) unsigned NOT NULL, date date NOT NULL, group_name varchar(50) NOT NULL, limit smallint(5) unsigned NOT NULL, PRIMARY KEY (egid,date) ) ENGINE=MyISAM DEFAULT CHARSET=cp1251; I want to extract the most recent list of groups, e.g. if a group has been changed I want to have only the last change. And I need it as a list (all groups).

    Read the article

  • $_SERVER['DOCUMENT_ROOT'] path not working

    - by aeonsleo
    I am using document root to provide absolute path which is not working. if i echo this path it turns out to be C:wamp/www/proman/header.php. I i give relative path it works fine what is the problem here? $path = $_SERVER['DOCUMENT_ROOT']."proman/header.php";

    Read the article

  • How to get max row from table

    - by Odette
    HI I have the following code and a massive problem: WITH CALC1 AS ( SELECT OTQUOT, OTIT01 AS ITEMS, ROUND(OQCQ01 * OVRC01,2) AS COST FROM @[email protected] WHERE OTIT01 <> '' UNION ALL SELECT OTQUOT, OTIT02 AS ITEMS, ROUND(OQCQ02 * OVRC02,2) AS COST FROM @[email protected] WHERE OTIT02 <> '' UNION ALL SELECT OTQUOT, OTIT03 AS ITEMS, ROUND(OQCQ03 * OVRC03,2) AS COST FROM @[email protected] WHERE OTIT03 <> '' UNION ALL SELECT OTQUOT, OTIT04 AS ITEMS, ROUND(OQCQ04 * OVRC04,2) AS COST FROM @[email protected] WHERE OTIT04 <> '' UNION ALL SELECT OTQUOT, OTIT05 AS ITEMS, ROUND(OQCQ05 * OVRC05,2) AS COST FROM @[email protected] WHERE OTIT05 <> '' ORDER BY OTQUOT ASC ) SELECT OTQUOT, ITEMS, MAX(COST) FROM CALC1 WHERE OTQUOT = '04886471' GROUP BY OTQUOT, ITEMS result: 04886471 FEPO5050WCGA24 13.21 04886471 GFRK1650SGL 36.21 04886471 FRA7500GA 12.6 04886471 CGIFESHAZ 11.02 04886471 CGIFESHPDPR 11.79 04886471 GFRK1350DBL 68.23 04886471 RET1.63825GP 32.55 04886471 FRSA 0.12 04886471 GFRK1350SGL 55.94 04886471 GFRK1650DBL 71.89 04886471 FEPO6565WCGA24 16.6 04886471 PCAP5050GA 0.28 04886471 FEPO6565NCPAG24 0.000000 How can I get the result of the row with the Itemcode that has the highest value? In this case I need the result: 04886471 GFRK1650DBL 71.89 but i dont know how to change my code to get that - can anybody please help me?

    Read the article

  • greengeeks drupal install imagemagik 'path /usr/bin/convert' does not exists error

    - by letapjar
    I just signed up with greengeeks. I have a drupal install (6.19) on my public_html directory. The ImageMagic Toolkit can't find the binary - the error I get is "the path /usr/bin/convert" does not exist. when I use a terminal and do 'which convert' it shows /usr/bin/convert also, I have a second drupal install in an addon domain - it's home directory is above the public_html directory (in a directory called '/home/myusername/addons/seconddomain') The drupal install in the addon domain finds the imagemagick binary just fine. I am at a total loss as to why the original install cannot find the binary. The tech support guys at greengeeks have no clue either. Any ideas of things to try?

    Read the article

  • How to specify or add directory to Python.h search path during setup.py build/install

    - by ca2longoria
    I'm running Linux, and have downloaded a python module I must install without access to any but my particular /home/user directory (I have no root privileges nor the option to pursue them). This of course requires the Python source. This I've downloaded and have laying around in said user directory. While asking the admin to copy the proper files into /usr/include/python2.7 is the easiest way to go about this, I am hoping for a more general and portable solution to this kind of problem. Changing only data in the module source (MANIFEST.in, README.txt, setup.py, etc.), how might I add an arbitrary directory to the search path for Python.h and friends? (Without a solution, "python setup.py build" will continue returning with the "Python.h: No such file or directory" error) Thank you very much. (Additionally, is it acceptable to post this both here and on StackOverflow?)

    Read the article

  • Why can't I use %USERPROFILE% in %PATH%?

    - by Zano
    On my Windows 7 machine, using the System Properties Environment Variables tool, I try to add %USERPROFILE%\Bin to the system variable PATH. For some reason, that doesn't work, even though %SystemRoot%\system32 works fine. When I try to run commands from the console, files in my Bin folder are not found, even though files in the System32 folder are found. The only difference between UserProfile and SystemRoot that I can see is that the former is a user variable while the latter is a system variable. I i write echo %USERPROFILE%\Bin it yields c:\Users\zano, and if I add c:\Users\zano\Bin explicitly, everything work fine. What's the problem here?

    Read the article

  • ASP.NET MVC - Find Absolute Path to the App_Data folder from Controller

    - by tyndall
    What is the correct way to find the absolute path to the App_Data folder from a Controller in an ASP.NET MVC project? I'd like to be able to temporarily work with an .xml file and I don't want to hardcode the path. This does not work: [HandleError] public class HomeController : Controller { public ActionResult Index() { string path = VirtualPathUtility.ToAbsolute("~/App_Data/somedata.xml"); //.... do whatever return View(); } } I think outside of the web context VirtualPathUtility.ToAbsolute() doesn't work. string path comes back as "C:\App_Data\somedata.xml" Where should I determine the path of the .xml file in an MVC app? global.asax and stick it an application-level variable?

    Read the article

  • WPF, convert Path.DataProperty to Segment objects

    - by user275587
    I was wondering if there was a tool to convert a path data like "M 0 0 l 10 10" to it's equivalent line/curve segment code. Currently I'm using: string pathXaml = "<Path xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\" xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" Data=\"M 0 0 l 10 10\"/>"; Path path = (Path)System.Windows.Markup.XamlReader.Load(pathXaml); It appears to me that calling XamlParser is much slower than explicitly creating the line segments. However converting a lot of paths by hand is very tedious.

    Read the article

  • How to determine where on a path my object will be at a given point in time?

    - by Dave
    I have map and an obj that is meant to move from start to end in X amount of time. The movements are all straight lines, as curves are beyond my ability at the moment. So I am trying to get the object to move from these points, but along the way there are way points which keep it on a given path. The speed of the object is determined by how long it will take to get from start to end (based on X). This is what i have so far: //get_now() returns seconds since epoch var timepassed = get_now() - myObj[id].start; //seconds since epoch for departure var timeleft = myObj[id].end - get_now(); //seconds since epoch for arrival var journey_time = 60; //this means 60 minutes total journey time var array = [[650,250]]; //way points along the straight paths if(step == 0 || step =< array.length){ var destinationx = array[step][0]; var destinationy = array[step][1]; }else if( step == array.length){ var destinationx = 250; var destinationy = 100; } else { var destinationx = myObj[id].startx; var destinationy = myObj[id].starty; } step++; When the user logs in at any given time, the object needs to be drawn in the correct place of the path, almost as if its been travelling along the path whilst the user has not been at the PC with the available information i have above. How do I do this? Note: The camera angle in the game is a birds eye view so its a straight forward X:Y rather than isometric angles.

    Read the article

  • Ant path/pathelement not expanding properties correctly

    - by Jonas Byström
    My property gwt.sdk expands just fine everywhere else, but not inside a path/pathelement: <target name="setup.gwtenv"> <property environment="env"/> <condition property="gwt.sdk" value="${env.GWT_SDK}"> <isset property="env.GWT_SDK" /> </condition> <property name="gwt.sdk" value="/usr/local/gwt" /> <!-- Default value. --> </target> <path id="project.class.path"> <pathelement location="${gwt.sdk}/gwt-user.jar"/> </path> <target name="libs" depends="setup.gwtenv" description="Copy libs to WEB-INF/lib"> </target> <target name="javac" depends="libs" description="Compile java source"> <javac srcdir="src" includes="**" encoding="utf-8" destdir="war/WEB-INF/classes" source="1.5" target="1.5" nowarn="true" debug="true" debuglevel="lines,vars,source"> <classpath refid="project.class.path"/> </javac> </target> For instance, placing an echo of ${gwt.sdk} just above works, but not inside "project.class.path". Is it a bug, or do I have to do something that I'm not? Edit: I tried moving the property out from target setup.gwtenv into "global space", that helped circumvent the problem.

    Read the article

  • Eclipse cannot find existing project in build path

    - by PNS
    Here is probably one of the idiosyncrasies of Eclipse and its handling of build paths, which cannot be fixed despite all sorts of workarounds tested so far. The issue relates to a workspace of several projects, each of which compiles into its own JAR. Dependencies among the projects are resolved by adding the relevant ones to the build path (no Maven or other external tool or plugin is used), via Project -> Properties -> Java Build Path -> Projects Among all these projects, a couple (say, com.example.p1 and com.example.p2) refuse to recognize a third (and simple) one (say, com.example.p3), while all other projects do. So, although P3 is added to the build path, all related classes from P3 are imported properly and the source code of each such class is accessible by hitting F3, Eclipse keeps complaining that The import com.example.p3 cannot be resolved and SomeClass cannot be resolved to a type where com.example.p3.SomeClass is one of the P3 classes. If instead of the P3 project I put its compiled JAR in the build path, the issue disappears. However, code in P3 changes frequently and it is a time waste to keep compiling and refreshing the workspace so that the change is picked up, not to mention that this should not happen in an IDE anyway (and it does not for the other projects using P3). Among the workarounds tried are things like: Removing and adding again P1, P2, P3 Cleaning up and recompiling everything Checking whether any other project loads the P3 JAR Putting P3 at the top of the Eclipse build path "Order and Export" list Using the "Fix project setup" suggestion of Eclipse (available when hovering the mouse over the red-underlined-error compilation line). Actually, this option offers adding to the build path either P3 or its JAR, but if P3 is added, the issue reappears. Any ideas?

    Read the article

  • Finding a Relative Path in .NET

    - by Rick Strahl
    Here’s a nice and simple path utility that I’ve needed in a number of applications: I need to find a relative path based on a base path. So if I’m working in a folder called c:\temp\templates\ and I want to find a relative path for c:\temp\templates\subdir\test.txt I want to receive back subdir\test.txt. Or if I pass c:\ I want to get back ..\..\ – in other words always return a non-hardcoded path based on some other known directory. I’ve had a routine in my library that does this via some lengthy string parsing routines, but ran into some Uri processing today that made me realize that this code could be greatly simplified by using the System.Uri class instead. Here’s the simple static method: /// <summary> /// Returns a relative path string from a full path based on a base path /// provided. /// </summary> /// <param name="fullPath">The path to convert. Can be either a file or a directory</param> /// <param name="basePath">The base path on which relative processing is based. Should be a directory.</param> /// <returns> /// String of the relative path. /// /// Examples of returned values: /// test.txt, ..\test.txt, ..\..\..\test.txt, ., .., subdir\test.txt /// </returns> public static string GetRelativePath(string fullPath, string basePath ) { // ForceBasePath to a path if (!basePath.EndsWith("\\")) basePath += "\\"; Uri baseUri = new Uri(basePath); Uri fullUri = new Uri(fullPath); Uri relativeUri = baseUri.MakeRelativeUri(fullUri); // Uri's use forward slashes so convert back to backward slashes return relativeUri.ToString().Replace("/", "\\"); } You can then call it like this: string relPath = FileUtils.GetRelativePath("c:\temp\templates","c:\temp\templates\subdir\test.txt") It’s not exactly rocket science but it’s useful in many scenarios where you’re working with files based on an application base directory. Right now I’m working on a templating solution (using the Razor Engine) where templates live in a base directory and are supplied as relative paths to that base directory. Resolving these relative paths both ways is important in order to properly check for existance of files and their change status in this case. Not the kind of thing you use every day, but useful to remember.© Rick Strahl, West Wind Technologies, 2005-2010Posted in .NET  CSharp  

    Read the article

  • Changing $PATH doesn't work?

    - by Ashwini Chaudhary
    I was trying to set PATH in etc/environment file, but after adding the desired path the $PATH is showing an error in terminal: bash: /usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games: No such file or directory Here's the content of environment file: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/monty/google_appengine" I was trying to add the path to the folder google_appengine to the PATH as mentioned in this Answer, but it doesn't seem to work.

    Read the article

  • Reasons for sticking with TEXT, NTEXT and IMAGE instead of (N)VARCHAR(max) and VARBINARY(max)

    - by John Assymptoth
    TEXT, NTEXT and IMAGE have been deprecated a long time ago and will, eventually, be removed from SQL Server. However, they are not going to be discontinued right away, not even in the next version of SQL Server, so it's not convenient for my enterprise to transform thousands of columns right away, even if it is using SQL Server 2012. What arguments can I use to postpone this migration? I know there are some advantages in using the new types. But I'm strictly looking for reasons not to migrate my data that is already functioning pretty well in the old types.

    Read the article

  • Using recursion to to trim a binary tree based on a given min and max value

    - by Justin
    As the title says, I have to trim a binary tree based on a given min and max value. Each node stores a value, and a left/right node. I may define private helper methods to solve this problem, but otherwise I may not call any other methods of the class nor create any data structures such as arrays, lists, etc. An example would look like this: overallRoot _____[50]____________________ / \ __________[38] _______________[90] / \ / _[14] [42] [54]_____ / \ \ [8] [20] [72] \ / \ [26] [61] [83] trim(52, 65); should return: overallRoot [54] \ [61] My attempted solution has three methods: public void trim(int min, int max) { rootFinder(overallRoot, min, max); } First recursive method finds the new root perfectly. private void rootFinder(IntTreeNode node, int min, int max) { if (node == null) return; if (overallRoot.data < min) { node = overallRoot = node.right; rootFinder(node, min, max); } else if (overallRoot.data > max) { node = overallRoot = node.left; rootFinder(node, min, max); } else cutter(overallRoot, min, max); } This second method should eliminate any further nodes not within the min/max, but it doesn't work as I would hope. private void cutter(IntTreeNode node, int min, int max) { if (node == null) return; if (node.data <= min) { node.left = null; } if (node.data >= max) { node.right = null; } if (node.data < min) { node = node.right; } if (node.data > max) { node = node.left; } cutter(node.left, min, max); cutter(node.right, min, max); } This returns: overallRoot [54]_____ \ [72] / [61] Any help is appreciated. Feel free to ask for further explanation as needed.

    Read the article

  • WPF: How to autosize Path to its container?

    - by 742
    I have a Path that must resize to its StackPanel container. <StackPanel x:Name="TrackSurface"> <Path Fill="AliceBlue" Stroke="Black" StrokeThickness="1" Data="{StaticResource TranslateZ}"> </Path> </StackPanel> I think about using a transformation bound to the container but don't know how to it actually. Can someone give me hint?

    Read the article

  • Max Value of a Multiway Tree in OCaml

    - by Trigork
    I'm an IT Student and kind of a newbie to OCaml Recently, studying for an exam I found this exercise. Given: type 'a tree = Tree of 'a * 'a tree list Define a function mtree : 'a tree -'a, that returns the greatest value of all the nodes in a multiway tree, following the usual order relation in OCaml (<=) I've come to do something like this below, which, of course, is not working. let rec mtree (Tree (r, sub)) = let max_node (Tree(a, l1)) (Tree(b, l2)) = if a >= b then (Tree(a, l1)) else (Tree(b, l2)) in List.fold_left max_node r sub;; After reading an answer to this I'm posting the fixed code. let rec mtree (Tree(r,sub)) = let max_node (Tree(a, l1)) (Tree(b, l2)) = if a >= b then a else b in List.fold_left (max_node) r (List.map mtree sub);; The idea is the same, fold the list comparing the nodes making use of my local function to do so and travel through the tree by calling the function itself over the nodes lists of the consecutive levels. Is still not working, though. Now complains about max_node in the fold_left part. Error: This expression has type 'a tree -> 'a tree -> 'a but an expression was expected of type 'a tree -> 'a tree -> 'a tree And here I'm definitely lost because I can't see why does it expects to return an 'a tree

    Read the article

  • Nunit Relative Path failing

    - by levi.siebens
    I'm having an issue with Nunit where I cannot find an image file when I run my tests and each time it looks for images it looks in the Nunit folder instead of looking inside the folder where the binary resides. Below is a detailed description of what's happening. I'm building a binary that is under test which contains the definition for some game elements and png files which will define the sprites I'm using (for sanity sake call it Binary1) Nunit runs tests from a seperate binary (Binary1Test) executing test methods against the first binary (Binary1). All tests pass, unless the test executes code in Binary1 which then requires Binary1 to use one of the image files (which are defined via a relative path). When the method is called, Nunit throws a file not found exception stating that it cannot find the file and states it's looking inside of the Program Files\Nunit.net 2.0 folder So I have no idea why the code is doing this, and to make matters more confusing when I pull up Enviornment.CurrentDirectory it gives me the correct path (the path to my debug folder) and not the path to nunit. Also if I use this instead of using the relative path, my tests will run without issue. So my question is, does anyone know why in the case of loading relative paths from within my binary that nunit decides to use it's directory instead of the directory where the binary is located and where the images are stored? Thanks.

    Read the article

  • Code coverage (c++ code execution path)

    - by Poni
    Let's say I have this code: int function(bool b) { // execution path 1 int ret = 0; if(b) { // execution path 2 ret = 55; } else { // execution path 3 ret = 120; } return ret; } I need some sort of a mechanism to make sure that the code has gone in any possible path, i.e execution paths 1, 2 & 3 in the code above. I thought about having a global function, vector and a macro. This macro would simply call that function, passing as parameters the source file name and the line of code, and that function would mark that as "checked", by inserting to the vector the info that the macro passed. The problem is that I will not see anything about paths that did not "check". Any idea how do I do this? How to "register" a line of code at compile-time, so in run-time I can see that it didn't "check" yet? I hope I'm clear.

    Read the article

  • Path element of Siverlight issue

    - by George2
    Hello everyone, Suppose I have the following XAML code, my confusions are, (1) I do not know the exact meaning of Data attribute, especially items starts with letter M/C, (2) there is no special configuration for TransformGroup (all using default settings), why put the TransformGroup here? <Path Height="2.75" Width="2.75" Data="M2.75,1.375 C2.75,2.1343915 2.1343915,2.75 1.375,2.75 C0.61560845,2.75 0,2.1343915 0,1.375 C0,0.61560845 0.61560845,0 1.375,0 C2.1343915,0 2.75,0.61560845 2.75,1.375 z" Fill="#FF9F9B9B" Stretch="Fill" Stroke="#FF000000" StrokeThickness="0" Canvas.Top="7" x:Name="p3"> <Path.RenderTransform> <TransformGroup> <ScaleTransform/> <SkewTransform/> <RotateTransform/> <TranslateTransform/> </TransformGroup> </Path.RenderTransform> </Path> thanks in advance, George

    Read the article

  • forslash as the default path separator in windows?

    - by Meitham
    Since windows now accept the forslash "/" as a path separator in addition to its default backslash path separator, so that both c:\windows and c:/windows are valid paths (though the later is invalid in cygwin since backslash is escape char) Is there any chance we could set the forslash as the default path separator on windows (GUI), so that the address bar in windows will automatically use it? I heard its possible in a powershell session but anyone knows if it is also possible in a CMD session? Thanks M

    Read the article

  • How to get Path Separator in Perl?

    - by ram
    In case of Java, we can get the path separator using System.getProperty("path.separator"); Is there a similar way in Perl? All I want to do is to find a dir, immediate sub directory. Say I am being given two argumens $a and $b; I am splitting the first one based on the path separator and joining it again except the last fragment and comparing with the second argument. The problem is my code has to be generic and for that I need to know whats the system dependent path separator is? Could you help if there is any way to get it? TIA

    Read the article

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