Search Results

Search found 23435 results on 938 pages for 'i give terrible advice'.

Page 32/938 | < Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >

  • MySQL query advice

    - by vasion
    I am lost in MySQL documentation. I have a table with votes - it has these columns id song_id user_id created I cannot find the query which will process the information and output the 10 most voted songs in a given time period. What is it?

    Read the article

  • Hide segment in URL but give code access to hidden segment

    - by Brandon Durham
    I'm using Structure and have a "Supernav" page with multiple children that will make up the supernav for the site. I thought this would be a nice way to have all pages on the site accessible to the client via one location: the Structure UI. If you visit any of the child pages in the "supernav" group the URL comes out like this: http://website.com/supernav/prospective-students I'd love to be able to remove the supernav segment of those URLs so that it ends up being: http://website.com/prospective-students I don't even want the supernav segment to appear in the status bar when you hover over these links on the page. Is this possible? With CodeIgniter this comes down to a simple routing rule, but I don't know if that's an option with EE. Appreciate any help I can get!

    Read the article

  • An advice for a specific kind of RRDtool graph

    - by Stanislav
    Hello, I'm trying to graph some data with RRDtool and I have problems with defining the exact graph command. The kind of graph I want is something like this: http://oss.oetiker.ch/rrdtool/gallery/gate.spamd.week.600.png - the blue graph. I can not "cook up" the definition for creating a graph like the one which is light blue and is on the background. It's a something between a line and an area :) . Any ideas what can I try? Thank you in advance!

    Read the article

  • Advice for Architecture Design Logic for software application

    - by Prasad
    Hi, I have a framework of basic to complex set of objects/classes (C++) running into around 500. With some rules and regulations - all these objects can communicate with each other and hence can cover most of the common queries in the domain. My Dream: I want to provide these objects as icons/glyphs (as I learnt recently) on a workspace. All these objects can be dragged/dropped into the workspace. They have to communicate only through their methods(interface) and in addition to few iterative and conditional statements. All these objects are arranged finally to execute a protocol/workflow/dataflow/process. After drawing the flow, the user clicks the Execute/run button. All the user interaction should be multi-touch enabled. The best way to show my dream is : Jeff Han's Multitouch Video. consider Jeff is playing with my objects instead of the google maps. :-) it should be like playing a jigsaw puzzle. Objective: how can I achieve the following while working on this final product: a) the development should be flexible to enable provision for web services b) the development should enable easy web application development c) The development should enable client-server architecture - d) further it should also enable mouse based drag/drop desktop application like Adobe programs etc. I mean to say: I want to economize on investments. Now I list my efforts till now in design : a) Created an Editor (VB) where the user writes (manually) the object / class code b) On Run/Execute, the code is copied into a main() function and passed to interpreter. c) Catch the output and show it in the console. The interpreter can be separated to become a server and the Editor can become the client. This needs lot of standard client-server architecture work. But some how I am not comfortable in the tightness of this system. Without interpreter is there much faster and better embeddable solution to this? - other than writing a special compiler for these objects. Recently learned about AXIS-C++ can help me - looks like - a friend suggested. Is that the way to go ? Here are my questions: (pl. consider me a self taught programmer and NOT my domain) a) From the stage of C++ objects to multi-touch product, how can I make sure I will develop the parallel product/service models as well.? What should be architecture aspects I should consider ? b) What technologies are best suited for this? c) If I am thinking of moving to Cloud Computing, how difficult/ how redundant / how unnecessary my efforts will be ? d) How much time in months would it take to get the first beta ? I take the liberty to ask if any of the experts here are interested in this project, please email me: [email protected] Thank you for any help. Looking forward.

    Read the article

  • Advice about insert into SQLCE

    - by Alexander
    i am inserting about 1943 records by these function into SQLCE.This is my insert function.Parameters come from StringReader(string comes from webservice).This function executes 1943 times and takes about 20 seconds.I dropped table's indexes,what can i do to improve it?I create just 1 time mycomm and sqlceresultset. Public Function Insert_Function(ByVal f_Line() As String, ByRef myComm As SqlCeCommand, ByRef rs As SqlCeResultSet) As String Try Dim rec As SqlCeUpdatableRecord = rs.CreateRecord() rec.SetInt32(0, IIf(f_Line(1) = "", DBNull.Value, f_Line(1))) rec.SetInt32(1, IIf(f_Line(2) = "", DBNull.Value, f_Line(2))) rec.SetInt32(2, IIf(f_Line(3) = "", DBNull.Value, f_Line(3))) rec.SetInt32(3, IIf(f_Line(4) = "", DBNull.Value, f_Line(4))) rec.SetValue(4, IIf(f_Line5(5) = "", DBNull.Value, f_Line(5))) rs.Insert(rec) rec = Nothing Catch ex As Exception strerr_col = ex.Message End Try Return strerr_col End Function

    Read the article

  • JavaCC: Please give me links to "real" examples.

    - by java.is.for.desktop
    Hello, everyone! I know that there are many examples of JavaCC parsers here, but they all do nothing. They just accept a string, or produce parsing errors. What I need is a few examples of real parsers, which actually do something during parsing. (Such as building a DOM tree during parsing an XML string). Please help! ;)

    Read the article

  • advice on working on remote asp.net applications

    - by Jonesy
    Hi folks, I'm a (relatively new) developer using asp.net with VB.NET. Currently all my applications are developed on my PC and then are built and moved onto the web server. I'm going to be working remotely for 3 months in which time I'll be connecting to the company network via VPN. What is the best way to access my projects? I need to have the projects stored on the company network so that others can access them too. So simply copying the projects to my laptop, working on them, then copying them back won't suffice. I tried to just open the projects off of the network share but am getting application trust problems. I'm just wondering what other developers do in this situation? Jonesy

    Read the article

  • Array sorting efficiency... Beginner need advice

    - by SoleSoft
    I'll start by saying I am very much a beginner programmer, this is essentially my first real project outside of using learning material. I've been making a 'Simon Says' style game (the game where you repeat the pattern generated by the computer) using C# and XNA, the actual game is complete and working fine but while creating it, I wanted to also create a 'top 10' scoreboard. The scoreboard would record player name, level (how many 'rounds' they've completed) and combo (how many buttons presses they got correct), the scoreboard would then be sorted by combo score. This led me to XML, the first time using it, and I eventually got to the point of having an XML file that recorded the top 10 scores. The XML file is managed within a scoreboard class, which is also responsible for adding new scores and sorting scores. Which gets me to the point... I'd like some feedback on the way I've gone about sorting the score list and how I could have done it better, I have no other way to gain feedback =(. I know .NET features Array.Sort() but I wasn't too sure of how to use it as it's not just a single array that needs to be sorted. When a new score needs to be entered into the scoreboard, the player name and level also have to be added. These are stored within an 'array of arrays' (10 = for 'top 10' scores) scoreboardComboData = new int[10]; // Combo scoreboardTextData = new string[2][]; scoreboardTextData[0] = new string[10]; // Name scoreboardTextData[1] = new string[10]; // Level as string The scoreboard class works as follows: - Checks to see if 'scoreboard.xml' exists, if not it creates it - Initialises above arrays and adds any player data from scoreboard.xml, from previous run - when AddScore(name, level, combo) is called the sort begins - Another method can also be called that populates the XML file with above array data The sort checks to see if the new score (combo) is less than or equal to any recorded scores within the scoreboardComboData array (if it's greater than a score, it moves onto the next element). If so, it moves all scores below the score it is less than or equal to down one element, essentially removing the last score and then places the new score within the element below the score it is less than or equal to. If the score is greater than all recorded scores, it moves all scores down one and inserts the new score within the first element. If it's the only score, it simply adds it to the first element. When a new score is added, the Name and Level data is also added to their relevant arrays, in the same way. What a tongue twister. Below is the AddScore method, I've added comments in the hope that it makes things clearer O_o. You can get the actual source file HERE. Below the method is an example of the quickest way to add a score to follow through with a debugger. public static void AddScore(string name, string level, int combo) { // If the scoreboard has not yet been filled, this adds another 'active' // array element each time a new score is added. The actual array size is // defined within PopulateScoreBoard() (set to 10 - for 'top 10' if (totalScores < scoreboardComboData.Length) totalScores++; // Does the scoreboard even need sorting? if (totalScores > 1) { for (int i = totalScores - 1; i > - 1; i--) { // Check to see if score (combo) is greater than score stored in // array if (combo > scoreboardComboData[i] && i != 0) { // If so continue to next element continue; } // Check to see if score (combo) is less or equal to element 'i' // score && that the element is not the last in the // array, if so the score does not need to be added to the scoreboard else if (combo <= scoreboardComboData[i] && i != scoreboardComboData.Length - 1) { // If the score is lower than element 'i' and greater than the last // element within the array, it needs to be added to the scoreboard. This is achieved // by moving each element under element 'i' down an element. The new score is then inserted // into the array under element 'i' for (int j = totalScores - 1; j > i; j--) { // Name and level data are moved down in their relevant arrays scoreboardTextData[0][j] = scoreboardTextData[0][j - 1]; scoreboardTextData[1][j] = scoreboardTextData[1][j - 1]; // Score (combo) data is moved down in relevant array scoreboardComboData[j] = scoreboardComboData[j - 1]; } // The new Name, level and score (combo) data is inserted into the relevant array under element 'i' scoreboardTextData[0][i + 1] = name; scoreboardTextData[1][i + 1] = level; scoreboardComboData[i + 1] = combo; break; } // If the method gets the this point, it means that the score is greater than all scores within // the array and therefore cannot be added in the above way. As it is not less than any score within // the array. else if (i == 0) { // All Names, levels and scores are moved down within their relevant arrays for (int j = totalScores - 1; j != 0; j--) { scoreboardTextData[0][j] = scoreboardTextData[0][j - 1]; scoreboardTextData[1][j] = scoreboardTextData[1][j - 1]; scoreboardComboData[j] = scoreboardComboData[j - 1]; } // The new number 1 top name, level and score, are added into the first element // within each of their relevant arrays. scoreboardTextData[0][0] = name; scoreboardTextData[1][0] = level; scoreboardComboData[0] = combo; break; } // If the methods get to this point, the combo score is not high enough // to be on the top10 score list and therefore needs to break break; } } // As totalScores < 1, the current score is the first to be added. Therefore no checks need to be made // and the Name, Level and combo data can be entered directly into the first element of their relevant // array. else { scoreboardTextData[0][0] = name; scoreboardTextData[1][0] = level; scoreboardComboData[0] = combo; } } } Example for adding score: private static void Initialize() { scoreboardDoc = new XmlDocument(); if (!File.Exists("Scoreboard.xml")) GenerateXML("Scoreboard.xml"); PopulateScoreBoard("Scoreboard.xml"); // ADD TEST SCORES HERE! AddScore("EXAMPLE", "10", 100); AddScore("EXAMPLE2", "24", 999); PopulateXML("Scoreboard.xml"); } In it's current state the source file is just used for testing, initialize is called within main and PopulateScoreBoard handles the majority of other initialising, so nothing else is needed, except to add a test score. I thank you for your time!

    Read the article

  • Related objects in reportingviewer 10.0.0.0 give #error

    - by Bart-Jan Poirot
    In my VB.net apps i make use of Linq2SQL and Reportviewer with RDLC reports. With Visual Studio 2010 they upgraded this reportviewer component so you can use the newer RDL specification from 2008. Now I've a problem to show related objects. For example assume you provide an order to the datasource of the report and then you can show something like Fields!Customer.Value.Name where Customer is a related entity. I also got the error in my immediate window: *Warning: The Value expression for the textrun ‘Name_1.Paragraphs[0].TextRuns[0]’ contains an error: The specified operation is not valid. (rsRuntimeErrorInExpression)*

    Read the article

  • SQL Table Setup Advice

    - by Ozzy
    Hi all. Basically I have an xml feed from an offsite server. The xml feed has one parameter ?value=n now N can only be between 1 and 30 What ever value i pick, there will always be 4000 rows returned from the XML file. My script will call this xml file 30 times for each value once a day. So thats 120000 rows. I will be doing quite complicated queries on these rows. But the main thing is I will always filter by value first so SELECT * WHERE value = 'N' etc. That will ALWAYS be used. Now is it better to have one table where all 120k rows are stored? or 30 tables were 4k rows are stored? EDIT: the SQL database in question will be MySQL

    Read the article

  • How to give an error when no options are given with optparse

    - by Acorn
    I'm try to work out how to use optparse, but I've come to a problem. My script (represented by this simplified example) takes a file, and does different things to it depending on options that are parsed to it. If no options are parsed nothing is done. It makes sense to me that because of this, an error should be given if no options are given by the user. I can't work out how to do this. Am I using options in the wrong way? If so, how should I be doing it instead? #!/usr/bin/python from optparse import OptionParser dict = {'name': foo, 'age': bar} parser = OptionParser() parser.add_option("-n", "--name", dest="name") parser.add_option("-a", "--age", dest="age") (options, args) = parser.parse_args() if options.name: dict['name'] = options.name if options.age: dict['age'] = options.age print dict #END

    Read the article

  • Take Current Snapshot of DB and send it to FTP in same PHP Scripts: Advice Needed

    - by Rachel
    Not sure if I can do it this way. I want to get current snapshot of the database and send it via FTP Server, both of this functionality should be implemented in PHP scripts. Here are the steps I am thinking on right now. In my php scripts(basically am extending an PDO into my Dao class and then preparing the query), $qry = SELECT * FROM MyTablename; $stmt = $this->prepare($qry); $stmt = $this->execute(); Now I will store $stmt in csv file using fputcsv or I will execute the sql command from the script itself and than try to store the result in the $file(csv file) note here that I do not have any csv file with me at this point to basically I will have to create one and let's say its $file, so then $file = fputcsv($stmt); or $file = exec("Select * from MyTablename"); Will this put all records in the file ? If yes, then I will use FTP Functionality to transfer file to the FTP Folder. I am not sure if this approach would work and also have concerns regarding the need of preparing the $qry Any suggestions or different approach advised would be highly appreciated. Thanks !!!

    Read the article

  • Issue while trying to give a floating effect to a footer bar in IE

    - by Shailesh
    Hi, I'm trying to put a footer bar at the bottom of the browser no matter what the length of the content is. The footer bar should always be visible to the user and should be on the top layer. Following is my code: <html> <head> <style type="text/css"> #wrapper { width: 910px; margin: 0 auto; padding: 0px 20px 50px 20px; text-align: left; } #footer-wrapper { -moz-background-clip:border; -moz-background-inline-policy:continuous; -moz-background-origin:padding; bottom:0; clear:both; font-size:11px !important; left:0; position:fixed; white-space:nowrap; width:100%; z-index:8000; } </style> <script> var counter = 0; function addContent(ctr) { document.getElementById(ctr).innerHTML=document.getElementById (ctr).innerHTML+" dynaContent"+counter; counter++; } </script> </head> <body> <div> <div><input type="button" onclick="addContent('wrapper')" value="Add dynaContent" /></div> <div id="wrapper" style="color:#FFFFFF; background-color: #111111;"> STATIC TEXT - HEADER-WRAPPER </div> <div style="color:#FFFFFF;background-color: #555555;">STATIC TEXT - FOOTER-WRAPPER</div> </div> </body> </html> It's working fine in Mozilla Firefox and giving the intended results, but, in IE, the footer bar always sticks just under the header. Please help. Thanks in advance, Shailesh.

    Read the article

  • Give me a practical use-case of Multi-set

    - by Calm Storm
    I would like to know a few practical use-cases (if they are not related/tied to any programming language it will be better).I can associate Sets, Lists and Maps to practical use cases. For example if you wanted a glossary of a book where terms that you want are listed alphabetically and a location/page number is the value, you would use the collection TreeMap(OrderedMap which is a Map) Somehow, I can't associate MultiSets with any "practical" usecase. Does someone know of any uses? http://en.wikipedia.org/wiki/Multiset does not tell me enough :) PS: If you guys think this should be community-wiki'ed it is okay. The only reason I did not do it was "There is a clear objective way to answer this question".

    Read the article

  • Custom QGraphicsItems not compiling and give object is is private error

    - by bahree
    Hi, I am trying to create a Custom QGraphicsItem button as shown by Fred here. The code which he posted can be found here. The problem is when I try and compile the code I get the following two errors: /usr/include/qt4/QtGui/qgraphicsitem.h ‘QGraphicsItem::QGraphicsItem(const QGraphicsItem&)’ is private /usr/include/qt4/QtCore/qobject.h ‘QObject::QObject(const QObject&)’ is private Here is the code snippet which essentially is the same as that in the sample above. The error is on the class deceleration. class MyButton : public QObject, public QGraphicsItem { Q_OBJECT Q_INTERFACES(QGraphicsItem) public: MyButton(QGraphicsItem *parent = 0); MyButton(const QString normal, const QString pressed = "", QGraphicsItem *parent = 0); .... } Interestingly the other sample as shown here works fine. The sample code for that can be found here. Any idea what is wrong? Thanks in advance.

    Read the article

  • How to give weight to full matches over partial matches (PostgreSQL)

    - by kagaku
    I've got a query that takes an input searches for the closet match in zipcode/region/city/metrocode in a location table containing a few tens of thousands of entries (should be nearly every city in the US). The query I'm using is: select metrocode, region, postalcode, region_full, city from dv_location where ( region ilike '%Chicago%' or postalcode ilike '%Chicago%' or city ilike '%Chicago%' or region_full ilike'%Chicago%' ) and metrocode is not null Odd thing is, the results set I'm getting back looks like this: metrocode;region;postalcode;region_full;city 862;CA;95712;California;Chicago Park 862;CA;95712;California;Chicago Park 602;IL;60611;Illinois;Chicago 602;IL;60610;Illinois;Chicago What am I doing wrong? My thinking is that Chicago would have greater weight than Chicago Park since Chicago is an exact match to the term (even though I'm asking for a wildcard match on the term).

    Read the article

  • Hibernate Bi- Directional many to many mapping advice!

    - by Rob
    hi all, i woundered if anyone might be able to help me out. I am trying to work out what to google for (or any other ideas!!) basically i have a bidirectional many to many mapping between a user entity and a club entity (via a join table called userClubs) I now want to include a column in userClubs that represents the role so that when i call user.getClubs() I can also work out what level access they have. Is there a clever way to do this using hibernate or do i need to rethink the database structure? Thank you for any help (or just for reading this far!!) the user.hbm.xml looks a bit like <set name="clubs" table="userClubs" cascade="save-update"> <key column="user_ID"/> <many-to-many column="activity_ID" class="com.ActivityGB.client.domain.Activity"/> </set> the activity.hbm.xml part <set name="members" inverse="true" table="userClubs" cascade="save-update"> <key column="activity_ID"/> <many-to-many column="user_ID" class="com.ActivityGB.client.domain.User"/> </set> The current userClubs table contains the fields id | user_ID | activity_ID I would like to include in there id | user_ID | activity_ID | role and be able to access the role on both sides...

    Read the article

  • Need advice on comparing the performance of 2 equivalent linq to sql queries

    - by uvita
    I am working on tool to optimize linq to sql queries. Basically it intercepts the linq execution pipeline and makes some optimizations like for example removing a redundant join from a query. Of course, there is an overhead in the execution time before the query gets executed in the dbms, but then, the query should be processed faster. I don't want to use a sql profiler because I know that the generated query will be perform better in the dbms than the original one, I am looking for a correct way of measuring the global time between the creation of the query in linq and the end of its execution. Currently, I am using the Stopwatch class and my code looks something like this: var sw = new Stopwatch(); sw.Start(); const int amount = 100; for (var i = 0; i < amount; i++) { ExecuteNonOptimizedQuery(); } sw.Stop(); Console.Writeline("Executing the query {2} times took: {0}ms. On average, each query took: {1}ms", sw.ElapsedMilliseconds, sw.ElapsedMilliseconds / amount, amount); Basically the ExecutenNonOptimizedQuery() method creates a new DataContext, creates a query and then iterates over the results. I did this for both versions of the query, the normal one and the optimized one. I took the idea from this post from Frans Bouma. Is there any other approach/considerations I should take? Thanks in advance!

    Read the article

  • Advice and resources for Apple iOS 4 development

    - by mlambie
    I'm looking for resources, screencasts, books, courses, sites and the like to assist with learning Objective-C with the intention of developing applications for Apple's iOS 4. My development team has access to Apple's development program, and is largely coming from a similar background: they're Comp Sci graduates that have experience with Ruby and web languages, but haven't written any C since university. Considering Apple's announcement regarding limited programming language support for developers, what's the current best avenue for learning Objective-C with the desire for developing iPad and iPhone applications?

    Read the article

  • Porting Java app to Go - any advice?

    - by Devrim
    We want to rewrite kodingen.com backend with Go which currently is Java, running as daemon using jsvc. I have never touched any C in my life, am only experienced in Java so I don't know if this is something that I should even start. However, task is pretty simple read shell commands from mysql database queue and execute them in parallel save each shell output to the database that's it. So these simple requirements gives me hope that I can start using this wonderful language. What would you advise?

    Read the article

  • Triggers in Entity Framework - Need advice

    - by jaklucky
    Hi all, I am new to Entity Framework and please pardon my ignorance. We have a simple application written using SQL Server and ADO.Net. Now we have got a new requirement that, whenever a particular rows get updated by our application, some business logic has to happen. I have been looking into Triggers in SQL server and it looks like we can do it using triggers. I am also looking at Entity Framework's OnPropertyChange capability. Is it possible to do it with "OnPropertyChange"? I mean, Can I create a model and implement "OnPropertyChange" method? And when our application modifies the rows using ADO.Net, then will it fire "OnPropertyChange" event so that my custome code in "OnPropertyChange" excutes? Thank you in advance for your inputs, Suresh

    Read the article

  • How to give xpath expression in java using axiom

    - by user1811206
    <resource name="cde.xml" status="updated" isCollection="false"> <mediaType>xml</mediaType> <creator>admin</creator> <createdTime>1352783477964</createdTime> <lastUpdater>admin</lastUpdater> <lastModified>1352783477964</lastModified> <description /> <version>0</version> <content>ZGFza2QgbGQgbGt2Zmx3ZGFzamQgYWRsa2ogYWxramRrbGEgamQK </content> </resource> i want to catch nodes which are having status using xpath here is the xpath expression other part of the code is correct. I have problem with xpath expression AXIOMXPath xpathExpression = new AXIOMXPath ( "//resourse[@name]");

    Read the article

< Previous Page | 28 29 30 31 32 33 34 35 36 37 38 39  | Next Page >