Search Results

Search found 17249 results on 690 pages for 'resource management'.

Page 76/690 | < Previous Page | 72 73 74 75 76 77 78 79 80 81 82 83  | Next Page >

  • REST Rails 2 nested routes without resource names?

    - by mrbrdo
    I'm using Rails 2. I have resources nested like this: - university_categories - universities - studies - professors - comments I wish to use RESTful routes, but I don't want all that clutter in my URL. For example instead of: /universities/:university_id/studies/:study_id/professors/:professor_id I want: /professors/:university_id/:study_id/:professor_id (I don't map professors seperately so there shouldn't be a confusion between this and /professors/:professor_id since that route shouldn't exist). Again, I want to use RESTful resources/routes... Also note, I am using slugs instead of IDs. Slugs for studies are NOT unique, while other are. Also, there are no many-to-many relationships (so if I know the slug of a professor, which is unique, I also know which study and university and category it belongs to, however I still wish this information to be in the URI if possible for SEO, and also it is necessary when adding a new professor). I do however want to use shallow nesting for "administrator" URIs like edit, destroy (note the problem here with Study since it's slug is not unique, though)... I would also like some tips on how to use the url helpers so that I don't have too much to fix if I change the routes in the future... Thank you.

    Read the article

  • Figuring out the resource a lock in SQL Server 2000 affects

    - by Michael Lang
    I am adding a simple web-interface to show data from a commercial off the shelf (COTS) application. This COTS issues locks on any record the user is actively looking at (whether they intend to edit and update it or not). I have found sp_lock and the Microsoft sp_lock2 scripts and can see the locks, so that's all well and good. However, I cannot figure out how I can tell if a specific record I am about to update has been affected by one of these locks. If I submit the update request and there is in fact a lock, the web-interface will wait indefinitely until the user closes the window in the COTS. How can I either: a) determine before issuing an update that the record has been locked OR b) issue an update that will immediately return with a LOCKED status rather than indefinitely waiting on the COTS user to close their window on that record?

    Read the article

  • Tree structured resource Authorization

    - by user323883
    I have portfolio table with portoflio_id and parent_portfolio_id and I have user table now some users may have access to all portfolios, or selective portfolios or depending on group, everything under a portfolio tree. can someone suggest a good schema or any existing framework

    Read the article

  • Buisness Rule and Process Management?

    - by elgcom
    After some searching in google and wikipedia, I still can not get a clear image about the "difference" between BRMS (Business Rule Management System) and BPM (Business process management)/workflow system. can those two concepts do the same thing from each other? (theoretically) A "rule" can be modeled as a "process" as well. isn't it?

    Read the article

  • MySQL get content from web page (or other network resource)

    - by Rescommunes
    Is it possible to open a curl like object in MySQL? What I would like to do is create procedure which would check to see if a certain value is returned from a specific URL like http://example.com/inschedule?id=200&time=20m. The returned result would be a simple string like 1 or 0. I know it is better to have a script do this by putting a entry into a table etc. However, it would be much less complex for me to be able to do it this way. Thanks

    Read the article

  • OpenERP model tracking external resource, hooking into parent's copy() or copy_data()

    - by CB.
    I have added a new model (call it crm_lead_external) that is linked via a new one2many on crm_lead. Thus, my module has two models defined: an updated crm_lead (with _name=crm_lead) and a new crm_lead_external. This external model tracks a file and as such has a 'filename' field. I also created a unique SQL index on this filename field. This is part of my module: def copy(self, cr, uid, id, default=None, context=None): if not default: default = {} default.update({ 'state': 'new', 'filename': '', }) ret = super(crm_lead_external, self).copy(cr, uid, id, default, context=context) #do file copy return ret The intent here is to allow an external entity to be duplicated, but to retarget the file path. Now, if I click duplicate on the Lead, I get an IntegrityError on my unique constraint. Is there a particular reason why copy() isn't being called? Should I add this logic to copy_data()? Myst I really override copy() for the lead? Thanks in advance.

    Read the article

  • Servlets: forwarding to a resource in a different webapp

    - by skaffman
    I'm trying to construct a java web app along modular principles, with some common resources (JSPs, mainly) in one WAR, and some custom resources in another. This means JSPs scattered across different WARs. Now JavaEE frowns upon this sort of shenanigans, and wants you to put everything in one place. My current workaround to this is to have an Eclipse-triggered Ant script which copies the content of one WAR into the other, but this is not a pleasant solution (it's fragile and too IDE-dependent). Ideally, what I'd like to be able to do is for a servlet to forward to a JSP located in a different WAR to one in which it is itself deployed. This would allow greater freedom in how I assemble my WARs. However, the RequestDispatcher does not seem to support such things. Another possibility is to use <c:import>, which does allow resources to be imported from a different WAR (with some caveats). This would probably allow me to have a "hook" JSP in one WAR, which then drags in the required JSP from another. This is a bit clunky, though, and the fact that <c:import> permits it shows that the underlying servlet API does also. But how do I access that functionality via the RequestDispatcher in a servlet?

    Read the article

  • Referencing java resource files for cold fusion

    - by Chimeara
    I am using a .Jar file containing a .properties file in my CF code, however it seems unable to find the .properties file when run from CF. My java code is: String key =""; String value =""; try { File file = new File("src/test.properties"); FileInputStream fileInput = new FileInputStream(file); Properties properties = new Properties(); properties.load(fileInput); fileInput.close(); Enumeration enuKeys = properties.keys(); while (enuKeys.hasMoreElements()) { key = (String) enuKeys.nextElement(); value = properties.getProperty(key); //System.out.println(key + ": " + value); } } catch (FileNotFoundException e) { e.printStackTrace(); key ="error"; } catch (IOException e) { e.printStackTrace(); key ="error"; } return(key + ": " + value); I have my test.properties file in the project src folder, and make sure it is selected when compiling, when run from eclipse it gives the expected key and value, however when run from CF I get the caught errors. My CF code is simply: propTest = CreateObject("java","package.class"); testResults = propTest.main2(); Is there a special way to reference the .properties file so CF can access it, or do I need to include the file outside the .jar somewhere?

    Read the article

  • JSON-P and a GET resource?

    - by user246114
    Hi, If a website operating on a domain other than my own supports get requests, like: http://api.someothersite.com/v1/farms There's no way for me to access it using JSON-P right, they would have to have support for it as a query parameter? Something like: http://api.someothersite.com/v1/farms?callback=fantastic I mean, there's no way for me to use it without them explicitly supporting it, right? Thanks

    Read the article

  • Android: Referring to a string resource when defining a log name

    - by spookypeanut
    In my Android app, I want to use a single variable for the log name in multiple files. At the moment, I'm specifying it separately in each file, e.g. public final String LOG_NAME = "LogName"; Log.d(LOG_NAME, "Logged output); I've tried this: public final String LOG_NAME = (String) getText(R.string.app_name_nospaces); And while this works in generally most of my files, Eclipse complains about one of them: The method getText(int) is undefined for the type DatabaseManager I've made sure I'm definitely importing android.content.Context in that file. If I tell it exactly where to find getText: Multiple markers at this line - Cannot make a static reference to the non-static method getText(int) from the type Context - The method getText(int) is undefined for the type DatabaseManager I'm sure I've committed a glaringly obvious n00b error, but I just can't see it! Thanks for all help: if any other code snippets would help, let me know.

    Read the article

  • Looking for a good course/book/resource on modern databases

    - by spanky
    This is slightly embarrassing. I'm a professional developer working at one of the big tech companies and I've never used a database. I've got an idea for a website I want to build as a learning experience and possibly as a business, but I don't have the faintest idea what database to use, let alone how to fix/debug the database when I run into problems. I'm looking for a course, a website, a book, etc., that will give me an overview of modern database technology (SQL vs. NOSQL vs. relational vs. non-relational (I only have a vague idea what these even mean)). I'm starting by googling/wikipediaing all of these terms, but if there are better, comprehensive resources available that I should be aware of, I'd love to hear about them.

    Read the article

  • What is a good metaphor for c memory management?

    - by fsmc
    I'm trying to find a good metaphor to explain memory allocation, initialization and freeing in c to a non technical audience. I've heard pass-by-reference/value talked about quite well with postal service usage, but not so much for allocation/deallocation. So for I've thought about using the idea of renting a space might work, but I wonder if the SO crew can provide something better.

    Read the article

  • Include HTML file as embedded resource

    - by Stacey
    A followup to another question I did, I've done some more digging but I am still coming up dry. Is there any way to include .HTML/.ASPX files as 'embedded resources' into an ASP.NET MVC application? I've found lots of examples of using string resources, but never other files entirely.

    Read the article

  • mysql_num_rows(): supplied argument is not a valid MySQL result resource

    - by php-b-grader
    I am getting this error when I pass an invalid SQL string... I spent the last hour trying to find the problem assuming - It's not my SQL it must be the db handle... ANyway, I've now figured out that it was bad SQL... What I want to do is test the result of the mysql_query() for a valid resultset. I am simply using empty($result)... Is this the most effective test? Is there a more widely accepted method of testing a resultset for a valid result?

    Read the article

  • vs2008 resource editor changes rc file language

    - by user346134
    Hi all, I am doing some improvements to an application in vs2008 in c++. When i try to edit resources (for example add an entry in the string table), the vs2008 editor changes the rc file language from LANG_ENGLISH to LANG_NEUTRAL and a non english text is replaced with question marks. If i edit the rc file externally (in notepad), and then load it to the vs2008 it works fine. can anybody help me solve this? thanks Shimon

    Read the article

  • Generic DRM (Distributed resource management) wrapper

    - by Pavel Bernshtam
    I need to write a software, which launches DRM jobs in a customer environment and monitors those jobs status. It should work with various customer environments and DRMs - like LSF, Sun Grid and others. Can you recommend some 3rd party library, which hides DRM differences from me and has API like "launch job", "get list of jobs", "get job status" etc. ? Both Java and native libraries are good for me.

    Read the article

  • best practice for Jquery plugin implementation and resource locations

    - by ptutt
    This is probably a very basic question, but I seem to have issues plugging in jquery plug-ins. The issue seems to be around the location of the script, css and images and ensuring the css has the correct url to the images. The standard plug-in has the following folder structure (eg : JPicker) js css images My project is asp.net mvc so I have the default: scripts images content So, I try to split the jquery plugin to the appropriate folders (not sure if this is the best way?). Then I try to correct the references to images (background urls) in the css. I believe the url is relative to the page that is implementing the css file, not the location of the css file itself. Anyway, when I try the above, the plugins don't seem to work. I believe the issue lies with the images not being found. The jquery code runs without errors, so I assume that's not the problem. Any help/advice much appreciated

    Read the article

  • Controller path for nested resource - undefined method `<controller>_path'

    - by owilde1900
    I'm having trouble displaying my form at /users/2/friends/new. I'm receiving undefined method `friends_path' for #<#<Class:0x21f0c14>:0x21ef364> Here is the beginning of the form <% form_for(@friend) do |f| %> And the friends controller def new @user = User.find(params[:user_id]) @friend = @user.friends.build end This is the route resources :users do resources :friends end And the relevant path from "rake routes" users/:user_id/friends/new(.:format) {:controller=>"friends", :action=>"new"} Any help or insight is greatly appreciated. This is my first rails 3 app.

    Read the article

  • Problem with mysql_query() ;Says resource expected .

    - by user364651
    I have this php file. The lines marked as bold are showing up the error :"mysql_query() expecets parameter 2 to be a resources. Well, the similar syntax on the line on which I have commented 'No error??' is working just fine. function checkAnswer($answerEntered,$quesId) { //This functions checks whether answer to question having ques_id = $quesId is satisfied by $answerEntered or not $sql2="SELECT keywords FROM quiz1 WHERE ques_id=$quesId"; **$result2=mysql_query($sql2,$conn);** $keywords=explode(mysql_result($result2,0)); $matches=false; foreach($keywords as $currentKeyword) { if(strcasecmp($currentKeyword,$answerEntered)==0) { $matches=true; } } return $matches; } $sql="SELECT answers FROM user_info WHERE user_id = $_SESSION[user_id]"; $result=mysql_query($sql,$conn); // No error?? $answerText=mysql_result($result,0); //Retrieve answers entered by the user $answerText=str_replace('<','',$answerText); $answerText=str_replace('>',',',$answerText); $answerText=substr($answerText,0,(strlen($answerText)-1)); $answers=explode(",",$answerText); //Get the questions that have been assigned to the user. $sql1="SELECT questions FROM user_info WHERE user_id = $_SESSION[user_id]"; **$result1=mysql_query($sql1,$conn);** $quesIdList=mysql_result($result1,0); $quesIdList=substr($quesIdList,0,(strlen($quesIdList)-1)); $quesIdArray=explode(",",$quesIdList); $reportCard=""; $i=0; foreach($quesIdArray as $currentQuesId) { $answerEnteredByUser=$answers[$i]; if(checkAnswer($answerEnteredByUser,$currentQuesId)) { $reportCard=$reportCard+"1"; } else { $reportCard=$reportCard+"0"; } $i++; } echo $reportCard; ?> Here is the file connect.php. It is working just fine for other PHP documents. <?php $conn= mysql_connect("localhost","root","password"); mysql_select_db("quiz",$conn); ?>

    Read the article

  • Resource id #45 [on hold]

    - by user2916506
    What is this error? I am trying to connect from PHP to Traffic Live mysql and do a POST and at some id's I get this error. With the biggest part of contacts my code works just fine but it keeps getting this trouble maker. What can I do? Here is the trouble making code:if ($sales_datemodified[$h] $traffic_datemodified[$t]) { //if ($traffic_id[$t] != 22033) { $postrequestclient = $clients - post("staff/employee", null, '{"@class": "com.sohnar.trafficlite.transfer.trafficcompany.TrafficEmployeeTO", "id": ' . $traffic_id[$t] . ',"locationId":' . $traffic_locationid[$t] . ', "departmentId": ' . $traffic_departmentid[$t] . ', "ownerCompanyId": ' . $traffic_ownercompanyid[$t] . ',"userId": ' . $traffic_userid[$t] . ',"userName": "' . $traffic_username[$t] . '","employeeDetails": {"id": ' . $traffic_id[$t] . ',"jobTitle": "' . $sales_title[$h] . '","costPerHour": { "amountString": ' . $traffic_amountString[$t] . ', "currencyType": "' . $traffic_currencyType[$t] . '"},"hoursWorkedPerDayMinutes": ' . $traffic_hwpdm[$t] . ', "personalDetails": {"id": ' . $traffic_persdetId[$t] . ', "firstName": "' . $sales_firstname[$h] . '","middleName": "' . $traffic_middleName[$t] . '","lastName": "' . $sales_lastname[$h] . '", "emailAddress": "' . $traffic_username[$t] . '","workPhone": "' . $sales_phone[$h] . '","mobilePhone": "' . $sales_mobilephone[$h] . '" }}}') - setAuth(user, password); $postresponseclient = $postrequestclient - send() - json(); I don't have any errors in my code. That commented "if" is for excluding the trouble making contact on which I get this error. If I uncomment that the program runs fine without any problems. The problem is that this test is made on a small number of contacts and if I add more contacts to the test I get more errors of this kind. this should be a synchronization job so excluding all the "bad" contacts won't work

    Read the article

  • I'd like to rebuild my web server without web management software; what knowledge, skills, and tools will I require? [closed]

    - by Joe Zeng
    I've been using Webmin for my web server that runs my personal website and a host of other websites for a while now, and I feel like I should be able to manage my web server more directly, because I haven't even touched the Webmin for the past year or so and I feel like maybe it has too much functionality that I have to click through the next time I want to access it or create a new subdomain or database on my site. I want to try something lighter and more wholly manageable, now that I'm more comfortable with using ssh and command-line tools. I've decided that I'm going to try using Django as a framework, but obviously that's only part of the picture. What sort of knowledge will I require?

    Read the article

< Previous Page | 72 73 74 75 76 77 78 79 80 81 82 83  | Next Page >