Search Results

Search found 5688 results on 228 pages for 'newbie programmer'.

Page 22/228 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • newbie trying to write url rewite in .htaccess file

    - by user297975
    My site was under example.com/waha/ Now I move the site right under the root example.com I want to 301 redirect all the old links like example.com/waha/notice/5803 to example.com/notice/5803 How can I do it? My current .htaccess file is below. <IfModule mod_rewrite.c> RewriteEngine On # NOTE: change this to your actual StatusNet path; may be "/". RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule (.*) index.php?p=$1 [QSA,L] </IfModule> <FilesMatch "\.(ini)"> Order allow,deny </FilesMatch> Options -Indexes

    Read the article

  • how to run this qt script? (newbie question)

    - by GB_J
    I have a qt script(barchart.qs) that creates a graph for me. I don't know how i can incorporate(ie show the graph) in my qt mainwindow. Can some one please help me look at the code and what its outputs are? I tried engine.evaluate, but i do not know what is the QScriptValue i'm getting in return. Thanks sooo much. This is the script: BarChart.prototype = new QWidget; BarChart.prototype.suffix = ""; function BarChart(parent) { QWidget.call(this, parent); } // find the maximum value and widest (pixel-wise) label and suffix BarChart.prototype.showEvent = function(event) { var fm = new QFontMetrics(this); this.margin = 20; this.titleHeight = fm.height(); this.barHeight = 1.5 * fm.height(); this.barSpacing = 0.6 * fm.height(); this.maxValue = this.suffixWidth = this.labelWidth = 0; var count = 0; for (d in this.data) { this.labelWidth = Math.max(this.labelWidth, fm.width(d)); this.maxValue = Math.max(this.maxValue, this.data[d]); this.suffixWidth = Math.max(this.suffixWidth, fm.width(String(this.data[d]) + " " + this.suffix)); count++; } this.startHue = 15; this.hueDelta = 360 / count; this.size = new QSize(640, this.titleHeight + 2 * this.margin + (this.barHeight + this.barSpacing) * count); } BarChart.prototype.paintEvent = function(event) { var p = new QPainter; p.begin(this); // background and title p.fillRect(this.rect, new QBrush(new QColor(255, 255, 255))); p.drawText(0, 0, this.width, this.margin + this.titleHeight, Qt.AlignCenter, this.windowTitle, 0); var ofs = this.labelWidth + this.margin; var ww = this.width - this.suffixWidth - ofs - 2 * this.margin; var hue = this.startHue; var y = 0; p.translate(this.margin, this.titleHeight + 1.5 * this.margin); for (d in this.data) { // label on the left side p.setPen(new QColor(Qt.black)); p.drawText(0, y, this.labelWidth, this.barHeight, Qt.AlignVCenter + Qt.AlignRight, d, 0); // the colored bar var gradient = new QLinearGradient(new QPoint(ofs, y), new QPoint(ofs, y + this.barHeight)); gradient.setColorAt(0, QColor.fromHsv(hue, 255, 240)); gradient.setColorAt(1, QColor.fromHsv(hue, 255, 92)); p.setBrush(new QBrush(gradient)); p.setPen(new QColor(96, 96, 96)); var bw = this.data[d] * ww / this.maxValue; p.drawRect(ofs, y, bw, this.barHeight); // extra text at the end of the bar var text = new String(this.data[d] + " " + this.suffix); p.setPen(new QColor(Qt.black)); p.drawText(ofs + bw + this.margin/2, y, this.suffixWidth, this.barHeight, Qt.AlignVCenter + Qt.AlignLeft, text, 0); // for the next bar y += (this.barHeight + this.barSpacing); hue += this.hueDelta; if (hue >= 360) hue -= 360; } p.end(); } BarChart.prototype.wheelEvent = function(event) { this.startHue += event.delta() / 8 / 5; if (this.startHue = 360) this.startHue -= 360; if (this.startHue < 0) this.startHue += 360; this.update(); event.ignore(); } BarChart.prototype.mousePressEvent = function(event) { var fname = QFileDialog.getSaveFileName(this, "Save", ".", "*.png", 0, 0); if (fname.length > 0) { var img = new QImage(this.size, QImage.Format_ARGB32_Premultiplied); this.render(img); img.save(new QFile(fname)); } } var chart = new BarChart; chart.windowTitle = "Monthly"; chart.suffix = "reports"; chart.data = { "September" : 45, "October" : 60, "November" : 56, "December" : 0 }; chart.show(); QCoreApplication.exec();

    Read the article

  • Newbie queston: Cannot load http://localhost/phptest:8080/

    - by Princess Innah
    Hi guys, I decided to learn HTML so I installed apache on windows vista. Everything seems to work fine; when I go to http://localhost:8080 the sample webpage installed by apache shows. Apache is configured at port 8080. So far so good. Since my DocumentRoot is c:\pub, I made another folder inside, e.g., c:\pub\test. What I'm trying to figure out is why the page at http://localhost/test:8080 cannot load? It has index.html and apache is working fine. Any ideas?

    Read the article

  • PHP Programmer wanting to learn Spring

    - by grokker
    I'm a PHP programmer and I want to try creating a webapp using the Spring framework. The problem is I'm clueless and I don't know where to start. What tutorials/books/websites do you guys suggest that I should learn from? What's IoC? Do I use it alongside MVC? What components of the Spring framework should I use? How do I know what to use? Are there webapps created with Spring that I could study from? Thank you so much in advance! P.S. I've used Struts (1) about a year ago.

    Read the article

  • What is a programmer's life like?

    - by Zee JollyRoger
    Imagine like an 8-hour long video of any "typical/average" programming job. What is it like? Before I get myself involved in that path, what can I expect? I am interested in gathering first-hand information and accounts of the typical life of a programmer. My goal is to grasp the fundamental concepts of working in the professional field of programming. I just want to "see" into what it is/means to come to an entry-level programming job and program. See what kind of skills, mentality, expectations, and such are required.

    Read the article

  • SQL syntax Newbie student

    - by sammysmall
    Describe the output of the following SQL query: select custId, name from customer where region = "New York" UNION select cust.custId, cust.name from customer cust where cust.custId IN (select cust_order.custId from customer_order cust_order, company_employee comp_emp where cust_order.salesEmpId = comp_emp.empId AND comp_emp.name = 'DANIEL'); My question is: at line from customer cust is cust referring to a column in the customer table... This is a homework question I have identified the components leading up to this line and I think that cust is a column in the customer table... I am not asking for an overall solution just a bit of encouragement if I am on the right track...

    Read the article

  • SIFR Newbie: font display problem in non-flash browsers

    - by bullquartz
    Hi, I'm wondering if someone can help me with this as I'm fairly new to siFR and think there is something essential i'm not comprehending in the documentation. I'm having success using siFR 3 (r436) to render fonts and it's working just how I want. However if I turn flash off in any browser the original (no longer rendered) html text displays very badly indeed. I thought that in any non-flash browser my inital stylesheet would be referred to and not siFR.css and I would be able to adjust the html text as a seperate entity. I think i probably developed this bad idea because I remember in earlier siFR versions you had to mess around alot with stylings on the original stylesheet + the sifr-config so you would get corresponding line heights/widths etc between the html and rendered font. (i realise that siFR 3 renders the flash in a different way) So it seems that siFR.css controls both the non-flash text and the rendered font. Anyway my essential noob questions is: how do i get the the original html text to have the same dimensions as the rendered font? thanks for you help

    Read the article

  • Dashcode newbie question: Change a button's label programmatically

    - by Koning Baard XIV
    Hi all! I'm new to Mac OS X Dashboard developement. Now, I have a button with id b_start. When that button is clicked, I want the label of the button to change to "Round". Now I have tried these, but none of them work: document.getElementById("b_start").label = "Round"; document.getElementById("b_start").text = "Round"; document.getElementById("b_start").innerText = "Round"; document.getElementById("b_start").object.setValue("Round"); document.getElementById("b_start").value = "Round"; Does anyone how I can change the button's label? Thanks in advance.

    Read the article

  • Salary of a junior freelancer programmer

    - by Frank
    Hi, I'm pursuing my PhD in CS and starting freelancing to pay bills and get some experience. Since I'm new in the freelancing field, I was wondering how much you would charge for a junior programmer to do some work. Like many, I've started freelancing for website. I'm doing pretty much all the work (design, programming, finding hosting/domain). I would like to give details to my client in order for them to know how much cost every part involved in website development. How much should I charge? Charing a hourly rate or a price for the whole project? How you did it and why? Thanks

    Read the article

  • Kohana newbie - sample CRUD application

    - by titel
    I'm completely new to this framework and I'm trying to find some sample CRUD application to get started with Kohana 3. There is a tutorial and information in the unofficial Kohana 3 Wiki (http://kerkness.ca/wiki/doku.php), but event there, there are some aspects that are not covered (the model, validation, etc).

    Read the article

  • newbie: Rails on remote Apache server not displaying index.html.erb

    - by paracaudex
    I played around with Rails on my laptop (running Linux + Apache + MySQL) and had no trouble getting the Getting Started with Rails tutorial to work locally. Now I'm trying the same thing at work on a remote Mac OS X + Apache server, and things aren't quite so rosy. I typed rails blog -d mysql to create a directory called blog in /Library/WebServer/Documents/mydirectory. The trouble is, if I go to server.com/mydirectory/public, I get the public/index.html in my browser. But, I don't get this file if I go to server.com/mydirectory/. Instead, I get a 403 error. Also, when I: script/generate controller home index to create: app/views/home/index.html.erb I am unable to view this file, whether I go to server.com/mydirectory/home/index, or if I add a new line (map.root :controller => "home") to config/routes.rb and go to server.com/mydirectory. Am I missing something really obvious about Apache and Rails?

    Read the article

  • Silverlight 4 NewBie Question

    - by codemnky
    I am watching a video from Silverlight.net website about DataForm. There is no source code download, so I am typing in the code as I watch the video. Unfortunately I can't replicate what is shown in the video. there are several issues. I am going to list out only the first 2 1) The presenter shows a simple class inside DataForm that has a icon at the very top of the data form that upon clicking it makes the DataForm editable and a save button appears at the bottom. I did'nt get the same thing when I ran my code against Silverlight 4 or Silverlight 3 2) Than he goes on to show that if you mark your class [Bindable(false)] you shouldn't see anything in your page. I did that but my form still shows all the properties I stopped after these 2 issues. If the features being talked about in this video were deprecated in the final release than this video should have been taken off the site. can anyone help me with this??

    Read the article

  • Newbie question - MySQL index size

    - by Tommy
    I've just started to investigating how I should optimize my database. Indexing seems to be a good idea, so I want to index a VARCHAR column, the engine is MyISAM. From what I've read, I understand that an index is limited to a size of 1000 bytes. A VARCHAR character is 3 bytes in size. Does this mean that if I want to index a VARCHAR column with 50 rows, I need an index prefix of 6 characters? I came to that number by dividing 1000 with the row number 50, then the bytesize per character that is 3. 1000/50/3=6,66. It seems a little complicated, so I'm just wondering if I'm thinking right? It seems weird to me that you'd only be able to index 333 rows in a VARCHAR column, using a prefix of 1 character.

    Read the article

  • django newbie question : cant start a new project

    - by Moayyad Yaghi
    hello . I'm totally new to django . and I'm using its documentation to get help on how to use it but seems like something is missing. i installed django using setup.py install command and i added the ( django/bin ) to system path variable but. i still cant start a new project i use the following syntax to start a project : django-admin.py startproject myNewProject but it says Type 'django-admin.py help' for usage. 1 do i miss anything ? thank u

    Read the article

  • How does a programmer think?

    - by Gordon Potter
    This may be a hopelessly vague question. But I am interested to hear whatever logical thought processes people go through when learning a new concept or trying to get their brain around code they might not have ever seen before. Basically, what general steps does one take to to break down problems and what does it take to "get it"? If you were to diagram a flowchart of how your mental process works when you look at code or try to solve a problem what might it look like? What common references, tips, and mental assumptions do you find useful in problem solving? How is this different between different domains? For example in what ways is a web programmer's thought process similar or different from a traditional desktop app developer's process?

    Read the article

  • newbie problems with codeigniter

    - by Patrick
    hi, i'm trying to learn codeigniter (following a book) but don't understand why the web page comes out empty. my controller is class Welcome extends Controller { function Welcome() { parent::Controller(); } function index() { $data['title'] = "Welcome to Claudia's Kids"; $data['navlist'] = $this->MCats->getCategoriesNav(); $data['mainf'] = $this->MProducts->getMainFeature(); $skip = $data['mainf']['id']; $data['sidef'] = $this->MProducts->getRandomProducts(3, $skip); $data['main'] = "home"; $this->load->vars($data); $this->load->view('template'); } the view is: <--doctype declaration etc etc.. --> </head> <body> <div id="wrapper"> <div id="header"> <?php $this->load->view('header');?> </div> <div id='nav'> <?php $this->load->view('navigation');?> </div> <div id="main"> <?php $this->load->view($main);?> </div> <div id="footer"> <?php $this->load->view('footer');?> </div> </div> </body> </html> Now I know the model is passing back the right variables, but the page appears completely blank. I would expect at least to see an error, or the basic html structure, but the page is just empty. Moreover, the controller doesn't work even if I modify it as follows: function index() { echo "hello."; } What am I doing wrong? Everything was working until I made some changes to the model - but even if I delete all those new changes, the page is still blank.. i'm really confused! thanks, P.

    Read the article

  • Newbie PHP coding problem: header function (maybe, I need someone to check my code)

    - by Haskella
    Hi, consider the following PHP code: <?php $searchsport = $_REQUEST['sport']; $sportarray = array( "Football" => "Fb01", "Cricket" => "ck32", "Tennis" => "Tn43", ); header("Location: ".$sportarray[$searchsport].".html"); //directs user to the corresponding page they searched if ($searchsport == NULL) { header("Location: youtypednothing.html"); //directs user to a page I've set up to warn them if they've entered nothing } else { header("Location: sportdoesnotexist.html"); //if sport isn't in my root, a warning will appear } ?> I think the code comments are self-explanatory, basically when I type Tennis on my form.html it will send data to this php file and process and direct me to Tn43.html which is my tennis page. Unfortunately, it doesn't work and I really want to know why... (I know I've made some huge silly mistake). PS: Is header the right function to use when doing some redirecting?

    Read the article

  • Newbie question: Creating a custom control

    - by Wild Thing
    Hi, I have an ASP.Net site, in which I am using a ListView with a Datapager. Apparently there is a bug with the Datapager, where it crashes if there is an empty ampersand (&) in the querystring. This is a known issue: https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=357344&wa=wsignin1.0#tabs I see that there is a workaround given, but did not understand how to implement it. Can somebody point me in the right direction? Also, I see that this issue is marked as resolved. Any idea where I can find the updated version of this control? Wild Thing

    Read the article

  • Newbie question: undefined local variable or method , why??

    - by Mellon
    I am new in Rails (I am using Rails 3.0.3), currently I am following the book "Agile Web Development with Rails" to develop a simple rails application. I followed the book to: --create a model 'Cart' class; --implement 'add_to_cart' method in my 'store_controller', I have a line of code <%=button_to "Add to Cart", :action => add_to_cart, :id => product %> in my /store/index.html.erb As you see, there is :action => add_to_cart in my index.html.erb, which will invoke the add_to_cart method in my *Controllers/store_controller.rb* But after I refresh the browser, I got the error "undefined local variable or method 'add_to_cart'", apparently I do have the method add_to_cart in my 'store_controller.rb', why I got this error??? What is the possible cause??? Here are my codes: store_controller.rb class StoreController < ApplicationController def index @products = Product.find_products_for_sale end def add_to_cart product = Product.find(params[:id]) @cart = find_cart @cart.add_product(product) end private def find_cart session[:cart] ||= Cart.new end end /store/index.html.erb <h1>Your Pragmatic Catalog</h1> <% @products.each do |product| -%> <div class="entry"> <%= image_tag(product.image_url) %> <h3><%=h product.title %></h3> <%= product.description %> <div class="price-line"> <span class="price"><%= number_to_currency(product.price) %></span> <!-- START_HIGHLIGHT --> <!-- START:add_to_cart --> **<%= button_to 'Add to Cart', :action => 'add_to_cart', :id => product %>** <!-- END:add_to_cart --> <!-- END_HIGHLIGHT --> </div> </div> <% end %> Model/cart.rb class Cart attr_reader :items def initialize @items = [] end def add_product(product) @items << product end end

    Read the article

  • Newbie want to learn: Javascript + HTML5 localstorage

    - by Alai
    So I'm searching for a good crash course on localstorage and interacting with it in Javascript. I want to build a to-do list webapp with some extra functionality but it would be just for 1 user. I don't want to mess with php/mysql and have the server doing anything. Links to tutorials would be best :-D

    Read the article

  • Perls Of Wisdom For a .Net Programmer [closed]

    - by DeanMc
    Hi Guys, I like to think that recently I have moved from complete beginner to beginner. It has been a hard road and one on which I took many wrong turns. Very rarely in any profession is there a place where so many rock stars gather, this is something I would like to take advantage of. What I would like to ask is what are your perls of wisdom for a .net programmer. They can be anything you feel of value, a concept, a book, a process that should be followed, anything of that nature, it doesn't have to be .net specific just contextual. Thanks for taking the time to read this and respond.

    Read the article

  • Newbie question: When to use extern "C" { //code } ?

    - by Russel
    Hello, Maybe I'm not understanding the differences between C and C++, but when and why do we need to use: extern "C" { ? Apparently its a "linkage convention"? I read about it briefly and noticed that all the .h header files included with MSVS surround their code with it. What type of code exactly is "C code" and NOT "C++ code"? I thought C++ included all C code? I'm guessing that this is not the case and that C++ is different and that standard features/functions exist in one or the other but not both (ie: printf is C and cout is C++), but that C++ is backwards compatible though the extern "C" declaration. Is this correct? My next question depends on the answer to the first, but I'll ask it here anyway: Since MSVS header files that are written in C are surrounded by extern "C" { ... }, when would you ever need to use this yourself in your own code? If your code is C code and you are trying to compile it in a C++ compiler, shouldn't it work without problem because all the standard h files you include will already have the extern "C" thing in them with the C++ compiler? Do you have to use this when compiling in C++ but linking to alteady built C libraries or something? Please help clarify this for me... Thanks! --Keith

    Read the article

  • How to keep code maintainable after original programmer quit

    - by Stan
    Say if it's a 10 people project, 2-3 of the original programmer quit after the project has been release a stable version for a while. How to have the code maintainable in this case? My imagination is reviewing the code after the project goes to release version and keep review it afterwards? Maybe split into 2-3 small groups and have each group review part of the code. So at least 3-4 people are familiar with part of code. Does this work? How do companies deal with this issue? Usually how many percentage of time spent on reviewing the code? Please advise, thanks to community.

    Read the article

  • (Newbie) Amazon Web Services Apache Server

    - by Samnsparky
    Hello! I am trying to get a feel for the costs imposed by running apache on AWS continually. Assuming that the service is scarcely used, does anyone know how many cpu hours that would eat up in a month just by sitting there and running? I understand that this is slightly impractical but I am trying to figure out what the cost of entry is to deploy an application on this platform (as compared to GAE). I suspect it to be small but I would like to know. Thank you for your help, Sam

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >