Search Results

Search found 31774 results on 1271 pages for 'chris go'.

Page 35/1271 | < Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >

  • building an ASP NET MVC site, should i go with linq to sql?

    - by aspm
    so i'm about to start a new website from scratch and i've spent about a week trying to figure out what technology to go with. i'm sold on ASP NET MVC. i'm 100% sure i'm going to love using that. but what i am not so sure about yet is using LINQ 2 SQL. so far i've gathered some data... 1) stack overflow uses it - can't be that bad 2) can be REALLY slow if you don't take advantage of compiled queries 3) will always be slower than ADO net, but can be almost just as fast if using #2 in the proper places 4) is NOT the preferred MS solution (there was a thread here on SO about dropping support) i'm itching to use it, but just want to make sure it's the best for me. i come from a heavy ADO/stored procedure and traditional asp net background (this will be my first experience with ASP MVC).

    Read the article

  • How would I go about implementing a stopwatch with different speeds?

    - by James
    Ideally I would like to have something similar to the Stopwatch class but with an extra property called Speed which would determine how quickly the timer changes minutes. I am not quite sure how I would go about implementing this. Edit Since people don't quite seem to understand why I want to do this. Consider playing a soccer game, or any sport game. The halfs are measured in minutes, but the time-frame in which the game is played is significantly lower i.e. a 45 minute half is played in about 2.5 minutes.

    Read the article

  • Can you recommend wiki, forum, blog & cms plugins for an existing Rails app or should I go the route

    - by Nick Gorbikoff
    Hello. I have an existing Rails internal app, that handles inventory, invoicing, order taking, labeling, data imports/exports, etc, etc. Now I need to add blog, cms, forum and wiki functionality to it. It seems silly to try to roll out my own solutions when there are already some out there. So I was wondering if people could recommend based on their experience: Are there good plugins out there? (Which ones you had experience with?) Would you rather recommend to go the route of engines, and integrate RadiantCMS or similar apps? (please provide recommendations based on your integration experience) Or would you just bite the bullet and roll out your own? Thank you. P.S.: Right now the app is Rails 2.3, but it will get upgraded to Rail 3 in a year, when most gems/plugins that it depends on will be Rails 3 compatible.

    Read the article

  • How to go through every record in sqllite db?

    - by Pavel
    Hi guys. I think it's kinda easy one but still I'm new to android programming so please have patience. I want to know how can I get the number of records (rows) in a specific table in my db. I need this so I can create a loop to go through every record and add each one of it to the specific Array and display it later on. This is the source: db.openDataBase(); // open connection with db Cursor c = db.getTitle(5); // loop here through db, right now I'm fetching only one record startManagingCursor(c); //adding areas to the list here Area o1 = new Area(); o1.setOrderName(c.getString(1) + c.getString(2)); m_areas.add(o1); db.close(); Does anyone can help me with this please? Thx in advance!

    Read the article

  • Struts. Go back to same page after an action

    - by framara
    Hi there, my situation is the following: I have a project with JSP, Struts and a lot of actions. Lets say that I have these 3 main groups {contacts.do, calendar.do and notes.do} with lot of actions in each of them. I have an action unrelated to all of them but since I didn't know where to put it I just chose contacts. My aim is after the action, to go back to the page I was but since the action is place in contacts it returns to the default action of contacts. Is there anything I could do for this purpose? Thank you.

    Read the article

  • Drupal 6: using too many Views module causing site to go down cos of too many mysql connection.

    - by artmania
    Hi friends, I have HostGator Baby Shared Plan . I develop Drupal site on. everything was fine at the beginning, then by the time i go further with development, site started ti work really slow. now it is not working at all. giving my sql errors like TOO many connections, etc... I created so many blocks, pages with View. so it makes my site to so much depend on database. should not I do that? can it be the reason of my site's no working now. appreciate helps!!!!

    Read the article

  • how to make a border area go around the content of a page where there is a footer fixed to the bottom of the page and an header fixed to the top

    - by user277498
    consider the following: http://jsfiddle.net/PxabT/10/ There are 3 divs hd, bd, ft. hd is fixed to the top. ft is fixed to the bottom. I want the lime colored border to go totally around the white central area without increasing the height of the ft or hd divs. How do I achieve that? Many thanks! edit: see http://jsfiddle.net/PxabT/15/ which is a step forward by changing the borders to padding.

    Read the article

  • how to go through a string array and apply functions for different strings?

    - by Newbie
    Ok, this may be really noobish question, but i am wishing there is something i dont know yet. I go through a file, and check which string each line has, depending on the string value i execute a different function for it (or functions). This is how i do it now: if(str == "something"){ // do stuff }else if(str == "something else"){ // do stuff }else if(str == "something more"){ // do stuff }else if(str == "something again"){ // do stuff }else if(str == "something different"){ // do stuff }else if(str == "something really different"){ // do stuff } I am afraid this will become "slow" after i have to repeat those else if lines a lot... I tried to use switch() statement, but obviously it doesnt work here, is there something similar to switch() to use here?

    Read the article

  • How can I make a paragraph in HTML not go on a new line?

    - by Anne
    I have the following html: <span class="icon-top-margin-4 margin-right sprite-book-open"></span> <p>Topic: No Topic Title</p> and CSS: .icon-top-margin-4 { background-color: red; content: " "; background-image: url(/Images/fugue/sprite.png); background-repeat: no-repeat; display: inline-block; height: 16px; vertical-align:bottom; width: 16px; line-height: 16px; } .sprite-book-open{ background-position: 0 -288px; } What I would like is for the paragraph to start after the icon but it starts on a new line. Is there a way that I can make it start on the same line as the icon? I did try float left on the paragraph but that makes it go before the icon.

    Read the article

  • PHP - turning register globals off, what is the best way to go about fixing the code?

    - by user187809
    I am working on a old code base, where programmers assumed that register_globals will always be on. Hence variables are used without $_GET or $_POST prefix, pretty much in every page (the code base is huge, hundreds of scripts). I tried turning it off, but the very first script (login script) goes on an infinite loop. I understand that going through one script at a time, and one line at a time and fixing the variables is probably the only option (adding the prefix $_GET or $_POST as the case may be). Has anyone does this before? How did you go about doing it? Any advice?

    Read the article

  • Artificial Intelligence Project - What language should I go for?

    - by Kremlin Yocepf
    Hi, I am a computer science student and I am going to work on an artificial intelligence project which will compose a musical tune according to the genre and mood inputs. Are the algorithms to be used for this project likely to be very resource-consuming? Would it make any difference (in terms of speed) if I choose to go with Java rather than C++? (Note : I know only these two languages and I am more comfortable with Java than C++.) NB : Sorry for my poor English. If someone can, please clean up this post wherever necessary. Thanks.

    Read the article

  • Where does the 'method' implementation go? (I'm a newbie)

    - by Spokane-Dude
    I have this code: #import "SQLiteDB.h" @implementation SQLiteDB @synthesize db, dbPath, databaseKey; @end //-------------- check for database or create it ----------------| - (void)checkForDatabase { NSFileManager *filemanager = [NSFileManager defaultManager]; NSString *databasePath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0] stringByAppendingString:@"/ppcipher.s3db"]; if(![filemanager fileExistsAtPath:databasePath]) { //Database doesn't exist yet, so we create it... NSString *defaultDBPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/ppcipher.s3db"]; sqlite3 *db; if(sqlite3_open(databasePath, db) == SQLITE_OK) { } } } It's complaining that "method definition not in @implementation context". So where does it go? (I tried in the .h file, but still get the error)

    Read the article

  • How to load the environment variables at boot time before X11 on Ubuntu Precise?

    - by Fnux
    Using Ubuntu Precise 64 bit, I'm facing a problem that I'm unable to solve and that I'll try to describe below: I'm using a console mode program (let's say abc) that uses Go, NodeJS, Java and Scala. In order for abc to work with these languages, I've to declare the following statements: a) within /etc/environment: PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin" CLASSPATH=$CLASSPATH:/usr/share/java/scala-library.jar b) within /etc/login.defs ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin ENV_PATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin c) a) within /etc/sudoers: `# env_reset Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin"` Then, when I start abc from a terminal, all is fine and I can use any of the 4 languages described above. However, if I put a script within /etc/init.d that starts abc during the boot process (i.e. before to start the GUI), using Java from abc still is fine, but using Go, NodeJS or Scala doesn't work anymore. Then, I guess that during the boot process, the script within /etc/init.d that starts abc is executed before that the different environment variables set within /etc/sudoers, /etc/environment and /etc/login.defs are loaded. So, my question is: how to force the environment variables to be loaded before that my script starting abc is launched? Any help and advice on this topic would be trully appreciated. TIA. Cheers. Thanks again to Mark and Danila. Below is the current "abc" script file that I put within /etc/init.d `#! /bin/sh ### EDIT: ADD THIS VARS DEFINITIONS: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin" CLASSPATH=$CLASSPATH:/usr/share/java/scala-library.jar "ENV_SUPATH PATH"="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin" "ENV_PATH PATH"="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin" "Defaults secure_path"="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin" ##### EXPORT this VARS so they are accessible to children:" export "PATH" "CLASSPATH" "ENV_SUPATH PATH" "ENV_PATH PATH" "Defaults secure_path" `### BEGIN INIT INFO `# Provides: abc `# Required-Start: $remote_fs $syslog `# Required-Stop: $remote_fs $syslog `# Default-Start: 2 3 4 5 `# Default-Stop: 0 1 6 `# Short-Description: abc initscript `# Description: This iniscript starts and stops abc `### END INIT INFO `# Author: Fnux, fnux.fl at gmail dot com `# Version: 1.2 `# Note: (edit ABC_PATH if abc isn't installed in /opt/abc) NAME=abc ABC_PATH=/opt/abc START="-d" STOP="-k" VERSION="-v" SCRIPTNAME=/etc/init.d/$NAME STARTMESG="\nStarting abc in deamon mode." UPMESG="\n$NAME is running." DOWNMESG="\n$NAME is not running." STATUS=`pidof $NAME` `# Exit if abc is not installed [ -x "$ABC_PATH/$NAME" ] || exit 0 case "$1" in start) echo $STARTMESG cd $ABC_PATH ./$NAME $START ;; stop) cd $ABC_PATH ./$NAME $STOP ;; status) if [ "$STATUS" > 0 ] ; then echo $UPMESG else echo $DOWNMESG fi ;; restart) cd $ABC_PATH ./$NAME $STOP echo $STARTMESG ./$NAME $START ;; version) cd $ABC_PATH ./$NAME $VERSION ;; *) echo "Usage: $SCRIPTNAME {start|status|restart|stop|version}" >&2 exit 3 ;; esac : So, where and how should I write the needed environment variables for: a) Go needs the following statements (ie: PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin" ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin ENV_PATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin `# env_reset Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin") b) and Scala needs this one: (ie CLASSPATH=$CLASSPATH:/usr/share/java/scala-library.jar). TIA for an explanation how to do so. Cheers.

    Read the article

  • Applications on the Web/Cloud the way to go? over Desktop apps?

    - by jiewmeng
    i am currently a mainly web developer, but is quite attracted to the performance and great integration with the OS (eg. Windows 7, Jump Lists, Taskbar Thumbnails, etc) something like WPF/C# can provide to the user, improving workflow and productivity. privacy and performance seems like a major downside of web/cloud apps compared to desktop apps. applications on the cloud/web work on the go, increased popularity of smartphones/netbooks majority of users may not benefit as much from increased performance of desktop apps, eg. internet surfing, word processing, probably benefit more from decreased startup times, lower costs and data on the cloud desktop applications increased performance benefits power users like 3D rendering, HD video/photo editing, gamers (i wonder if such processing maybe offset to cloud processing) integration with OS increases productivity (maybe such features can be adapted to a web version? maybe with a local desktop app to work with Web App API) more control over privacy (maybe fixed by encryption?) local data access (esp. large files) guaranteed and fast (YouTube HD fast enough most of the time) work not affected by intermittent/slow/availability internet connections (i know this is changing tho) what do you think?

    Read the article

  • Can I indicate where my MySQL parameter should go more meaningfully than just having a ? to mark the

    - by Paul H
    I've got a chunk of code where I can pass info into a MySQL command using parameters through an ODBC connection. Example code showing surname passed in using string surnameToLookFor: using (OdbcConnection DbConn = new OdbcConnection( connectToDB )) { OdbcDataAdapter cmd = new OdbcDataAdapter( "SELECT Firstname, Address, Postcode FROM customers WHERE Surname = ?", DbConn); OdbcParameter odbcParam = new OdbcParameter("surname", surnameToLookFor); cmd.SelectCommand.Parameters.Add(odbcParam); cmd.Fill(dsCustomers, "customers"); } What I'd like to know is whether I can indicate where my parameter should go more meaningfully than just having a ? to mark the position - as I could see this getting quite hard to debug if there are multiple parameters being replaced. I'd like to provide a name to the parameter in a manner something like this: SELECT Firstname, Address, Postcode FROM customers WHERE Surname = ?surname ", When I try this it just chokes. The following code public System.Data.DataSet Customer_Open(string sConnString, long ld) { using (MySqlConnection oConn = new MySqlConnection(sConnString)) { oConn.Open(); MySqlCommand oCommand = oConn.CreateCommand(); oCommand.CommandText = "select * from cust_customer where id=?id"; MySqlParameter oParam = oCommand.Parameters.Add("?id", MySqlDbType.Int32); oParam.Value = ld; oCommand.Connection = oConn; DataSet oDataSet = new DataSet(); MySqlDataAdapter oAdapter = new MySqlDataAdapter(); oAdapter.SelectCommand = oCommand; oAdapter.Fill(oDataSet); oConn.Close(); return oDataSet; } } is from http://www.programmingado.net/a-389/MySQL-NET-parameters-in-query.aspx and includes the fragment where id=?id Which would be ideal. Is this only available through the .Net connector rather than the ODBC? If it is possible to do using ODBC how would I need to change my code fragment to enable this?

    Read the article

  • VBA: How go I get the total width from all controls in an MS-Access form?

    - by Stefan Åstrand
    Hi, This is probably very basic stuff, but please bear in mind I am completely new to these things. I am working on a procedure for my Access datasheet forms that will: Adjust the width of each column to fit content Sum the total width of all columns and subtract it from the size of the window's width Adjust the width of one of the columns to fit the remaining space This is the code that adjusts the width of each column to fit content (which works fine): Dim Ctrl As Control Dim Path As String Dim ClmWidth As Integer 'Adjust column width to fit content For Each Ctrl In Me.Controls If TypeOf Ctrl Is TextBox Then Path = Ctrl.Name Me(Path).ColumnWidth = -2 End If Next Ctrl How should I write the code so I get the total width of all columns? Thanks a lot! Stefan Solution This is the code that makes an Access datasheet go from this: To this: Sub AdjustColumnWidth(frm As Form, clm As String) On Error GoTo HandleError Dim intWindowWidth As Integer ' Window width property Dim ctrl As Control ' Control Dim intCtrlWidth As Integer ' Control width property Dim intCtrlSum As Integer ' Control width property sum Dim intCtrlAdj As Integer ' Control width property remaining after substracted intCtrSum 'Adjust column width to standard width For Each ctrl In frm.Controls If TypeOf ctrl Is TextBox Or TypeOf ctrl Is CheckBox Or TypeOf ctrl Is ComboBox Then Path = ctrl.Name frm(Path).ColumnWidth = 1500 End If Next ctrl 'Get total column width For Each ctrl In frm.Controls If TypeOf ctrl Is TextBox Or TypeOf ctrl Is CheckBox Or TypeOf ctrl Is ComboBox Then Path = ctrl.Name intCtrlWidth = frm(Path).ColumnWidth If Path <> clm Then intCtrlSum = intCtrlSum + intCtrlWidth End If End If Next ctrl 'Adjust column to fit window intWindowWidth = frm.WindowWidth - 270 intCtrlAdj = intWindowWidth - intCtrlSum frm.Width = intWindowWidth frm(clm).ColumnWidth = intCtrlAdj Debug.Print "Totalt (Ctrl): " & intCtrlSum Debug.Print "Totalt (Window): " & intWindowWidth Debug.Print "Totalt (Remaining): " & intCtrlAdj Debug.Print "clm : " & clm HandleError: GeneralErrorHandler Err.Number, Err.Description Exit Sub End Sub Code to call procedure: Private Sub Form_Load() Call AdjustColumnWidth(Me, "txtDescription") End Sub

    Read the article

  • Why compiler go to suspend mode when want to open database?

    - by rima
    Dear friend I try to connect to database with a less line for my connection string... I find out s.th in oracle website but i dont know Why when the compiler arrive to the line of open database do nothing????!it go back to GUI,but it like hanging...please help me to solve it. p.s.Its funny the program didnt get me any exception also! these service is active in my computer: > Oracle ORCL VSS Writer Service Start > OracleDBConsolrorcl > OracleJobSchedulerORCL Start > OracleOraDB11g+home1TNSListener Start > oracleServiceORCL Start try { /** * ORCL = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = rima-PC)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl) ) )*/ string oradb = "Data Source=(DESCRIPTION=" + "(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=rima-PC)(PORT=1521)))" + "(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=orcl)));" + "User Id=bird_artus;Password=123456;"; //string oradb = "Data Source=OraDb;User Id=scott;Password=tiger;"; string oradb1 = "Data Source=ORCL;User Id=scott;Password=tiger;"; // C# OracleConnection con = new OracleConnection(); con.ConnectionString = oradb1; String command = "select dname from dept where deptno = 10"; MessageBox.Show(command); OracleDataAdapter oda = new OracleDataAdapter(); oda.SelectCommand = new OracleCommand(); oda.SelectCommand.Connection = con; oda.SelectCommand.CommandText = command; con.Open(); oda.SelectCommand.ExecuteNonQuery(); DataSet ds = new DataSet(); oda.Fill(ds); Console.WriteLine(ds.GetXml()); dataGridView1.DataSource = ds; con.Close(); } catch (Exception ex) { MessageBox.Show(ex.Message.ToString()+Environment.NewLine+ ex.StackTrace.ToString()); }

    Read the article

  • How do i make divs go into another row when full?

    - by acidzombie24
    My code is something like the below. When theres 3 images everything is fine once theres 4 it gets full and moves the entire div.top into another row. How do i make the div inside top just start a new row instead? I tried writing .top width=500px but once it hits or passes it instead the images inside are squeeze together instead of each being 150x150. I tried max-width on top instead and in opera and chrome i see the border of top as 500width but the images continue to render pass it. (i have a firefox problem with my div so the width looks fixed to something else). So how do i make these divs go into another row? and not try to squeeze together <div class="top"> <div><a href><img/></a></div> <div><a href><img/></a></div> <div><a href><img/></a></div> </div>

    Read the article

  • Jqplot - How to have vertical lines and make xaxis go up in plotted values?

    - by Beginner
    I have plotted a line graph using jqplot. What i would like is vertical lines and to start from 3 and go up in the plotted values along the bottom. so 3, 6, 9, 12 , 15, 29, 36 Also a dash marker along the left. This is what i have at the moment: $(document).ready(function(){ $.jqplot('chart2', [[[3, @(Model.LearnerWeek[0])], [6, @(Model.LearnerWeek[1])], [9, @(Model.LearnerWeek[2])], [12, @(Model.LearnerWeek[3])], [15, @(Model.LearnerWeek[4])], [29, @(Model.LearnerWeek[5])], [36, @(Model.LearnerWeek[6])]], [[3, @(Model.ManagerWeek[0])], [6, @(Model.ManagerWeek[1])], [9, @(Model.ManagerWeek[2])], [12, @(Model.ManagerWeek[3])], [15, @(Model.ManagerWeek[4])], [29, @(Model.ManagerWeek[5])], [36, @(Model.ManagerWeek[6])]]], { axes: { yaxis: { tickOptions: { show: false}, min: 0, max: 100, label: 'Participation Rate', labelRenderer: $.jqplot.CanvasAxisLabelRenderer }, xaxis: { min: 3, max: 36, label: 'Week', tickOptions: { formatString: '%d' } } }, seriesDefaults: { showMarker: false , rendererOptions: { diameter: undefined, // diameter of pie, auto computed by default. padding: 10, // padding between pie and neighboring legend or plot margin. fill: true, // render solid (filled) slices. shadowOffset: 2, // offset of the shadow from the chart. shadowDepth: 15, // Number of strokes to make when drawing shadow. Each stroke // offset by shadowOffset from the last. shadowAlpha: 1 // Opacity of the shadow } }, seriesColors: ['#3591cf', '#ef4058', '#73C774', '#C7754C', '#17BDB8'] }); }); I have played around with render options and xasis but cant seem to work it out

    Read the article

  • In M-V-VM where does my code go?

    - by Nate Bross
    So, this is a pretty basic question I hope. I have a web service that I've added through Add Service Reference. It has some methods to get list and get detail of a perticular table in my database. What I'm trying to do is setup a UI as follows: App Load Load service proxy Call the GetList(); method display the results in a ListBox control User Double Clicks item in ListBox, display a modal dialog with a "detail" view I'm extremely new to using MVVM, so any help would be greatly appreciated. Additional information: // Service Interface (simplification): interface IService { IEnumerable<MyObject> GetList(); MyObject GetDetail(int id); } // Data object (simplification) class MyObject { public int ID { get; set; } public string Name { get; set; } } I'm thinking I should have something like this: MainWindow MyObjectViewUserControl Displays list Opens modal window on double click Specific Questions: What would my ViewModel class look like? Where does the code to handle the double click go? Inside the UserControl? Sorry for the long details, but I'm very new to the whole thing and I'm not educated enough to ask the right questions. I checked out the MVVM Sample from wpf.codeplex.com and something isn't quite clicking for me yet, because it seems very confusing.

    Read the article

  • Where does the delete control go in my Cocoa user interface?

    - by Graham Lee
    Hi, I have a Cocoa application managing a collection of objects. The collection is presented in an NSCollectionView, with a "new object" button nearby so users can add to the collection. Of course, I know that having a "delete object" button next to that button would be dangerous, because people might accidentally knock it when they mean to create something. I don't like having "are you sure you want to..." dialogues, so I dispensed with the "delete object". There's a menu item under Edit for removing an object, and you can hit Cmd-backspace to do the same. The app supports undoing delete actions. Now I'm getting support emails ranging from "does it have to be so hard to delete things" to "why can't I delete objects?". That suggests I've made it a bit too hard, so what's the happy middle ground? I see applications from Apple that do it my way, or with the add/remove buttons next to each other, but I hate that latter option. Is there another good (and preferably common) convention for delete controls? I thought about an action menu but I don't think I have any other actions that would go in it, rendering the menu a bit thin.

    Read the article

  • Should I go to school and get my degree in computer science?

    - by ryan
    I'll try and keep this short and simple. I've always enjoyed programming and I've been doing it since high school. Right after I graduated from high school (2002), I opted to skip college because I was offered a software engineer position. I quit after a couple of years later to team up on various startup companies. However, most of them did not launch as well as expected. But it honestly did not matter to me because I've learned so much from that experience. So fast forwarding to today, now turned 25, I need a job due to this tough economic climate. Looking on Craigslist, a lot of the listings require computer science degrees. It's evident now that programming is what I want to do because I seem to never get enough of it. But just the thought of having to push 2 years without attending any real computer class for an Associates at age 25 is very, very discouraging. And the thought of having to learn from basic (Hello WOOOOORRLLLD) just does not seem exciting. I guess I have 3 questions to wrap this up: Should I just suck it up and go back to school while working at McDonalds at age 25? Is there a way where I can just skip all the boring stuff and just get tested with what I know? From your experience, how many jobs use computer science degrees as prerequisites? Or am I screwed and better pray that my next startup will be the next big thing?

    Read the article

  • What is the best way to go about grouping rows by the same timestamp?

    - by Luke
    Hello all. I am looking for some advice. I have rows of data in the database that i want to group together. There is a timestamp involved. That column is called date. What is the best way to go about grouping rows by the same timestamp. EDITED..... <? $result = mysql_query("SELECT * FROM ".TBL_FIXTURES." ORDER BY date"); $current_week = null; while ($row = mysql_fetch_assoc($result)) { if ($row['date'] != $current_week) { $current_week = $row['date']; echo 'Week ' . $current_week .': '; } echo $row['home_user']; echo $row['home_team']; echo $row['away_user']; echo $row['away_team']; } ?> I have this code. What i am trying to do is organise each round of fixtures in a row with a title Week 1 - date. I want Week 1 and the date and all fixtures with that date displayed. Then move onto week 2 and the date and all fixtures again. This should be done for every fixture in the database, so if there are 6 rounds of fixtures, there will be 6 dates and therefore 6 blocks of fixtures.. Please help, thanks

    Read the article

  • Where does authentication and loader go in Zend Framework?

    - by Joel
    Hi guys, Still trying to learn the basics of MVC. I'm making use of Zend_Loader for Google Calendar feed. What file would this information go in? The .phtml view? // load library Zend_Loader::loadClass('Zend_Gdata'); Zend_Loader::loadClass('Zend_Gdata_ClientLogin'); Zend_Loader::loadClass('Zend_Gdata_Calendar'); Zend_Loader::loadClass('Zend_Http_Client'); // create authenticated HTTP client for Calendar service $gcal = Zend_Gdata_Calendar::AUTH_SERVICE_NAME; $user = "xxxxxxxxxxxx"; $pass = "xxxxxxxxxxxx"; $client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, $gcal); $gcal = new Zend_Gdata_Calendar($client); $query = $gcal->newEventQuery(); $query->setUser('xxxxxxxxxxxx'); $secondary=true; $query->setVisibility('private'); $query->setProjection('basic'); $query->setOrderby('starttime'); $query->setSortOrder('ascending'); //$query->setFutureevents('true'); $startDate=date('Y-m-d h:i:s'); $endDate="2015-12-31"; $query->setStartMin($startDate); $query->setStartMax($endDate); $query->setMaxResults(30); try { $feed = $gcal->getCalendarEventFeed($query); } catch (Zend_Gdata_App_Exception $e) { echo "Error: " . $e->getResponse(); } Thanks!

    Read the article

  • SQL SERVER – Update Statistics are Sampled By Default

    - by pinaldave
    After reading my earlier post SQL SERVER – Create Primary Key with Specific Name when Creating Table on Statistics, I have received another question by a blog reader. The question is as follows: Question: Are the statistics sampled by default? Answer: Yes. The sampling rate can be specified by the user and it can be anywhere between a very low value to 100%. Let us do a small experiment to verify if the auto update on statistics is left on. Also, let’s examine a very large table that is created and statistics by default- whether the statistics are sampled or not. USE [AdventureWorks] GO -- Create Table CREATE TABLE [dbo].[StatsTest]( [ID] [int] IDENTITY(1,1) NOT NULL, [FirstName] [varchar](100) NULL, [LastName] [varchar](100) NULL, [City] [varchar](100) NULL, CONSTRAINT [PK_StatsTest] PRIMARY KEY CLUSTERED ([ID] ASC) ) ON [PRIMARY] GO -- Insert 1 Million Rows INSERT INTO [dbo].[StatsTest] (FirstName,LastName,City) SELECT TOP 1000000 'Bob', CASE WHEN ROW_NUMBER() OVER (ORDER BY a.name)%2 = 1 THEN 'Smith' ELSE 'Brown' END, CASE WHEN ROW_NUMBER() OVER (ORDER BY a.name)%10 = 1 THEN 'New York' WHEN ROW_NUMBER() OVER (ORDER BY a.name)%10 = 5 THEN 'San Marino' WHEN ROW_NUMBER() OVER (ORDER BY a.name)%10 = 3 THEN 'Los Angeles' ELSE 'Houston' END FROM sys.all_objects a CROSS JOIN sys.all_objects b GO -- Update the statistics UPDATE STATISTICS [dbo].[StatsTest] GO -- Shows the statistics DBCC SHOW_STATISTICS ("StatsTest"PK_StatsTest) GO -- Clean up DROP TABLE [dbo].[StatsTest] GO Now let us observe the result of the DBCC SHOW_STATISTICS. The result shows that Resultset is for sure sampling for a large dataset. The percentage of sampling is based on data distribution as well as the kind of data in the table. Before dropping the table, let us check first the size of the table. The size of the table is 35 MB. Now, let us run the above code with lesser number of the rows. USE [AdventureWorks] GO -- Create Table CREATE TABLE [dbo].[StatsTest]( [ID] [int] IDENTITY(1,1) NOT NULL, [FirstName] [varchar](100) NULL, [LastName] [varchar](100) NULL, [City] [varchar](100) NULL, CONSTRAINT [PK_StatsTest] PRIMARY KEY CLUSTERED ([ID] ASC) ) ON [PRIMARY] GO -- Insert 1 Hundred Thousand Rows INSERT INTO [dbo].[StatsTest] (FirstName,LastName,City) SELECT TOP 100000 'Bob', CASE WHEN ROW_NUMBER() OVER (ORDER BY a.name)%2 = 1 THEN 'Smith' ELSE 'Brown' END, CASE WHEN ROW_NUMBER() OVER (ORDER BY a.name)%10 = 1 THEN 'New York' WHEN ROW_NUMBER() OVER (ORDER BY a.name)%10 = 5 THEN 'San Marino' WHEN ROW_NUMBER() OVER (ORDER BY a.name)%10 = 3 THEN 'Los Angeles' ELSE 'Houston' END FROM sys.all_objects a CROSS JOIN sys.all_objects b GO -- Update the statistics UPDATE STATISTICS [dbo].[StatsTest] GO -- Shows the statistics DBCC SHOW_STATISTICS ("StatsTest"PK_StatsTest) GO -- Clean up DROP TABLE [dbo].[StatsTest] GO You can see that Rows Sampled is just the same as Rows of the table. In this case, the sample rate is 100%. Before dropping the table, let us also check the size of the table. The size of the table is less than 4 MB. Let us compare the Result set just for a valid reference. Test 1: Total Rows: 1000000, Rows Sampled: 255420, Size of the Table: 35.516 MB Test 2: Total Rows: 100000, Rows Sampled: 100000, Size of the Table: 3.555 MB The reason behind the sample in the Test1 is that the data space is larger than 8 MB, and therefore it uses more than 1024 data pages. If the data space is smaller than 8 MB and uses less than 1024 data pages, then the sampling does not happen. Sampling aids in reducing excessive data scan; however, sometimes it reduces the accuracy of the data as well. Please note that this is just a sample test and there is no way it can be claimed as a benchmark test. The result can be dissimilar on different machines. There are lots of other information can be included when talking about this subject. I will write detail post covering all the subject very soon. Reference: Pinal Dave (http://blog.SQLAuthority.com) Filed under: Pinal Dave, SQL, SQL Authority, SQL Index, SQL Optimization, SQL Performance, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, T SQL, Technology Tagged: SQL Statistics

    Read the article

< Previous Page | 31 32 33 34 35 36 37 38 39 40 41 42  | Next Page >