Daily Archives

Articles indexed Monday November 14 2011

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

  • Which software to keep track of my project?

    - by Exa
    I'm about to start the first real phase of my game development which will consist of the acquisition of information, resources and the definition of where I want to go and what I will need for that. I just want to make sure that I'm prepared as best as possible before I actually start development. I don't like the thought of using Microsoft Word or Excel for my project management... I already worked with MS Project but I don't think it fits my needs. I need a software where I can easily maintain project steps, milestones, important issues, information about technologies and engines I use, as well as simple notes and thoughts I just want to write down. I usually prefer a whiteboard for stuff like that but unfortunately it's not a persistent way of storing. ;) Also writing it down the old-school way is something I can think of, but only for quick notes... Which software do you use for that? Are there commonly used programs? Is there any free software at all?

    Read the article

  • Browser Game Database structure

    - by John Svensson
    users id username password email userlevel characters id userid level strength exp max_exp map id x y This is what I have so far. I want to be able to implement and put different NPC's on my map location. I am thinking of some npc_entities table, would that be a good approach? And then I would have a npc_list table with details as how much damage, level, etc the NPC is. Give me some ideas with the map, map entities, npc how I can structure it?

    Read the article

  • Is it legal to develop a game usung some version of D&D, something similar to Baldurs Gate?

    - by Max
    For a while now I've been thinking about trying my hand at creating a game similar in spirit and execution to Baldurs Gate, Icewind Dale and offshoots. I'd rather not face the full bulk of work in implementing my own RPG system - I'd like to use D&D rules. Now, reading about the subject it seems there is something called "The License" which allows a company to brand a game as D&D. This license seems to be exclusive, and let's just say I don't have the money to buy it :p. Is it still legal for me to implement and release such a game? Commercially or open-source? I'm not sure exactly which edition would fit the best, but since Baldurs Gate is based of 2nd edition, could I go ahead an implement that? in short: what are the issues concerning licensing and publishing when it comes to D&D? Also: Didn't see any similar question...

    Read the article

  • How to design a separated tutorial mode?

    - by Sylpheed
    I'm working on a "social" game that's about 90% completion. One of the remaining features is the tutorial mode. Basically, the tutorial mode will restrict the user to access some parts of UI and limit the features (like store items). The tutorial will only progress if a certain event is triggered, specifically following the tutorial. The code is ready and we already have an "almost" working game. The problem is I haven't foreseen the tutorial mode while I was doing those 90%. My requirement is there shouldn't be any loading/transition from tutorial mode to normal mode. This means I have to pick up the progress from the tutorial (no re-rendering of assets and stuff). How should I design this in a way where I won't touch anything from my old code? I want it to be as easy as just plugging it in. I don't want to jam the tutorial in my old code since this will lead to many bugs.

    Read the article

  • PL/SQL 'select in' from a list of values whose type are different from the outer query

    - by Attilah
    I have the following tables : Table1 ( Col1 : varchar2, Col2 : number, Col3 : number) Table2 ( Col1 : number, Col2 : varchar2, Col3 : varchar2) I want to run a query like this : select distinct Col2 from Table1 where Col1 in ( select Col1 from Table2 ) Table1.Col1 is of type varchar2 while Table2.Col1 is of type number. so, I need to do some casting, it seems but it fails to succeed. The problem is that any attempts to run the query returns the following error : ORA-01722: invalid number 01722. 00000 - "invalid number" *Cause: *Action: Table1.Col1 contains some null values.

    Read the article

  • Php algorithm - How to achieve that without eval

    - by Marcelo
    I have a class that keeps data stores/access data by using words.separated.by.dots keys and it behaves like the following: $object = new MyArray() $object->setParam('user.name','marcelo'); $object->setParam('user.email','[email protected]'); $object->getParams(); /* array( 'user' => array( 'name' => 'marcelo', 'email' => '[email protected]' ) ); */ It is working, but the method unsetParam() was horribly implemented. That happened because i didn't know how to achieve that without eval() function. Although it is working, I found that it was a really challenging algorithm and that you might find fun trying to achieve that without eval(). class MyArray { /** * @param string $key * @return Mura_Session_Abstract */ public function unsetParam($key) { $params = $this->getParams(); $tmp = $params; $keys = explode('.', $key); foreach ($keys as $key) { if (!isset($tmp[$key])) { return $this; } $tmp = $tmp[$key]; } // bad code! $eval = "unset(\$params['" . implode("']['", $keys) . "']);"; eval($eval); $this->setParams($params); return $this; } } The test method: public function testCanUnsetNestedParam() { $params = array( '1' => array( '1' => array( '1' => array( '1' => 'one', '2' => 'two', '3' => 'three', ), '2' => array( '1' => 'one', '2' => 'two', '3' => 'three', ), ) ), '2' => 'something' ); $session = $this->newSession(); $session->setParams($params); unset($params['1']['1']['1']); $session->unsetParam('1.1.1'); $this->assertEquals($params, $session->getParams()); $this->assertEquals($params['1']['1']['2'], $session->getParam('1.1.2')); }

    Read the article

  • PHP post programmatically

    - by Tural Teyyuboglu
    After user registration, website send activation code to email. something like that. www.domain.com/?activate=<code> I'm creating 2 variants of activation: 1.manual 2.auto Lets say we have index.php. 1.Manual method. When someone wants to activate user manually all things are obvious: User opens page www.domain.com/?activate Index.php checks with following script and includes div file (which contains activation form) if (isset($_GET['activate'])) { $page='activate'; $divfile = 'path to div.php'; } include $divfile; Then page sends form data via ajax to activation.php file. 2.Auto method. Lets say user clicked directly to www.domain.com/?activate=<code>. What I wanna do is, to check if(!empty($_GET['activate'])), if all right ... I can't figure out how to act?! Programmatically send something like POST to activation.php or what? Please help. Thx in advance

    Read the article

  • How can I change Twitter's Share button height?

    - by user1035890
    How can I change Twitter's icon height? I have another custom image, but the height stays the same. How do I fix this? https://dev.twitter.com/docs/tweet-button and I used the div method and not the iframe because I wanted to add the data-title I used this code: <script src="//platform.twitter.com/widgets.js" type="text/javascript"></script> <div> <a href="https://twitter.com/share" class="twitter-share-button" data-url="https://dev.twitter.com/pages/tweet_button" data-via="your_screen_name" data-text="Checking out this page about Tweet Buttons" data-related="anywhere:The Javascript API" data-count="vertical">Tweet</a> </div>

    Read the article

  • Generics Type issue

    - by JohnJohnGa
    ArrayList<Integer> arrI = new ArrayList<Integer>(); ArrayList arrO = arrI; // Warning /* It is ok to add a String as it is an ArrayList of Objects but the JVM will know the real type, arrO is an arrayList of Integer... */ arrO.add("Hello"); /* How I can get a String in an ArrayList<Integer> ?? Even if the compiler told me that I will get an Integer! */ System.out.println(arrI.get(0)); Anybody can explain what's happening here?

    Read the article

  • How to fork my android app?

    - by eidylon
    So I've written my first Android app, ... and want to be able to provide both free and paid versions. I wrote and compiled it in Eclipse on Windows. I'm wondering if it is possible, and how I would go about doing so, to have separate compile jobs somehow, so that I can maintain my free and paid versions from one set of source code, and just leave out certain bits for the paid version, but keep the main source the same. What are the recommended ways/best practices for devving a paid and free version of the same app from one set of source? Is it even possible?

    Read the article

  • Need cause for: double dialer icon in Recents when ACTION_CALL is intercepted and re-sent

    - by Emmanuel
    Note that this happens on Android version 2.1 update1 and 2.2. This seems gone in later versions. Of course I would like to know the workaround. But if there are none, at least if this is a known bug, please provide with a link to the bug. I would also accept the source code fix info or diff where this was fixed. I have an application that intercepts an outgoing call, asks a question to the user, and then depending on the answer it could re-send the call. This works fine. But then when you go to the Recents (hold the Home key) there are two slightly different dialer icons there: one from the dialer application, and a second one for the resending of the call action: This means when you click on the first icon, it opens the dialer. But when you click on the second one, it redials the last number. I tried using android:excludeFromRecents="true" for all my activities. I also tried Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS when I start the call action. No luck.

    Read the article

  • T-SQL: Dynamic Query by Selected Column in ASP.NET GridView

    - by jp2code
    I'm trying to modify a stored procedure used in an ASP.NET page. By default, the stored procedure returns all of the data, which can be overwhelming for employees in the plant. I want to add a drop down menu item for the column name and a text box for a value to allow our employees to search the data for their specific items. What I would like to add is the ability to pass in a Column Name and Column Value to search, similar to the following: DECLARE @colName nVarChar(50), @colValue nVarChar(50) SET @colName='EmployeeID' SET @colValue='007135' SELECT Column1, Column2, Column3, Column4, Column5, Column6, Column7 FROM viewNum1 WHERE ((@colName IS NULL) OR (@colValue IS NULL) OR ('['+@colName+']'=@colValue)) If all values passed in (@colValue and @colName), all records return; however, if I try specifying that @colName=EmployeeID and @colValue='007135' (a value that does exist in the database), no records are returned. Next is the problem that I am running an old SQL Server 2000 database that does not allow the stored procedure to access the table column names, and the whole technique looks prone to SQL Injection. Finally, I don't see how to bind my GridView control to this and still have the ability to display all records. How would I write such a filtering stored procedure?

    Read the article

  • Line by line image swing

    - by user1046017
    I want to show an image as it is downloading, I have the URL, and I am trying to get the image parts like this: InputStream openStream = url.openStream(); DataInputStream dis = new DataInputStream(new BufferedInputStream(openStream)); ByteArrayOutputStream os = new ByteArrayOutputStream(); while ((s = dis.read(b)) != -1) { os.write(b , 0, s); support.firePropertyChange("stream", null, os); } This way, any listener get the stream and creates an image, this way: if("stream".equals(evt.getPropertyName())){ try { ByteArrayOutputStream stream = (ByteArrayOutputStream) evt.getNewValue(); byte[] byteArray = stream.toByteArray(); stream.flush(); Image createImage = Toolkit.getDefaultToolkit().createImage(byteArray); this.getContentPane().add(new JLabel(new ImageIcon(createImage))); } catch (IOException ex) { Logger.getLogger(ImageTest.class.getName()).log(Level.SEVERE, null, ex); } } However, I am getting a "Premature end of JPEG file sun.awt.image.ImageFormatException: JPEG datastream contains no image" error, the image is a JPG image format, is there any library or method known to make something similar?

    Read the article

  • how to implement a "soft barrier" in multithreaded c++

    - by Jason
    I have some multithreaded c++ code with the following structure: do_thread_specific_work(); update_shared_variables(); //checkpoint A do_thread_specific_work_not_modifying_shared_variables(); //checkpoint B do_thread_specific_work_requiring_all_threads_have_updated_shared_variables(); What follows checkpoint B is work that could have started if all threads have reached only checkpoint A, hence my notion of a "soft barrier". Typically multithreading libraries only provide "hard barriers" in which all threads must reach some point before any can continue. Obviously a hard barrier could be used at checkpoint B. Using a soft barrier can lead to better execution time, especially since the work between checkpoints A and B may not be load-balanced between the threads (i.e. 1 slow thread who has reached checkpoint A but not B could be causing all the others to wait at the barrier just before checkpoint B). I've tried using atomics to synchronize things and I know with 100% certainty that is it NOT guaranteed to work. For example using openmp syntax, before the parallel section start with: shared_thread_counter = num_threads; //known at compile time #pragma omp flush Then at checkpoint A: #pragma omp atomic shared_thread_counter--; Then at checkpoint B (using polling): #pragma omp flush while (shared_thread_counter > 0) { usleep(1); //can be removed, but better to limit memory bandwidth #pragma omp flush } I've designed some experiments in which I use an atomic to indicate that some operation before it is finished. The experiment would work with 2 threads most of the time but consistently fail when I have lots of threads (like 20 or 30). I suspect this is because of the caching structure of modern CPUs. Even if one thread updates some other value before doing the atomic decrement, it is not guaranteed to be read by another thread in that order. Consider the case when the other value is a cache miss and the atomic decrement is a cache hit. So back to my question, how to CORRECTLY implement this "soft barrier"? Is there any built-in feature that guarantees such functionality? I'd prefer openmp but I'm familiar with most of the other common multithreading libraries. As a workaround right now, I'm using a hard barrier at checkpoint B and I've restructured my code to make the work between checkpoint A and B automatically load-balancing between the threads (which has been rather difficult at times). Thanks for any advice/insight :)

    Read the article

  • Audio Detection in Matlab

    - by insane-36
    I am writing a matlab code that would be able to read the audio file and then compare it to the another audio and recognize if those audio are the voice of the same person. In both type of the audio, would have the same word utterance and the audio is about 1 minutes long. I have come to know that the approach of sliding windows using hamming window would work best on this approach but have a very little idea on this. The simple code to read an audio file and then display a portion of 10s is as below : [x,fs, nbits]= wavread('01-AudioTrack 01.wav'); subplot(211) plot(x) title('Entire Wave') smallRange = 1:100000; subplot(212) plot(smallRange,x(smallRange)) How do I make Hamming window each of 10ms in this case and what approaches should I take to deal with this problem ?

    Read the article

  • Confusion with a while statement evaluating if a number is triangular

    - by Darkkurama
    I've been having troubles trying to figure out how to solve a function. I've been assigned the development of a little programme which tells if a number is "triangular" (a number is triangular when the addition of certain consecutive numbers in the [1,n] interval is n. Following the definition, the number 10 is triangular, because in the [1,10] interval, 1+2+3+4=10). I've coded this so far: class TriangularNumber{ boolean numTriangular(int n) { boolean triangular = false; int i = n; while(n>=0 && triangular){ //UE06 is a class which contains the function "f0", which makes the addition of all the numbers in a determined interval UE06 p = new UE06(); if ((p.f0(1, i))==n) triangular = true; else i=i-1; } return triangular; } boolean testTriangular = numTriangular(10) == true && numTriangular(7) == false && numTriangular(6) == true; public static void main(String[] args){ TriangularNumber p = new TriangularNumber(); System.out.println("testTriangular = " + p.testTriangular); } } According to those boolean tests I made, the function is wrong. As I see the function, it goes like this: I state that the input number in the initial state isn't triangular (triangular=false) and i=n (determining the interval [1,i] where the function is going to be evaluated While n is greater or equals 0 and the number isn't triangular, the loop starts The loop goes like this: if the addition of all the numbers in the [1,i] interval is n, the number is triangular, causing the loop to end. If that statement is false, i goes from i to (i-1), starting the loop again with that particular interval, and so on till the addition is n. I can't spot the error in my "algorithm", any advice? Thanks!

    Read the article

  • Can a SQL Server 2008 database support both a REST and SOAP web services within two different endpoints?

    - by PaulDecember
    Say you have a SQL Server 2008 database. You build a SOAP web service. You then deploy or publish this using Visual Studio 2010 in one website. Now, using the same database, you build a REST web service, in a different solution. You deploy this on another website. Can you consume the endpoints and/or .svc file of both the SOAP and REST web services, though they reference the same SQL Server 2008 database? I don't see why not, but before I go down this path and spend days I'd like to make sure. Also if there's a performance hit to the database if it is running both SOAP and REST at the same time--again, I don't see why it would matter, but I must make sure. Thanks.

    Read the article

  • how to format a date with code igniter

    - by Jeff Davidson
    I'm trying to figure out what I'm doing wrong here. I'm wanting to format the date_published field in my query and I'm getting an t_string syntax error in my IDE. $this->db->select('site_news_articles.article_title, site_news_articles.is_sticky,' date_format('site_news_articles.date_published, 'f jS, Y')'); UPDATE: function getNewsTitles($category_id) { $this->db->select('site_news_articles.article_title, site_news_articles.is_sticky'); $this->db->select("DATE_FORMAT(site_news_articles.date_published, '%M %e, %Y') as formatted_date", TRUE); $this->db->from('site_news_articles'); $this->db->where('site_news_articles.news_category_id', $category_id); $this->db->where('site_news_articles.is_approved', 'Yes'); $this->db->where('site_news_articles.status_id', 1); $this->db->order_by('site_news_articles.date_published', 'desc'); $this->db->limit(10); $query = $this->db->get(); return $query->result_array(); } Error Number: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM (site_news_articles) WHERE site_news_articles.news_category_id = 2 A' at line 2 SELECT site_news_articles.article_title, site_news_articles.is_sticky, DATE_FORMAT(site_news_articles.date_published, '%M %e, %Y') as formatted_date FROM (site_news_articles) WHERE site_news_articles.news_category_id = 2 AND site_news_articles.is_approved = 'Yes' AND site_news_articles.status_id = 1 ORDER BY site_news_articles.date_published desc LIMIT 10 Filename: /home/xtremer/public_html/models/sitemodel.php Line Number: 140

    Read the article

  • How to break out of a loop depending on a CheckBox Checked value while the loop is running?

    - by Rayner Vaz
    Lets say I want to call a function repeatedly if the user selects a CheckBox named "repeat" but the calls to the function should stop as soon as the user 'unchecks' the CheckBox. I tried using the 'Checked', 'Click' and 'Tap' event of the CheckBox but once the loop starts, it does not sense any changes in the checkbox's state. I even tried using a loop inside another button's _Click method, but then that creates a lock on the Button's 'pressed' state. Any ideas/alternate suggestions?

    Read the article

  • different location of AndroidManifest.xml

    - by didito
    i have a custom buildchain for an android project. there is a build.xml and build.properties. build.properties contains this line: manifest.file =${env.WORK_FOLDER}/AndroidManifest.xml and WORK_FOLDER is correctly set to proj_root_work. the layout is like the following: proj_root-_work [DIR] (some stuff gets preprocessed and all finally copied here - src, res, assets and the AndroidManifest.xml) -build.xml -build.properties then i call ant for my build configuration from the proj_root and it complains about not finding AndroidManifest.xml. when i put it in my proj_root it works, but i really want it in my _Work directory. i read that the file HAS TO BE in the root, what is the point then of the build.properties entry? also i saw some custom parameters to aapt.exe ... any hints welcome, thx

    Read the article

  • Javascript string syntax to write SQL

    - by sebastien leblanc
    I am writing an SQL query as a Javascript string like that: SQLdetail = 'SELECT [Avis SAP], Avis.[Ordre SAP], [Date Appel], [Heur Appel], Client_List![Code Client], [Numero Passerelle], [Designation Appel], Ordre![Metier], Ordre!Repercussion, Ordre!Objet, Ordre![Profil Panne], Ordre!Cause, Ordre![Sommaire Correctif], Ordre![Statut]' SQLdetail += ' FROM (Avis' SQLdetail += ' LEFT JOIN Client_List ON Avis.[Numero Client] = Client_List.[Numero Client])' SQLdetail += ' LEFT JOIN Ordre ON Avis.[Ordre SAP] = Ordre.[Ordre SAP] WHERE Avis.[Date Appel] BETWEEN #' & DateOne & '# AND #' & DateTwo & '#;' alert('SQLdetail:' + SQLdetail) and the last SQLdetail += somehow returns "0". Am I missing something in the syntax that just turns the whole string to a 0?

    Read the article

  • How to get rid of the following multiple alternatives warnings in my ANTLR3 grammar?

    - by Jarrod Roberson
    [11:45:19] warning(200): mygrammar.g:14:57: Decision can match input such as "','" using multiple alternatives: 1, 2 As a result, alternative(s) 2 were disabled for that input [11:45:19] warning(200): C:\Users\Jarrod Roberson\mygrammar.g:14:57: Decision can match input such as "','" using multiple alternatives: 1, 2 As a result, alternative(s) 2 were disabled for that input I want to be able to nest functions inside other functions. myfunction(x) -> sqr(a) -> a * a, y = sqr(x). here is the line it is complaining about function : ID '(' args ')' '->' statement (',' statement)* ; and here is what it is considering the alternative statement : ATOM | expression | assignment | function ; Here is what the synatx diagram looks like in ANTLRWorks I really like things to compile/work without any warnings. How do I resolve this warning condition?

    Read the article

  • Automated Testing tools for HTML5 Canvas

    - by user432195
    I'm looking for a tool to do some automated GUI testing on a HTML5 canvas component we're developing. Basically I'm looking for a tool that is able to record the clicks and events on the canvas component and is able to replay those events. So far most of the testing tools like Telerik WebUI Testing Suite, Selenium, TestSwarm, qUnit, Jasmine, Hudson seems that they don't fully support HTML5 canvas testing. Would you guys know a testing tool that already supports that ? If not, would you know how companies are doing automated testing of HTML5 canvas ? Thanks, Andy N.

    Read the article

  • Javascript how to split newline

    - by oknoorap
    I'm use jquery, and I have a textarea, so when I submit button I will alert every text separate by newline. How to split from newline? var ks = $('#keywords').val().split("\n"); (function($){ $(document).ready(function(){ $('#data').submit(function(e){ e.preventDefault(); alert(ks[0]); $.each(ks, function(k){ alert(k); }); }); }); })(jQuery); example input : Hello There Result I want is : alert(Hello); and alert(There)

    Read the article

  • how to configure jetty 7 to use syslog or log4j

    - by egemen ozden
    I am looking for a way to direct all the jetty 7 logging to syslog. My current configuration dumps everything to JETTY_HOME/logs/.. After some initial ivestigation, it seems I should change JETTY_HOME/etc/jetty-logging.xml, but this does not look straightforward. It looks like I should create a new PrintStream implementation which sends its output to syslog and redirecting stderr and stdout to that class in jetty-logging.xml. any easier way to do that or to make jetty log directly to log4j ? Thanks

    Read the article

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