Daily Archives

Articles indexed Tuesday May 25 2010

Page 12/118 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Will be self-taught limit me?

    - by Isaiah
    I'm 21 and am pretty efficient in html/css, python, and javascript. I also know my way around lisp languages and enjoy programing in them. My problem is that I'm extremely self-taught and not quite confident that I could land a job programing, but I really need a job soon as I've just become a father. I haven't even created a resume yet because I'm not really sure what to put on it except my lone experience. So I wanted to ask, will being primarily self-taught with some experience on small projects I've done for a few clients limit me too much? I mean I know I need some kind of education so I've enrolled part time in a community college to work on a degree in computer science, but it's years till then. And if it will limit me a lot, what kind of skills would be good to work on to make my chances any better? Thank You

    Read the article

  • QtCreator on linux: 32-bits vs. 64-bits.

    - by Claire Huang
    My laptop is 64-bits, so when I start to use Qt, I chose 64-bit QtCreator. Now I'm facing a problem, I wish that the executable files I generated are runnnable on 32-bit linux system. Can I set QtCreator to generate 32-bit executable files? So that I can decide I want to generate 32-bit ones or 64-bit ones. I don't want to install another 32-bit QtCreator <.

    Read the article

  • What is the best way to learn VB/VBA?

    - by Noah
    I have wanted to learn VB and VBA for a long time. My school offers a coarse, but it doesn't fit with the rest of my schedule. It will be my first programing language. I was considering using the textbook my school uses (An introduction to programing using visual basic 2008, but I wold get the 2010 version), but I was wondering if there were better resources I could use. I mainly want to lean to learn VBA so I cam create macros and other tools for MS Word. Please understand that this is the fist time I will be programming and I am teaching myself (with the books/online resources).

    Read the article

  • Path issue in wordpress blog

    - by vsingh
    We are having some issue with our relative path in wordpress. Earlier our application was like http://www.skill-guru.com/skill . So if we type the blog address as http://www.skill-guru.com/blog it would add a / at end and open it as http://www.skill-guru.com/blog/ Now our application opens as root in domain http://www.skill-guru.com. Our blog is opening as http://www.skill-guru.com/blog/ but not as http://www.skill-guru.com/blog. I am not able to understand the reason. because of this issue , search is also not working. Can anyone please help me understand what has changed and how it can be fixed ?

    Read the article

  • how do I insert an hidden token in my form to prevent double posts? (PHP)

    - by jpjp
    I want to prevent users from accidentally posting a comment twice. I use the PRG (post redirect get) method, so that I insert the data on another page then redirect the user back to the page which shows the comment. This allows users to refresh as many times as they want. However this doesn't work when the user goes back and clicks submit again or when they click submit 100 times really fast. I don't want 100 of the same comments. I looked at related questions on SO and found that a token is best. But I am having trouble using it. //makerandomtoken(20) returns a random 20 length char. <form method="post" ... > <input type="text" id="comments" name="comments" class="commentbox" /><br/> <input type="hidden" name="_token" value="<?php echo $token=makerandomtoken(20); ?>" /> <input type="submit" value="submit" name="submit" /> </form> if (isset($_POST['submit']) && !empty($comments)) { $comments= mysqli_real_escape_string($dbc,trim($_POST['comments'])); //how do I make the if-statment to check if the token has been already set once? if ( ____________){ //don't insert comment because already clicked submit } else{ //insert the comment into the database } } So I have the token as a hidden value, but how do I use that to prevent multiple clicking of submit.

    Read the article

  • Programatically detect number of physical processors/cores or if hyper-threading is active on Window

    - by HTASSCPP
    I have a multithreaded c++ application that runs on Windows, Mac and a few Linux flavours. To make a long story short: Inorder for it to run at maximum efficiency I have to be able to instantiate a single thread per physical processor/core. Creating more threads than there are physical processors/cores degrades the performance of my program considerably. I can already correctly detect the number of logical processors/cores correctly on all three of these platforms. To be able to detect the number of physical processors/cores correctly I'll have to detect if hyper-treading is supported AND active. My question therefore is if there is a way to detect whether hyperthreading is supported AND ENABLED? If so, how exactly.

    Read the article

  • Entity Framework - Foreign key constraints not added for inherited entity

    - by Tri Q
    Hello, It appears to me that a strange phenomenon is occurring with inherited entities (TPT) in EF4. I have three entities. 1. Asset 2. Property 3. Activity Property is a derived-type of Asset. Property has many activities (many-to-many) When modeling this in my EDMX, everything seems fine until I try to insert a new Property into the database. If the property does not contain any Activity, it works, but all hell breaks loose when I add some new activities to the new Property. As it turns out after 2 days of crawling the web and fiddling around, I noticed that in the EF store (SSDL) some of the constraints between entities were not picked up during the update process. Property_Activity table which links properties and activities show only one constraint FK_Property_Activity_Activity but FK_Property_Activity_Property was missing. I knew this is an Entity Framework anomoly because when I switched the relationship in the database to: Asset <-- Asset_Activity <-- Activity After an update, all foreign key constraints are picked up and the save is successful, with or without activities in the new property. Is this intended or a bug in EF? How do I get around this problem? Should I abandon inheritance altogether?

    Read the article

  • Where should I put code that is supposed to fire AFTER the view has loaded?

    - by Timbo
    I’m writing an objective-c program that does some calculations based on time and will eventually updates UILabels each second. To explain the concept here’s some simplified code, which I’ve placed into the viewDidLoad of the class that handles the view. (void)viewDidLoad { [super viewDidLoad]; // how do i make this stuff happen AFTER the view has loaded?? int a = 1; while (a < 10) { NSLog(@"doing something"); a = a + 1; sleep(1); } } My problem is that the code halts the loading of the view until the loop is all complete (in this case 10 seconds). Where should I put code that I want to fire AFTER the view has finished loading? newbie question I know =/

    Read the article

  • Creating a Comment Anchor

    - by John
    Hello, The function below allows a user to insert a comment into a MySQL table called "comment." Then, the file "comments2.php" displays all comments for a given submission. Right after a user submits a comment, I would like the top of the user's browser to be anchored by the comment the user just submitted. How can I do this? Thanks in advance, John The function: function show_commentbox($submissionid, $submission, $url, $submittor, $submissiondate, $countcomments, $dispurl) { echo '<form action="http://www...com/.../comments/comments2.php" method="post"> <input type="hidden" value="'.$_SESSION['loginid'].'" name="uid"> <input type="hidden" value="'.$submissionid.'" name="submissionid"> <input type="hidden" value="'.stripslashes($submission).'" name="submission"> <input type="hidden" value="'.$url.'" name="url"> <input type="hidden" value="'.$submittor.'" name="submittor"> <input type="hidden" value="'.$submissiondate.'" name="submissiondate"> <input type="hidden" value="'.$countcomments.'" name="countcomments"> <input type="hidden" value="'.$dispurl.'" name="dispurl"> <label class="addacomment" for="title">Add a comment:</label> <textarea class="checkMax" name="comment" type="comment" id="comment" maxlength="1000"></textarea> <div class="commentsubbutton"><input name="submit" type="submit" value="Submit"></div> </form> '; } The file comments2.php contains: $query = sprintf("INSERT INTO comment VALUES (NULL, %d, %d, '%s', NULL)", $uid, $subid, $comment); mysql_query($query) or die(mysql_error()); $submissionid = mysql_real_escape_string($_POST['submissionid']); $submissionid = mysql_real_escape_string($_GET['submissionid']); $sqlStr = "SELECT comment.comment, comment.datecommented, login.username FROM comment LEFT JOIN login ON comment.loginid=login.loginid WHERE submissionid=$submissionid ORDER BY comment.datecommented ASC LIMIT 100"; $tzFrom1 = new DateTimeZone('America/New_York'); $tzTo1 = new DateTimeZone('America/Phoenix'); $result = mysql_query($sqlStr); $arr = array(); echo "<table class=\"commentecho\">"; $count = 1; while ($row = mysql_fetch_array($result)) { $dt1 = new DateTime($row["datecommented"], $tzFrom1); $dt1->setTimezone($tzTo1); echo '<tr>'; echo '<td rowspan="3" class="commentnamecount">'.$count++.'.</td>'; echo '<td class="commentname2"><a href="http://www...com/.../members/index.php?profile='.$row["username"].'">'.$row["username"].'</a></td>'; echo '<td rowspan="3" class="commentname1">'.stripslashes($row["comment"]).'</td>'; echo '</tr>'; echo '<tr>'; echo '<td class="commentname2">'.$dt1->format('F j, Y').'</td>'; echo '</tr>'; echo '<tr>'; echo '<td class="commentname2a">'.$dt1->format('g:i a').'</td>'; echo '</tr>'; } echo "</table>"; The fields in the MySQL table "comment": commentid loginid submissionid comment datecommented

    Read the article

  • Exporting Eclipse project with a reference to native library

    - by TacB0sS
    I have an Eclipse project, that uses JMF, I found out I could skip the JMF installation process and still to use the CaptureDeviceManager of the JMF, and to receive the list of devices if I could point my project to the native lib of the JMF. I've managed to add the native lib to the IDE run/debug, but once I export the application to an external runnable Jar, the application cannot find the native lib. the files are located in c:\JMF*.dll I tried to add the folder path to the environment variable in windows - didn't work. I tried to add them into another Jar and add it to the project - didn't work. I tried to add the files into the project - didn't work. I tried to add the path to the class path - didn't work. I tried to add the path to the library path - didn't work. does someone have any sort of a solution? Thanks in advance, Adam Zehavi.

    Read the article

  • Advantage of using Thread.Start vs QueueUserWorkItem

    - by Cheeso
    In multithreaded .NET programming, what are the decision criteria for using ThreadPool.QueueUserWorkItem versus starting my own thread via new Thread() and Thread.Start()? In a server app (let's say, an ASP.NET app or a WCF service) I think the ThreadPool is always there and available. What about in a client app, like a WinForms or WPF app? Is there a cost to spin up the thread pool? If I just want 3 or 4 threads to work for a short period on some computation, is it better to QUWI or to Thread.Start().

    Read the article

  • Beginner SQL section: avoiding repeated expression

    - by polygenelubricants
    I'm entirely new at SQL, but let's say that on the StackExchange Data Explorer, I just want to list the top 15 users by reputation, and I wrote something like this: SELECT TOP 15 DisplayName, Id, Reputation, Reputation/1000 As RepInK FROM Users WHERE RepInK > 10 ORDER BY Reputation DESC Currently this gives an Error: Invalid column name 'RepInK', which makes sense, I think, because RepInK is not a column in Users. I can easily fix this by saying WHERE Reputation/1000 > 10, essentially repeating the formula. So the questions are: Can I actually use the RepInK "column" in the WHERE clause? Do I perhaps need to create a virtual table/view with this column, and then do a SELECT/WHERE query on it? Can I name an expression, e.g. Reputation/1000, so I only have to repeat the names in a few places instead of the formula? What do you call this? A substitution macro? A function? A stored procedure? Is there an SQL quicksheet, glossary of terms, language specification, anything I can use to quickly pick up the syntax and semantics of the language? I understand that there are different "flavors"?

    Read the article

  • IIS server, web page giving error, some XML ERROR

    - by user287745
    whenever i needed to test my web site, i used to press ctrl and f5. i recently installed installed iis service. kept an html page accessed it from host kept an fully developed default.aspx page in the www directory tried to access gave error of XML something.... that means i can only use HTML pages, ? so what to do if i am using c# asp.net?

    Read the article

  • Mysql password hashing method old vs new

    - by The Disintegrator
    I'm trying to connect to a mysql server at dreamhost from a php scrip located in a server at slicehost (two different hosting companies). I need to do this so I can transfer new data at slicehost to dreamhost. Using a dump is not an option because the table structures are different and i only need to transfer a small subset of data (100-200 daily records) The problem is that I'm using the new MySQL Password Hashing method at slicehost, and dreamhost uses the old one, So i get $link = mysql_connect($mysqlHost, $mysqlUser, $mysqlPass, FALSE); Warning: mysql_connect() [function.mysql-connect]: OK packet 6 bytes shorter than expected Warning: mysql_connect() [function.mysql-connect]: mysqlnd cannot connect to MySQL 4.1+ using old authentication Warning: mysql_query() [function.mysql-query]: Access denied for user 'nodari'@'localhost' (using password: NO) facts: I need to continue using the new method at slicehost and i can't use an older php version/library The database is too big to transfer it every day with a dump Even if i did this, the tables have different structures I need to copy only a small subset of it, in a daily basis (only the changes of the day, 100-200 records) Since the tables are so different, i need to use php as a bridge to normalize the data Already googled it Already talked to both support stafs The more obvious option to me would be to start using the new MySQL Password Hashing method at dreamhost, but they will not change it and i'm not root so i can't do this myself. Any wild idea? By VolkerK sugestion: mysql> SET SESSION old_passwords=0; Query OK, 0 rows affected (0.01 sec) mysql> SELECT @@global.old_passwords,@@session.old_passwords, Length(PASSWORD('abc')); +------------------------+-------------------------+-------------------------+ | @@global.old_passwords | @@session.old_passwords | Length(PASSWORD('abc')) | +------------------------+-------------------------+-------------------------+ | 1 | 0 | 41 | +------------------------+-------------------------+-------------------------+ 1 row in set (0.00 sec) The obvious thing now would be run a mysql SET GLOBAL old_passwords=0; But i need SUPER privilege to do that and they wont give it to me if I run the query SET PASSWORD FOR 'nodari'@'HOSTNAME' = PASSWORD('new password'); I get the error ERROR 1044 (42000): Access denied for user 'nodari'@'67.205.0.0/255.255.192.0' to database 'mysql' I'm not root... The guy at dreamhost support insist saying thet the problem is at my end. But he said he will run any query I tell him since it's a private server. So, I need to tell this guy EXACTLY what to run. So, telling him to run SET SESSION old_passwords=0; SET GLOBAL old_passwords=0; SET PASSWORD FOR 'nodari'@'HOSTNAME' = PASSWORD('new password'); grant all privileges on *.* to nodari@HOSTNAME identified by 'new password'; would be a good start?

    Read the article

  • actionscript 3 addchild within child and fade

    - by steve
    Here is my current code: import flash.display.*; import fl.transitions.*; import flash.events.MouseEvent; stop(); var container:MovieClip = new MovieClip(); container.width = 450; container.height = 450; container.x = 450; container.y = 0; var closeBtn:close_btn = new close_btn(); closeBtn.x = 850; closeBtn.y = 15; var bagLink:MovieClip = new bag_link_mc(); bagLink.x = 900; bagLink.y = 0; menu_bag_button.addEventListener(MouseEvent.CLICK, bagClick); function bagClick(event:MouseEvent):void{ if(MovieClip(root).currentFrame == 850) { } else { MovieClip(root).addChild (bagLink); MovieClip(root).addChild (closeBtn); MovieClip(root).gotoAndPlay(806); } } closeBtn.addEventListener(MouseEvent.CLICK, closeBag); function closeBag (event:MouseEvent):void{ MovieClip(root).removeChild(bagLink); MovieClip(root).removeChild(closeBtn); MovieClip(root).gotoAndPlay(850); } I need the first mouse function (bagClick) to create the bagLink within the container movieclip variable. I tried change it to this, but it didn't work: else { MovieClip(root).addchild (container); MovieClip(root).container.addChild (bagLink); MovieClip(root).addChild (closeBtn); MovieClip(root).gotoAndPlay(806); } I'm also trying to make "container" or "bagLink" fade in when it loads but that doesn't work either. Any help is appreciated.

    Read the article

  • Will being self-taught limit me?

    - by Isaiah
    I'm 21 and am pretty efficient in html/css, python, and javascript. I also know my way around lisp languages and enjoy programing in them. My problem is that I'm extremely self-taught and not quite confident that I could land a job programing, but I really need a job soon as I've just become a father. I haven't even created a resume yet because I'm not really sure what to put on it except my lone experience. So I wanted to ask, will being primarily self-taught with some experience on small projects I've done for a few clients limit me too much? I mean I know I need some kind of education so I've enrolled part time in a community college to work on a degree in computer science, but it's years till then. And if it will limit me a lot, what kind of skills would be good to work on to make my chances any better? Thank You

    Read the article

  • How do I determine the revision number of an Android build?

    - by hermo
    I know how to get the API level, android.os.Build.VERSION.SDK_INT, but there are also several revisions of each level release, e.g. for 2.1 there's rev 1 and 2. How do I determine the revision of a build? The reason i'd like to know this is that I have a workaround for a bug in Android 2.1 (and 2.2), and this workaround will break the moment the corresponding bug is fixed. So right now i'm in the odd position of hoping that the bug won't be fixed (at least not until I can find an answer to above question).

    Read the article

  • java detect clicked buttons

    - by user253530
    I have multiple panels on a JFrame window. I am going to populate each panel differently every time. For example: i start the GUI: (image center panel, right panel, bottom panel). Center panel is populated with 20 buttons, right panel with 10 buttons and bottom panel with 3. second start of the GUI (same gui). Center panel has 50 buttons, right panel has 12 buttons, bottom has 3. So everytime there is a random number of buttons, impossible to be all uniquely named. Given the fact that I don't have a unique name for each button (just a list) I would like to know which buttons were clicked according to the panel they belong to. is that possible?

    Read the article

  • Pagination - Twitter's people you follow

    - by anselmophil
    Hi guys, im developing an Android application for twitter that will sync data coming from the people you follow. The problem is that: http://api.twitter.com/1/statuses/friends.json provides me the last 100 persons ive followed and i wanted to display only 20 for each 'page'. I believe that the 'cursor' parameter doesnt do what i need, so i'm trying to figure out a way to store it. Can you guys give me enlightenment? Thanks in advance

    Read the article

  • What are some methods to prevent double posting in a form? (PHP)

    - by jpjp
    I want to prevent users from accidentally posting a comment twice. I use the PRG (post redirect get) method, so that I insert the data on another page then redirect the user back to the page which shows the comment. This allows users to refresh as many times as they want. However this doesn't work when the user goes back and clicks submit again or when they click submit 100 times really fast. I don't want 100 of the same comments. I looked at related questions on SO and found that a token is best. But I am having trouble using it. //makerandomtoken(20) returns a random 20 length char. <form method="post" ... > <input type="text" id="comments" name="comments" class="commentbox" /><br/> <input type="hidden" name="_token" value="<?php echo $token=makerandomtoken(20); ?>" /> <input type="submit" value="submit" name="submit" /> </form> if (isset($_POST['submit']) && !empty($comments)) { $comments= mysqli_real_escape_string($dbc,trim($_POST['comments'])); //how do I make the if-statment to check if the token has been already set once? if ( ____________){ //don't insert comment because already clicked submit } else{ //insert the comment into the database } } So I have the token as a hidden value, but how do I use that to prevent multiple clicking of submit. METHODS: someone suggested using sessions. I would set the random token to $_SESSION['_token'] and check if that session token is equal to the $_POST['_token'], but how do I do that? When I tried, it still doesn't check

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >