Search Results

Search found 7897 results on 316 pages for 'generate'.

Page 213/316 | < Previous Page | 209 210 211 212 213 214 215 216 217 218 219 220  | Next Page >

  • PHP no wait sem_acquire?

    - by SerEnder
    Not a specific code question, but more of a general coding question. I'm trying to use a semaphore in a work project to limit the number of users that can access certain processes at a concurrent time. From my understanding the following: $iKey = ftock($sSomeFileLocation,'sOneCharacterString'); //Generate the key if($sem_id = sem_get($iKey){ //1 user allowed if(sem_acquire($sem_id)){ //Do the limited process here sem_release($sem_id); } } The problem that I see here is that if there is already one user who has the semaphore key, then the next user just waits until the first user is done rather than just faulting out. Anyone know of a way that if the max_acquire number has been reached, sem_acquire (or similar) will just return false? Thanks

    Read the article

  • Facebook email Permission, oath2, doesnt work?

    - by Mathias Eklöf
    since the new Auth Dialog from Facebook (for my App & homepage), I cannot get the dialog to show that my homepage/app needs the users email when connection to my homepage/app. In the Auth-section of my app I've added "email" to the User & Friend Permissions. Also I've added it to the referal when someone clicks the "Login with facebook"-button. When someone clicks the Facebook-button, he/she redirects to a page which has the PHP-code with Facebook SDK PHP (latest). Here's how I generate the send-to-url for the dialog: $login_url = $facebook-getLoginUrl(array('req_perms' = 'email,publish_stream')); header("Location: ".$login_url); But when the Dialog pops up, the only permission request it does is "basic information". I need to request the Email. Am I stupid or is it a bug somehow? I've also recreated the App.

    Read the article

  • Visual Studio 2008 XML Documentation

    - by Pablo
    Hello, I can't seem to find the "Build" option under "Configuration Properties" folder in the Property Pages of my project. I've been looking everywhere trying to figure out how to do it. I followed the direations here: http://msdn.microsoft.com/en-us/magazine/cc302121.aspx More specifically here: http://msdn.microsoft.com/en-us/library/azt1z1eh.aspx ("To build the XML Documentation sample within Visual Studio" section) I want to generate XML comments for my project in the build, but my "Configuration Properties" window does not have "folders" or a "Build" option under it. I'm using Visual Studio Team System 2008, any ideas? EDIT - This is a website [project-less] and it is written in both C# and VB.NET. Do I need to download any tools? I found GhostDoc but that's not helping me very much.

    Read the article

  • Automatic VisualState Manager in Silverlight

    - by Matt
    If you create a simple button and then choose Edit Template - Edit a Copy, Blend will automatically generate a style area, along with all the button states (MouseEnter, MouseLeave, Pressed, etc). No where in the code behind or auto generated style area does it say that on a "MouseOver" event, change the state to "MouseOver", but it still manages to work! Is the only way to change a button's state have to be done the code behind using the VisualStateManager.GoToState method, or can you change it much like CSS does (a:hover) using the VisualStateManager? From my experience, setting just doesn't seem to do the trick.

    Read the article

  • [MySQL, InnoDb] Rating place

    - by Pavel
    I'm trying to generate rating place table using following receipt http://stackoverflow.com/questions/1776821/assign-places-in-the-rating-mysql-php but my database is high loaded. I tried not to create table, but use MEMORY TABLE and update it using following SQL query insert into tops (uid) select uid from users order by exp desc; but got the following MySQL error Deadlock found when trying to get lock; try restarting transaction because there are too many queries until SQL select is being executed. How to solve this problem? P.S. CREATE TABLE tops as SELECT work almost fine except high server load... up to load average: 50 if tops are non-memory table. My table users has near 4.5 millions of rows. Thanks for any advices.

    Read the article

  • Does anyone use AODL in a real application?

    - by HyperQuantum
    We are currently using the Excel interop API in .NET to generate simple spreadsheet documents from a template. So we load the template first, insert some rows, fill in some data (dates, text, and numbers), and make Excel visible so that the user can print or save the document we just generated. But I'd like to get rid of the Excel dependency, and switch to the ODF format as well. Googling suggests AODL (C# libs for generating ODF docs) as the most obvious solution. But their last release is 1.3.0.0 BETA, and seems to be 3 years old. So I'm not sure if it's a good idea to depend on a potentially dead project... In that case, I'd need to find another solution. Any ideas? Or maybe someone could assure me that AODL is still alive?

    Read the article

  • Could not find generator mini_test:install

    - by David James
    I expected these generators to be available: $ rails g Usage: rails generate GENERATOR [args] [options] MiniTest: mini_test:controller mini_test:helper mini_test:install mini_test:mailer mini_test:model mini_test:scaffold So I ran: $ rails g mini_test:install But got this error: Could not find generator mini_test:install. As for my environment, here is the relevant portion of my Gemfile: group :test, :development do gem 'minitest-rails' end And the resulting portions of my Gemfile.lock: minitest (2.12.1) minitest-rails (0.0.7) minitest (~> 2.12) rails (~> 3.1) I am now in the process of debugging this. I would appreciate any tips. In any case, I will report back.

    Read the article

  • Stacking standard output of `su`

    - by Kristopher Ives
    I've got some code that I wrote that uses a combination of bash and PHP command line scripting. The script is ran as root and then uses su to become various uses. I start a session like this: $result = `su SomeUser ./dothis.php` Here ./dothis.php is a script that may generate some output being stored in $result, but the problem is that there is usually output that doesn't get caught and makes it hard for me to read my script output. How can I make sure that the output is being captured within this su stacking?

    Read the article

  • Create a select tag with some options grouped and others not grouped

    - by dontangg
    I'm using Rails 3. I want to create a select tag with some options grouped and others not grouped. Options would look something like this: Income Auto Fuel Maintenance Home Maintenance Mortgage In this example, Income is not a group, but Auto and Home are. I see three helper methods grouped_options_for_select and grouped_collection_select, option_groups_from_collection_for_select. Is there a way to use a helper to do this or will I have to generate the HTML myself? I imagine I could use two different helpers to create the options and just append the results of both.

    Read the article

  • remove component from initComponent()

    - by jouzef19
    hi i am using netBeans editor to create desktop application , i did something wrong that generate three line of code in the initComponent() method related to connection with database. Then i removed the lines by opening the .java file in txt editor , but one of them keep coming back when i do anything with netBeans editor , So i want to delete this line from the netbeans itself . this is the line historyList = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : ((javax.persistence.Query)null).getResultList(); and this is its declaration private java.util.List<idetect.History> historyList;

    Read the article

  • nodejs, mongodb - How do I operate on data from multiple queries?

    - by Ryan
    Hi all, I'm new to JS in general, but I am trying to query some data from MongoDB. Basically, my first query retrieves information for the session with the specified session id. The second query does a simple geospacial query for documents with a location near the specified location. I'm using the mongodb-native javascript driver. All of these query methods return their results in callbacks, so they're non-blocking. This is the root of my troubles. What I'm needing to do is retrieve the results of the second query, and create an Array of sessionIds of all the returned documents. Then I'm going to pass those to a function later. But, I can't generate this array and use it anywhere outside the callback. Does anyone have any idea how to properly do this? http://dpaste.org/wXiE/

    Read the article

  • How to create diagrams for papers.

    - by Simon
    I want to create some diagrams for some papers. Diagrams will contain some text, e.g. some console output. I need images for using also in html files. There is TikZ so can create images like this: http://www.texample.net/tikz/examples/boxes-with-text-and-math/ http://www.texample.net/tikz/examples/rule-based-diagram/ http://www.texample.net/tikz/examples/scenario-tree/ but as a result I get some ps/pdf files, not images. What's more I want to generate the pictures from text files as I want to track changes in some VCS, any binary files are not suitable for that.

    Read the article

  • Should i really use integer primary IDs [sql]

    - by arthurprs
    For example, i always generate an auto-increment field for the users table, but i also specifies an UNIQUE index on their usernames. There is situations that i first need to get the userId for a given username and then execute the desired query. Or use a JOIN in the desired query. It's 2 trips to the database or a JOIN vs. a varchar index The above is just an example There is a real performance benefit on INT over small VARCHAR indexes? Thanks in advance!

    Read the article

  • Crypto++ AES Decrypt how to?

    - by indigoOrange
    There are next to no noob guides to crypto++ out there. Or none that I've found anyway. What I want to do is decrypt an array of uchars I generate with another AES encrypter. Where would I start? I have the library built and linking grand. Do I need to set anything up or do I just call a function on my array (and if so what function) ? I'd really appreshiate some help from someone who knows this stuff. Thanks

    Read the article

  • Deserialising Json to derived types in Asp.Net Web API

    - by IoChaos
    I'm calling a method of my WebAPI sending a json that I would like to match (or bind) with a model. In the controller I have a method like: public Result Post([ModelBinder(typeof(CustomModelBinder))]MyClass model); 'MyClass', wich is given as a parameter is an abstract class. I would like that at, depending of the type of json passed, the correct inherited class is instantiated. To achieve it, I'm trying to implement a custom binder. The problem is that (I don't know if it's very basic but I can't find anything) I don't know how to retrieve the raw Json (or better, some kind of serialization) that comes in the request. I see: actionContext.Request.Content But all methods are exposed as async. I don't know who this fits with passing the generate model to the controller method... Thanks a lot!

    Read the article

  • What's the simplest way to let the user download a file in ASP.NET MVC ?

    - by drasto
    In an ASP.NET MVC I have a database table. I want to have a button on some view page, if some user clicks that button I my application will generate XML file containing all rows in the database. Then the file containing XML should be sent to the client so that the user will see a download pop-up window. Similarly I want to allow user to upload an XML file whose content will be added to the database. What's the simplest way to let the user upload and download file ? Thanks for all the answers

    Read the article

  • Recommendations for Slideshow Publishing Tool

    - by Chris_K
    A client has asked me to research production tools for publishing slideshows on their Web site. The tool must be very easy to use and it has to generate a mobile version as well as a desktop version of the slideshow. (I'll spare you the rest of the specs.) Tools under consideration include SlideShowPro and Soundslides. Do you have a favorite tool, intended for publishers? In addition to generating code for pasting into a Web page, it would be great if the tool had a hosting component as well, so that a future iPhone app could consume an XML feed of the slideshows, similar to what SlideShowPro offers.

    Read the article

  • Under what circumstances would a Ruby $LOAD_PATH be acquired from a parent process?

    - by Dr Nic
    In my cucumber scenarios, if I call rake db:schema:load within a target Rails app folder, I get the cucumber process's $LOAD_PATH and not the Rails app's own Gemfile/load path. I think this is very weird. The consequence is that I get the following error: no such file to load -- rails/all I can't reproduce it outside of my cucumber scenario. ruby -rubygems -e "system 'rake -T'" works normally - the 'rake -T' has the application's own Gemfile-based $LOAD_PATH; and doesn't generate the error above. Can anyone think why a child process (rake -T or rake db:schema:load or rails runner...; invoked by either system, exec, %x[...] or backtick; would start with the parent processes' $LOAD_PATH (from the cucumber scenario's Gemfile) instead of its own $LOAD_PATH (from the Rails app's Gemfile)?

    Read the article

  • How would you use version control for personal data, like a personal website?

    - by nn
    This is more a use-case question, but I generate static files for a personal website using txt2tags. I was thinking of maybe storing this information in a git repository. Normally I use RCS since it's simplest, and I'm only a single user. But there just seems to be a large trend of people using git/svn/cvs/etc. for personal data, and I thought this may also be a good way to at least learn some of the basics of the tool. Obviously most of the learning is done in an environment where you collaborate. So back to the question: how would you use use a version control system such as git, to manage a personal website?

    Read the article

  • Ignoring all line feeds in a FreeMarker template

    - by Will
    I'm trying out FreeMarker, not for a web application but to generate text within a desktop application. I'd like to get the text without any linefeeds, however it always appends a linefeed. For example, this would produce "blah blah\n" <#if docType=1> blah blah <#if docType=2> more blah <#/if> Any ideas? Bunching it all into one line works, but is horrible. Thanks.

    Read the article

  • Can Eclipse not hard-code ECLIPSE_HOME when exporting build.xml?

    - by stevex
    I have an Eclipse project that I'm attempting to set up to build both with Eclipse and externally with Ant. It seems like a good way to do this is to have Eclipse generate a build.xml file that I can then use with ant. I'd like to set it up so the build.xml can be regenerated from Eclipse whenever the need arises, which means no hand-editing the build.xml file. But Eclipse writes one entry in there that has a hard-coded path to a directory on my computer, which makes it unsuitable for checking in to a source repository. Specifically it's this entry that's the trouble: <property name="ECLIPSE_HOME" value="D:/Eclipse/Eclipse Galileo (3.5) SR1"/> Is there some way to have Eclipse not output this line, or to make it a relative reference or something that makes sense to check in?

    Read the article

  • .Net Round-trip Types

    - by Fujiy
    I making a method that generate a unique string key for some parameters. But the same key if call with same values. I just accept primitive types, string, DateTime, Guid, and Nullable(since I append types together, I can distinguish who is int and who is int?), because I can convert all to string without lost values or precision.(for float and double a use ToString("R"), to DateTime ToString("O")). Exists a easy way to know which types I can transform in strings without conflict? And how do this transform(how I said before, float, double and datetime have specific ways) Thanks

    Read the article

  • Import Data from Excel Spreadsheet or CVS into MySQL

    - by Kelly Roper
    I have a spreadsheet which really has only one complicated table. I basically convert the spreadsheet to a cvs and use a groovy script to generate the INSERT scripts. However, I cannot do this with a table that has 28 fields with data within some of the fields on the spreadsheet that make importing into the CVS even more complicated. So the fields in the new CVS are not differentiated properly or my script has not accounted for it. Does anyone have any suggestions on a better approach to do this? Thanks.

    Read the article

  • How can I allow only privledged users to download a pdf with php?

    - by ThinkingInBits
    Lets say I have some pdf files stored on my server and I only want to allow a person who's paid have access to download a particular pdf. So for an example, let's say I have a bunch of e-books. The only way a user would be able to download e-book A is if his account contains the right credentials for that particular book. What's the best way to accomplish this? Any ideas/advice on how to improve my idea are greatly appreciated! My current idea: A user places an order Upon success, a new folder would be created by their /account_num/order_id/ A copy of the particular file would be stored in this directory Have php generate an .htaccess that would only allow access from a url that contains a random hash embedded into it. The only way a user would be able to access this random hashed page is if they are signed in as the right user, and the hash matches up with the hash stored in the database, otherwise they are redirected to home page.

    Read the article

  • What Should be the Structure of a C++ Project?

    - by Ell
    I have recently started learning C++ and coming from a Ruby environment I have found it very hard to structure a project in a way that it still compiles correctly, I have been using Code::Blocks which is brilliant but a downside is that when I add a new header file or c++ source file, it will generate some code and even though it is only a mere 3 or 4 lines, I do not know what these lines do. First of all I would like to ask this question: What do these lines do? #ifndef TEXTGAME_H_INCLUDED #define TEXTGAME_H_INCLUDED #endif // TEXTGAME_H_INCLUDED My second question is, do I need to #include both the .h file and the .cpp file, and in which order. My third question is where can I find the GNU GCC Compiler that, I beleive, was packaged with Code::Blocks and how do I use it without Code::Blocks? I would rather develop in a notepad++ sort of way because that is what I'm used to in Ruby but since C++ is compiled, you may think differently (please give advice and views on that as well) Thanks in advance, ell.

    Read the article

< Previous Page | 209 210 211 212 213 214 215 216 217 218 219 220  | Next Page >