Daily Archives

Articles indexed Monday September 17 2012

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

  • Game Development

    - by Sundareswaran Senthilvel
    I'm planning to write a game from scratch (a BIG Game, for commercial purpose). I'm aware that there are certain compute libraries like OpenCL, AMD APP SDK, C++ AMP as well as DirectCompute - both from MS (NOT interested in CUDA) are available in the market. I'm planning to write the game from the scratch, which includes the following engines... 1.Physics Engine 2.AI Engine 3.Main Game Engine (... and if anything is missed). I'm aware that, there are some free physics engine libraries in the market. Not sure about free AI engine libraries. I'm bit confused in choosing between the OpenCL, AMD APP SDK, and C++ AMP libraries (as already mentioned i'm NOT interested in CUDA). I want my game to be published in Windows/Android/Mac OSX. It means it should be a cross-platform game. I will be having "one source code" that i'll compile for various platforms like Windows/Android/Mac OSX, and any others if i missed. Note: Since I'm NOT a Java guy, kindly do NOT suggest me the Java Language. For Graphics language should i use OpenGL or DirectX 11? I have heard that OpenGL runs on a single core, and not sure of DirectX 11. Between OpenGL and DirectX which one should i follow? or else, are there any other graphics language that i need to start with? I want to make use of the parallelism in GPU as well as CPU.

    Read the article

  • How do I retain previously drawn graphics?

    - by Cromanium
    I've created a simple program that draws lines from a fixed point to a random point each frame. I wanted to keep each line on the screen. However, it always seems to be cleared each time it draws on the spriteBatch even without GraphicsDevice.Clear(color) being called. What seems to be the problem? protected override void Draw(GameTime gameTime) { spriteBatch.Begin(); DrawLine(spriteBatch); spriteBatch.End(); base.Draw(gameTime); } private void DrawLine(SpriteBatch spriteBatch) { Random r = new Random(); Vector2 a = new Vector2(50, 100); Vector2 b = new Vector2(r.Next(0, 640), r.Next(0,480)); Texture2D filler= new Texture2D(GraphicsDevice, 1, 1, false, SurfaceFormat.Color); filler.SetData(new[] { Color.Black }); float length = Vector2.Distance(a, b); float angle = (float)Math.Atan2(b.Y - a.Y, b.X - a.X); spriteBatch.Draw(filler, a, null, Color.Black, angle, Vector2.Zero, new Vector2(length,10.0f), SpriteEffects.None, 0f); } What am I doing wrong?

    Read the article

  • How would I be able to get a game over screen using the pause function?

    - by Joachim Velzel
    I am having problems with my snake game, when the snake collides with itself it draws a "game over" image in the background, but only while it's colliding with itself. I want it to behave like the pause function, so that as soon as the snake collides with itself it draws an image on the screen and stops the game play. And then how would you be able to restart or to quit the game? I just have this for the detection at the moment: if (snakeHeadRectangle.Intersects(snakeBodyRectangleArray[bodyNumber])) { spriteBatch.Draw(textureGameOver, gameOverPosition, Color.White); } Thanks

    Read the article

  • running GL ES 2.0 code under Linux ( no Android no iOS )

    - by user827992
    I need to code OpenGL ES 2.0 bits and i would like to do this and run the programs on my desktop for practical reasons. Now, i already have tried the official GLES SDK from ATI for my videocard but it not even runs the examples that comes with the SDK itself, i'm not looking for performance here, even a software based rendering pipeline could be enough, i just need full support for GLES 2.0 and GLSL to code and run GL stuff. There is a reliable solution for this under Ubuntu Linux ?

    Read the article

  • ideas on multiplayer games which include lots of collaboration?

    - by user494461
    For my master thesis I wanted to design a small multiplayer game which includes more than one player(maybe 5), has 2-3 players collaborating at a time to achieve some task. The most important thing is realistic simulation of the movable objects in the scene which more than one player should simultaneously interact with. I would also prefer large virtual environments (VEs) like mmogs where groups of players are interacting in different areas of the VE. tasks for players should include 2-3 players touching movable objects at same time. e,g, a very basic task can be users lifting a cube together and pushing it through a hole I am not new to designing virtual environments with openGL, but have never designed games before and rarely play other than few of my favorite ones like Fifa. I wanted some ideas on what kind of games should I look at which should help me with ideas for my tasks for the users to gain points and win in games? any current indie games which might inspire me?

    Read the article

  • Using report viewer, how do I pull from two seperate Datasets

    - by Robert
    I have two datasets I need to pull from, A base that both reports use and then a separate one that only one report pulls from. I get the error Error 12 The Value expression for the text box ‘Textbox9’ refers to the field ‘Name’. Report item expressions can only refer to fields within the current dataset scope or, if inside an aggregate, the specified dataset scope. My best guess is I have to associate them with the correct dataset but I have not been able to find any documentation on this. Can someone please tell me where in the rdlc document I need to code something like name.value, "dataset1" or something similar?

    Read the article

  • Navigating between activities and tasks

    - by Alex Orlov
    The situation: I have an activity "A" that is a delegator activity, in simple words, it's only purpose is to call activity "B" (via startActivityForResult()) depending on data it receives. Activity "B" has launchMode set to "singleTask", so it always runs in a single task. When activity "A" gets started from another task (for example as a share from gallery) it immediately returns ACTION_CANCELLED for activity "B", finishes, and task of activity "B" comes to front (which is an expected behavior). So, what happens, is that we jump from our Gallery app task, to my activity "B" task. Everything is fine until user presses back. Since we are already in a different task, the back button doesn't lead us back to gallery. It navigates in the stack of activity "B" task. The question: is there any way to navigate from one task, to previously shown task (navigate from activity "B" to gallery)? Or maybe there is a way to take currently running activity "B" and move it to another task?

    Read the article

  • Analyze big human database

    - by Neir0
    Lets we have a big people database. Each human has a many parameters: age, weight, favorite music, favorite films, education etc. I want to know how one feature associate with other features. For example, if human has a good education what it means for musical preferences? Or how films preferences changes with age? I know about assotian rules algorithms like apriory but i donnt want just to found assotiation rules, i want to know how one specific feature affect to others. Which keywords i must to use for google?

    Read the article

  • Can I stop Uri from unencoding a url in WebRequest.Create?

    - by Paul
    The code itself isn't complex, it's just not working properly: Uri uri = new Uri("https://www.google.com/webmasters/tools/feeds/sites/http%3A%2F%2Fwww.mydomain.co.uk%2F"); WebRequest.Create(uri); I get a "Bad Request" back from the server, and after much MUCH digging, discovered that the uri is being turned in to "https://www.google.com/webmasters/tools/feeds/sites/http%3A//www.mydomain.co.uk/" which is not what I asked for, and so it's having a whinge Is there a way to stop this?

    Read the article

  • WCF Client - Best Practise

    - by user1663907
    I just wanted to hear your Opinion about a WCF Client implementation. I have an Server that provides several services like SecurityManager. This service is defined in the Interface ISecurityManager and implemented in the Class SecurityManager. So far everything is fine. On the Client side I want to implement the services calls via a seperated Class. My question is whether I do this also in an SecurityManager Class which implements the same ISecurityManager Interface? What is here the best practise? Thanks.

    Read the article

  • Creating syncable Calendar in ICS

    - by user1390816
    I have a problem with creating a new Calendar in ICS. The Calendar should be synyable to the google Calendar. I try following: Uri calendarUri = CalendarContract.Calendars.CONTENT_URI; calendar.put(CalendarContract.Calendars.ACCOUNT_NAME, sync_account); calendar.put(CalendarContract.Calendars.ACCOUNT_TYPE, "com.google"); calendar.put(CalendarContract.Calendars.NAME, name); calendar.put(CalendarContract.Calendars.CALENDAR_DISPLAY_NAME, displayName); calendar.put(CalendarContract.Calendars.CALENDAR_COLOR, 0xFF008080); calendar.put(CalendarContract.Calendars.CALENDAR_ACCESS_LEVEL, CalendarContract.Calendars.CAL_ACCESS_OWNER); calendar.put(CalendarContract.Calendars.OWNER_ACCOUNT, true); calendar.put(CalendarContract.Calendars.VISIBLE, 1); calendar.put(CalendarContract.Calendars.SYNC_EVENTS, 1); calendarUri = calendarUri.buildUpon() .appendQueryParameter(CalendarContract.CALLER_IS_SYNCADAPTER, "true") .appendQueryParameter(CalendarContract.Calendars.ACCOUNT_NAME, sync_account) .appendQueryParameter(CalendarContract.Calendars.ACCOUNT_TYPE, "com.google") // CalendarContract.ACCOUNT_TYPE_LOCAL .build(); Uri result = activity.getContentResolver().insert(calendarUri, calendar); an I get always this error: 09-17 17:11:30.278: E/AndroidRuntime(13243): FATAL EXCEPTION: CalendarSyncAdapterAccountMonitor 09-17 17:11:30.278: E/AndroidRuntime(13243): java.lang.IllegalArgumentException: the name must not be empty: null 09-17 17:11:30.278: E/AndroidRuntime(13243): at android.accounts.Account.<init>(Account.java:48) 09-17 17:11:30.278: E/AndroidRuntime(13243): at com.google.android.syncadapters.calendar.CalendarSyncAdapter.onAccountsUpdated(CalendarSyncAdapter.java:1129) 09-17 17:11:30.278: E/AndroidRuntime(13243): at android.accounts.AccountManager$11.run(AccountManager.java:1279) 09-17 17:11:30.278: E/AndroidRuntime(13243): at android.os.Handler.handleCallback(Handler.java:605) 09-17 17:11:30.278: E/AndroidRuntime(13243): at android.os.Handler.dispatchMessage(Handler.java:92) 09-17 17:11:30.278: E/AndroidRuntime(13243): at android.os.Looper.loop(Looper.java:137) 09-17 17:11:30.278: E/AndroidRuntime(13243): at android.os.HandlerThread.run(HandlerThread.java:60) 09-17 17:11:30.293: E/android.os.Debug(1989): !@Dumpstate > dumpstate -k -t -n -z -d -o /data/log/dumpstate_app_error What can I do with the CalendarSyncAdapterAccountMonitor, that it is not empty? Thanks in advance.

    Read the article

  • Issue with jQuery .submit()

    - by d.lanza38
    I'm having an issue submitting a form with the jquery .submit(); I don't have any elements on my page with a name of name="submit" or name="Submit", same goes for id's. My bit of jQuery code is as follows: $(document).ready(function () { $(document).on('click', "#appSubmit",function(e){ e.preventDefault(); var value = $("#time").val(); if(value == "--"){ $( "#err-time" ).dialog( "open" ); }else{ alert("1"); var dummy = $("#appSubmit").val(); alert(dummy); $("#appSubmit").submit(); alert("2"); } }); }); All of the alerts work properly, even the alert(dummy); prints out the correct value. The alert("2"); prints out, so it isn't even breaking on the $("#appSubmit").submit(); My submit button is <input type="submit" name="appSubmit" id="appSubmit" value="Apply"> Any thoughts would be appreciated, thanks.

    Read the article

  • Does table columns increase select statement execution time

    - by paokg4
    I have 2 tables, same structure, same rows, same data but the first has more columns (fields). For example: I select the same 3 fields from both of them (SELECT a,b,c FROM mytable1 and then SELECT a,b,c FROM mytable2) I've tried to run those queries on 100,000 records (for each table) but at the end I got the same execution time (0.0006 sec) Do you know if the number of the columns (and in the end the size of the one table is bigger than the other) has to do something with the query execution time?

    Read the article

  • How to run an SQL stored procedure through C# at a specific time?

    - by yishai neeman
    I am building a website now for a library and i need to check every day at the same time if there are people who need to return their books in the next five days and to send them a reminder via email. My question is what will be the correct way to do that? What i need to accomplish is when the specific time of day comes i need to run an sql stored procedure and check either through visual studio 2010 or any other way if the stored procedure has returned any results to which i need to email. Is there a way to maybe check the system time constantly on C# and not as a triggered event?

    Read the article

  • Why does the Ternary\Conditional operator seem significantly faster

    - by Jodrell
    Following on from this question, which I have partially answered. I compile this console app in x64 Release Mode, with optimizations on, and run it from the command line without a debugger attached. using System; using System.Diagnostics; class Program { static void Main() { var stopwatch = new Stopwatch(); var ternary = Looper(10, Ternary); var normal = Looper(10, Normal); if (ternary != normal) { throw new Exception(); } stopwatch.Start(); ternary = Looper(10000000, Ternary); stopWatch.Stop(); Console.WriteLine( "Ternary took {0}ms", stopwatch.ElapsedMilliseconds); stopwatch.Start(); normal = Looper(10000000, Normal); stopWatch.Stop(); Console.WriteLine( "Normal took {0}ms", stopwatch.ElapsedMilliseconds); if (ternary != normal) { throw new Exception(); } Console.ReadKey(); } static int Looper(int iterations, Func<bool, int, int> operation) { var result = 0; for (int i = 0; i < iterations; i++) { var condition = result % 11 == 4; var value = ((i * 11) / 3) % 5; result = operation(condition, value); } return result; } static int Ternary(bool condition, in value) { return value + (condition ? 2 : 1); } static int Normal(int iterations) { if (condition) { return = 2 + value; } return = 1 + value; } } I don't get any exceptions and the output to the console is somthing close to, Ternary took 107ms Normal took 230ms When I break down the CIL for the two logical functions I get this, ... Ternary ... { : ldarg.1 // push second arg : ldarg.0 // push first arg : brtrue.s T // if first arg is true jump to T : ldc.i4.1 // push int32(1) : br.s F // jump to F T: ldc.i4.2 // push int32(2) F: add // add either 1 or 2 to second arg : ret // return result } ... Normal ... { : ldarg.0 // push first arg : brfalse.s F // if first arg is false jump to F : ldc.i4.2 // push int32(2) : ldarg.1 // push second arg : add // add second arg to 2 : ret // return result F: ldc.i4.1 // push int32(1) : ldarg.1 // push second arg : add // add second arg to 1 : ret // return result } Whilst the Ternary CIL is a little shorter, it seems to me that the execution path through the CIL for either function takes 3 loads and 1 or 2 jumps and a return. Why does the Ternary function appear to be twice as fast. I underdtand that, in practice, they are both very quick and indeed, quich enough but, I would like to understand the discrepancy.

    Read the article

  • Serializing Complex ViewModel with Json.Net Destabilization Error on Latest Version

    - by dreadlocks1221
    I just added the latest Version of JSON.Net and I get the System.Security.VerificationException: Operation could destabilize the runtime error when trying to use a controller (while running the application). I read in other posts that this issue should have been fixed in release 6 but I still have the problem. I even added *Newtonsoft.* to the ignore modules in the intellitrace options, which seems to have suppressed the error, but the post will just run forever and not return anything. Any help I can get would be greatly appreciated. [HttpPost] public string GetComments(int ShowID, int Page) { int PageSize = 10; UserRepository UserRepo = new UserRepository(); ShowCommentViewModel viewModel = new ShowCommentViewModel(); IQueryable<Comment> CommentQuery = showRepository.GetShowComments(ShowID); var paginatedComments = new PaginatedList<Comment>(CommentQuery, Page, PageSize); viewModel.Comments = new List<CommentViewModel>(); foreach (Comment comment in CommentQuery.Take(10).ToList()) { CommentViewModel CommentModel = new CommentViewModel { Comment = comment, PostedBy = UserRepo.GetUserProfile(comment.UserID) }; IQueryable<Comment> ReplyQuery = showRepository.GetShowCommentReplies(comment.CommentID); int ReplyPage = 0; var paginatedReplies = new PaginatedList<Comment>(ReplyQuery, ReplyPage, 3); CommentModel.Replies = new List<ReplyModel>(); foreach (Comment reply in ReplyQuery.Take(3).ToList()) { ReplyModel rModel = new ReplyModel { Reply = reply, PostedBy = UserRepo.GetUserProfile(reply.UserID) }; CommentModel.Replies.Add(rModel); } CommentModel.RepliesNextPage = paginatedReplies.HasNextPage; CommentModel.RepliesPeviousPage = paginatedReplies.HasPreviousPage; CommentModel.RepliesTotalPages = paginatedReplies.TotalPages; CommentModel.RepliesPageIndex = paginatedReplies.PageIndex; CommentModel.RepliesTotalCount = paginatedReplies.TotalCount; viewModel.Comments.Add(CommentModel); } viewModel.CommentsNextPage = paginatedComments.HasNextPage; viewModel.CommentsPeviousPage = paginatedComments.HasPreviousPage; viewModel.CommentsTotalPages = paginatedComments.TotalPages; viewModel.CommentsPageIndex = paginatedComments.PageIndex; viewModel.CommentsTotalCount = paginatedComments.TotalCount; return JsonConvert.SerializeObject(viewModel, Formatting.Indented); }

    Read the article

  • Is there any way to style optgroup using CSS on the iPad?

    - by AzzyDude
    Is there any way to style the HTML element 'optgroup' using CSS? It's specifically important the style appears on the mobile iOS browser for iPad. The HTML is: <optgroup label="Great Britain"> <option value="EUROPE_ENGLAND">England</option> <option value="EUROPE_SCOTLAND">Scotland</option> <option value="EUROPE_WALES">Wales</option> </optgroup> And the CSS is: optgroup { color: red; } I'm not even sure it's possible to style the iPad's optgroup by the way.

    Read the article

  • SELECT * FROM <table> BETWEEN <value typed in a JTextField> AND <idem>

    - by Rodrigo Sieja Bertin
    In this part of the program, the JInternalFrame file FrmMovimento, I made a button called Visualizar ("View"). Based on what we type on the text fields, it must show the interval the user defined. There are these JTextFields: Code from: _ To: _ Asset: _ And these JFormattedTextFields: Date from: _ To: _ There are registers appearing already in the JDesktopPane from JInternalFrame FrmListarMov, if I use another SELECT statement selecting all registers, for example. But not if I type as I did in the title: public List<MovimentoVO> Lista() throws ErroException, InformacaoException{ List<MovimentoVO> listaMovimento = new ArrayList<> (); try { MySQLDAO.getInstancia().setAutoCommit(false); try (PreparedStatement stmt = MySQLDAO.getInstancia().prepareStatement( "SELECT * FROM Cadastro2 WHERE Codigo BETWEEN "+ txtCodDeMov +" AND "+ txtCodAteMov +";") { ResultSet registro = stmt.executeQuery(); while(registro.next()){ MovimentoVO Movimento = new MovimentoVO(); Movimento.setCodDeMov(registro.getInt(1)); Movimento.setCodAteMov(registro.getInt(2)); Movimento.setAtivoMov(registro.getString(3)); Movimento.setDataDeMov(registro.getString(4)); Movimento.setDataAteMov(registro.getString(5)); listaMovimento.add(Movimento); } } } catch (SQLException ex) { throw new ErroException(ex.getMessage()); } catch (InformacaoException ex) { throw ex; } return listaMovimento; } In the SELECT line, txtCodDeMov is how I named the JTextField of "Code from" and txtCodAtemov is how I named the JTextField of the first "To". Oh, I'm using NetBeans 7.1.2 (Build 201204101705) and MySQL Ver 14.14 Distrib 5.1.63 in a Linux Mint 12 64-bits.

    Read the article

  • Using scope, defined in parent model, inside it's child (STI pattern)

    - by Anton
    I implement a class hierarchy using STI pattern class A scope :aaa, where([someField]:[someValue]) end class B < A end The problem is that when I try to call something like: B.limit(5).aaa => SELECT "[table]".* FROM "[table]" WHERE "[table]"."type" IN ('A') AND ([someField] = [someValue]) LIMIT 5 So I am getting 5 objects of type A, which satisfies scope :aaa But I need to do the same with rows where type = "B" Is there any way to use scopes from parent, without redifinning it in childs in STI pattern? Thanks in advance EDITED I just discussed it with my frind and he showed me one important thing. A in not the root class of STI. IN fact whole hierarchy looks like class O < ActiveRecord::Base end class A < O scope ..... ..... end class B < A end maybe the reason is in hierarchy itself?...

    Read the article

  • Regex Pattern for ignoring a custom escape character

    - by user1517464
    I am trying to find a suitable regex for matching pair of custom characters in an input string. These custom characters are replaced by their corresponding html tags. For e.g. The input string can have underscores in pairs to indicate words in bold. Hence, _Name_ outputs as <b>Name</b> However if there is a genuine underscore in the string, it cannot be replaced by "bold" tags and has to be ignored. The genuine underscore has to be preceded by / (I couldn't find a better character, it could be one more underscore or hyphen or whatever). Any single or paired occurrance of this genuine underscore has to be ignored by regex. So far I could come up with this regex: var pattern = @"(?!/)_(.*?)(?!/)_"; But it fails in below input string: _Tom_Katy/_Richard/_/_Stephan_and many users It outputs as <b>Tom</b>Katy/<b>Richard/_/</b>Stephan_and many users Many Thanks in Advance, Pr

    Read the article

  • Ruby on Rails: Routing error

    - by JamesMcL13
    I am having trouble deleting and showing user records. Here is my routes.rb FinalApp::Application.routes.draw do resources :admin devise_for :users, :controllers => { :registrations => 'admin' } resources :projects match "search" => "projects#search", :as => :search root :to => 'projects#index' end Here is my admin controller: class AdminController < ApplicationController def index @users = User.all respond_to do |format| format.html # index.html.erb format.json { render :json => @users } end end def create @user = User.new(params[:user]) respond_to do |format| if @user.save format.html { redirect_to @user, notice: 'User was successfully created.' } format.json { render json: @user, status: :created, location: @user } else format.html { render action: "new" } format.json { render json: @user.errors, status: :unprocessable_entity } end end end # GET /users/1 # GET /users/1.json def show @user = User.find(params[:id]) @user_user_id = params[:id] respond_to do |format| format.html # show.html.erb format.json { render json: @user } end end # GET /users/new # GET /users/new.json def new @user = User.new respond_to do |format| format.html # new.html.erb format.json { render json: @user } end end # GET /users/1/edit def edit @user = User.find(params[:id]) end # POST /users # POST /users.json # PUT /users/1 # PUT /users/1.json def update @user = User.find(params[:id]) respond_to do |format| if @user.update_attributes(params[:user]) format.html { redirect_to @user, notice: 'User was successfully updated.' } format.json { head :no_content } else format.html { render action: "edit" } format.json { render json: @user.errors, status: :unprocessable_entity } end end end # DELETE /users/1 # DELETE /users/1.json def destroy @user = User.find(params[:id]) @user.destroy respond_to do |format| format.html { redirect_to users_url } format.json { head :no_content } end end end Here is my view: <%= stylesheet_link_tag "admin" %> <body> <div id ="title1">Admin</div> <div class ="menu"></div> <div id ="section3"> <table id = "mytable"> <table border = "1"> <tr> <th>Username </th> <th>Email</th> <th>First Name</th> <th>Last Name</th> <th>Admin?</th> <th></th> <th></th> <th></th> </tr> <%= link_to "New User", admin_new_path %><br /> <% @users.each do |t| %> <tr> <td><%= t.username %></td> <td><%= t.email %></td> <td><%= t.firstname %></td> <td><%= t.lastname %></td> <td><%= t.admin %></td> <td><%= link_to 'Show', t %></td> <td> <%= button_to "Delete", t, method: :delete, data: { confirm: 'Are you sure?' } %></td> </tr> <% end %> </table></br> </body> </html> I can display the User database, but when I go to delete a record. I get this error No route matches [DELETE] "/users/11". I am new to rails so please remember this when trying to help. Thanks in advance. Edit: here are my routes = admin_index GET /admin(.:format) admin#index POST /admin(.:format) admin#create new_admin GET /admin/new(.:format) admin#new edit_admin GET /admin/:id/edit(.:format) admin#edit admin GET /admin/:id(.:format) admin#show PUT /admin/:id(.:format) admin#update DELETE /admin/:id(.:format) admin#destroy new_user_session GET /users/sign_in(.:format) devise/sessions#new user_session POST /users/sign_in(.:format) devise/sessions#create destroy_user_session DELETE /users/sign_out(.:format) devise/sessions#destroy user_password POST /users/password(.:format) devise/passwords#create new_user_password GET /users/password/new(.:format) devise/passwords#new edit_user_password GET /users/password/edit(.:format) devise/passwords#edit PUT /users/password(.:format) devise/passwords#update cancel_user_registration GET /users/cancel(.:format) admin#cancel user_registration POST /users(.:format) admin#create new_user_registration GET /users/sign_up(.:format) admin#new edit_user_registration GET /users/edit(.:format) admin#edit PUT /users(.:format) admin#update DELETE /users(.:format) admin#destroy projects GET /projects(.:format) projects#index POST /projects(.:format) projects#create new_project GET /projects/new(.:format) projects#new edit_project GET /projects/:id/edit(.:format) projects#edit project GET /projects/:id(.:format) projects#show PUT /projects/:id(.:format) projects#update DELETE /projects/:id(.:format) projects#destroy search /search(.:format) projects#search root / projects#index

    Read the article

  • What binary architectures should be cross-compiled when building Mac OS X packages?

    - by Alex Leach
    Currently, Apple's native binaries and libraries are distributed as fat files, with support for both i386 and x86_64 architectures. The SDK (Xcode 4.4 w/ command line tools) doesn't support cross-compiling powerpc binaries any more, so they can be safely ignored I think, but there doesn't seem to be any specific guidelines or recommendations about which Intel architectures to support. So, when compiling code for distribution on OS X, do people still cross-compile for the i386 architecture? Or are x86_64 binaries the only architecture worth bothering with nowadays?

    Read the article

  • Using a "local" S3 emulation layer as a replacement for HDFS?

    - by user183394
    I have been testing out the most recent Cloudera CDH4 hadoop-conf-pseudo (i.e. MRv2 or YARN) on a notebook, which has 4 cores, 8GB RAM, an Intel X25MG2 SSD, and runs a S3 emulation layer my colleagues and I wrote in C++. The OS is Ubuntu 12.04LTS 64bit. So far so good. Looking at Setting up hadoop to use S3 as a replacement for HDFS, I would like to do it on my notebook. Nevertheless, I can't find where I can change the jets3t.properties for setting the end point to localhost. I downloaded the hadoop-2.0.1-alpha.tar.gz and searched the source without finding out a clue. There is a similar Q on SO Using s3 as fs.default.name or HDFS?, but I want to use our own lightweight and fast S3 emulation layer, instead of AWS S3, for our experiments. I would appreciate a hint as to how I can change the end point to a different hostname. Regards, --Zack

    Read the article

  • SQLite Transaction fills a table BEFORE the transaction is commited

    - by user1500403
    Halo I have a code that creates a datatable (in memory) from a select SQL statement. However I realised that this datatable is filling during the procedure rather as a result of the transaction comit statment, it does the job but its slow. WHat amI doing wrong ? Inalready.Clear() 'clears a dictionary Using connection As New SQLite.SQLiteConnection(conectionString) connection.Open() Dim sqliteTran As SQLite.SQLiteTransaction = connection.BeginTransaction() Try oMainQueryR = "SELECT * FROM detailstable Where name= :name AND Breed= :Breed" Dim cmdSQLite As SQLite.SQLiteCommand = connection.CreateCommand() Dim oAdapter As New SQLite.SQLiteDataAdapter(cmdSQLite) With cmdSQLite .CommandType = CommandType.Text .CommandText = oMainQueryR .Parameters.Add(":name", SqlDbType.VarChar) .Parameters.Add(":Breed", SqlDbType.VarChar) End With Dim c As Long = 0 For Each row As DataRow In list.Rows 'this is the list with 500 names If Inalready.ContainsKey(row.Item("name")) Then Else c = c + 1 Form1.TextBox1.Text = " Fill .... " & c Application.DoEvents() Inalready.Add(row.Item("name"), row.Item("Breed")) cmdSQLite.Parameters(":name").Value = row.Item("name") cmdSQLite.Parameters(":Breed").Value = row.Item("Breed") oAdapter.Fill(newdetailstable) End If Next oAdapter.FillSchema(newdetailstable, SchemaType.Source) Dim z = newdetailstable.Rows.Count 'At this point the newdetailstable is already filled up and I havent even comited the transaction ' sqliteTran.Commit() Catch ex As Exception End Try End Using

    Read the article

  • Fetch a specific tag from Rally in order to compute a value in another field

    - by 4jas
    I'm extremely new to Rally development so my question may sound dumb (but couldn't find how to do it from rally's help or from previous posts here) :) I've started from the rally freeform grid example - my purpose is to implement a Business Value calculator: I fill the score field with a 5-digit figure where each number is a score in the 1-5 range. Then I compute a business value as the result of a calculation, where each number is weighted by a preset weight. I can sort my stories by Business Value to help me prioritize my backlog: that's the first step, and it works. Now what I want to do is to make my freeform grid editable: I am extracting each of my digits as a separate column, but those columns are display-only. How can I turn them into something editable? What I want to do of course is update back the score field based on the values input in each custom column. Here's an example: I have a record with score "15254", which means Business Value criteria 1 scores 1 out of 5, Business Value criteria 2 scores 5 out of 5, and so on... In the end my Business Value is computed as "1*1 + 5*2 + 2*3 + 5*4 + 4*5 = 57". So far this is the part that works. Now let's say I found that the third criteria should not score 2 but 3, I want to be able to edit the value in the corresponding column and have my score field updated to "15354", and my Business Value to display 60 instead of 57. Here is my current code, I'll be really grateful if you can help me with turning that grid into something editable :) <!--Include SDK--> <script type="text/javascript" src="https://rally1.rallydev.com/apps/2.0p2/sdk-debug.js"></script> <!--App code--> <script type="text/javascript"> Rally.onReady(function() { Ext.define('BVApp', { extend: 'Rally.app.App', componentCls: 'app', launch: function() { Ext.create('Rally.data.WsapiDataStore', { model: 'UserStory', autoLoad: true, listeners: { load: this._onDataLoaded, scope: this } }); }, _onDataLoaded: function(store, data) { var records = []; var li_score; var li_bv1, li_bv2, li_bv3, li_bv4, li_bv5, li_bvtotal; var weights = new Array(1, 2, 3, 4, 5); Ext.Array.each(data, function(record) { //Let's fetch score and compute the business values... li_score = record.get('Score'); if (li_score) { li_bv1 = li_score.toString().substring(0,1); li_bv2 = li_score.toString().substring(1,2); li_bv3 = li_score.toString().substring(2,3); li_bv4 = li_score.toString().substring(3,4); li_bv5 = li_score.toString().substring(4,5); li_bvtotal = li_bv1*weights[0] + li_bv2*weights[1] + li_bv3*weights[2] + li_bv4*weights[3] + li_bv5*weights[4]; } records.push({ FormattedID: record.get('FormattedID'), ref: record.get('_ref'), Name: record.get('Name'), Score: record.get('Score'), Bv1: li_bv1, Bv2: li_bv2, Bv3: li_bv3, Bv4: li_bv4, Bv5: li_bv5, BvTotal: li_bvtotal }); }); this.add({ xtype: 'rallygrid', store: Ext.create('Rally.data.custom.Store', { data: records, pageSize: 5 }), columnCfgs: [ { text: 'FormattedID', dataIndex: 'FormattedID' }, { text: 'ref', dataIndex: 'ref' }, { text: 'Name', dataIndex: 'Name', flex: 1 }, { text: 'Score', dataIndex: 'Score' }, { text: 'BusVal 1', dataIndex: 'Bv1' }, { text: 'BusVal 2', dataIndex: 'Bv2' }, { text: 'BusVal 3', dataIndex: 'Bv3' }, { text: 'BusVal 4', dataIndex: 'Bv4' }, { text: 'BusVal 5', dataIndex: 'Bv5' }, { text: 'BusVal Total', dataIndex: 'BvTotal' } ] }); } }); Rally.launchApp('BVApp', { name: 'Business Values App' }); var exampleHtml = '<div id="example-intro"><h1>Business Values App</h1>' + '<div>Own sample app for Business Values</div>' + '</div>'; // Default app viewport uses layout: 'fit', // so we need to insert a container into the viewport var viewport = Ext.ComponentQuery.query('viewport')[0]; var appComponent = viewport.items.getAt(0); var viewportContainerItems = [{ html: exampleHtml, border: 0 }]; //hide advanced cardboard live previews in examples for now viewportContainerItems.push({ xtype: 'container', items: [appComponent] }); viewport.remove(appComponent, false); viewport.add({ xtype: 'container', layout: 'vbox', items: viewportContainerItems }); }); </script> <!--App styles--> <style type="text/css"> .app { /* Add app styles here */ } </style>

    Read the article

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