Search Results

Search found 28486 results on 1140 pages for 'think floyd'.

Page 5/1140 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Byte = 8bits, but why doesn't BitConverter think so

    - by Paul Farry
    Given the following information Public Enum Request As Byte None = 0 Identity = 1 License = 2 End Enum Protected mType As Communication.Request mType = Communication.Request.Identity Debug.Print (BitConverter.GetBytes(mType).Length.tostring) 2 Why does bitconverter report that mType is a length of 2. I would have thought that passing a Byte into BitConverter.GetBytes would just return the Byte. I mean it's no big deal because it's only sending a very small block of data across a TCP Socket, but I'm just intrigued why it thinks it's 2 bytes.

    Read the article

  • css newline issues (I think!)

    - by user328371
    Hi, I'm trying to create a breezebrowser template (used for generating image galleries locally, outputs HTML). I've taken the HTML from my wordpress template and managed to generate the following gallery http://uploads.peasyphotos.com/20100607t-candids/gallery/ but each image goes on a new line and i don't know why, i presume it's in the CSS. What should I be looking for in the CSS to try and stop this, or what can I put around my template code to disable the CSS for that part? Thanks

    Read the article

  • Make seems to think a prerequisite is an intermediate file, removes it

    - by James
    For starters, this exercise in GNU make was admittedly just that: an exercise rather than a practicality, since a simple bash script would have sufficed. However, it brought up interesting behavior I don't quite understand. I've written a seemingly simple Makefile to handle generation of SSL key/cert pairs as necessary for MySQL. My goal was for make <name> to result in <name>-key.pem, <name>-cert.pem, and any other necessary files (specifically, the CA pair if any of it is missing or needs updating, which leads into another interesting follow-up exercise of handling reverse deps to reissue any certs that had been signed by a missing/updated CA cert). After executing all rules as expected, make seems to be too aggressive at identifying intermediate files for removal; it removes a file I thought would be "safe" since it should have been generated as a prereq to the main rule I'm invoking. (Humbly translated, I likely have misinterpreted make's documented behavior to suit my expectation, but don't understand how. ;-) Edited (thanks, Chris!) Adding %-cert.pem to .PRECIOUS does, of course, prevent the deletion. (I had been using the wrong syntax.) Makefile: OPENSSL = /usr/bin/openssl # Corrected, thanks Chris! .PHONY: clean default: ca clean: rm -I *.pem %: %-key.pem %-cert.pem @# Placeholder (to make this implicit create a rule and not cancel one) Makefile: @# Prevent the catch-all from matching Makefile ca-cert.pem: ca-key.pem $(OPENSSL) req -new -x509 -nodes -days 1000 -key ca-key.pem $@ %-key.pem: $(OPENSSL) genrsa 2048 $@ %-cert.pem: %-csr.pem ca-cert.pem ca-key.pem $(OPENSSL) x509 -req -in $ $@ Output: $ make host1 /usr/bin/openssl genrsa 2048 ca-key.pem /usr/bin/openssl req -new -x509 -nodes -days 1000 -key ca-key.pem ca-cert.pem /usr/bin/openssl genrsa 2048 host1-key.pem /usr/bin/openssl req -new -days 1000 -nodes -key host1-key.pem host1-csr.pem /usr/bin/openssl x509 -req -in host1-csr.pem -days 1000 -CA ca-cert.pem -CAkey ca-key.pem -set_serial 01 host1-cert.pem rm host1-csr.pem host1-cert.pem This is driving me crazy, and I'll happily try any suggestions and post results. If I'm just totally noobing out on this one, feel free to jibe away. You can't possibly hurt my feelings. :)

    Read the article

  • Looking for a specific featured content slider script - PHP (and jQuery, I think)

    - by Sootah
    I was looking around a few days ago for a new script to replace the featured content area on my website's current implementation. Randomly, I can across a gorgeous one that I have not been able to find again because, like an idiot, I didn't bookmark the page. It's difficult to explain what the slider looked like, so I'll try to make a crude ASCII image of it: When you would hover your mouse over one of the "title" areas that were visible, the rest of the tags would slide to the right and show the one you were hovering on. You could also hover the mouse over a tab on the right and the tabs would collapse left for the same effect. I don't know if this particular effect has a specific name to it, but for the life of me I cannot find this script again, or anything even like it. It was gorgeous. I've resorted to combing through my browser history, but there is sooooo much of it, and I cannot remember what day I saw it. So, if any of you know either what the name of this effect is, or even BETTER, what script I'm talking about, I would REAAAAALLLLYYY appreciate a link! Thanks as always! -Sootah

    Read the article

  • HTML Encoding Charset Problem I think?

    - by ETFairfax
    Hi People. I've been asked to add a testimonial to this page... http://www.orchardkitchens.com/Showroom/testimonials.html As you will see there are funny characters showing up all over the place, and it has thrown the structure of the page out. I've since reloaded the backup and the funny chars are still appearing. Any ideas what I need to do?? Please ask if you need more info from me about the problem in hand. Many thanks, ETFairfax.

    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

  • Reducing load time, or making the user think the load time is less

    - by Malfist
    I've been working on a website, and we've managed to reduce the total content for a page load from 13.7MiB's to 2.4, but the page still takes forever to load. It's a joomla site (ick), and it has a lot of redundant DOM elements (2000+ for the home page), and make 60+ HttpRequest's per page load, counting all the css, js, and image requests. Unlike drupal, joomla won't merge them all on the fly, and they have to be kept separate or else the joomla components will go nuts. What can I do to improve load time? Things I've done: Added colors to dom elements that have large images as their background so the color is loaded, then the image Reduced excessively large images to much smaller file sizes Reduced DOM elements to ~2000, from ~5000 Loading CSS at the start of the page, and javascript at the end Not totally possible, joomla injects it's own javascript and css and it does it at the header, always. Minified most javascript Setup caching and gziping on server Uncached size 2.4MB, cached is ~300KB, but even with so many dom elements, the page takes a good bit of time to render. What more can I do to improve the load time?

    Read the article

  • When/Why ( if ever ) should i think about doing Generic Programming/Meta Programming

    - by hotadvice
    Hi there IMHO to me OOPS, design patterns make sense and i have been able to apply them practically. But when it comes to "generic programming /meta programming" of the Modern C++ kind, i am left confused. -- Is it a new programming/design paradigm ? -- Is it just limited to "library development"? If not, What design/coding situations call for using meta programming/generic programming. -- Does using templates mean i am doing generic programming? I have googled a lot on this topic but do not grasp the BIG PICTURE fully. Also see this post. After reading dicussions here under, up till now, I am sure ( might still not be correct): a) Generic programming and meta programming are two different concepts.

    Read the article

  • PHP error can't figure it out something to do with SQL stuff I think

    - by MrEnder
    Ok the error is showing up somewhere in this here code if($error==false) { $query = pg_query("INSERT INTO chatterlogins(firstName, lastName, gender, password, ageMonth, ageDay, ageYear, email, createDate) VALUES('$firstNameSignup', '$lastNameSignup', '$genderSignup', md5('$passwordSignup'), $monthSignup, $daySignup, $yearSignup, '$emailSignup', now());"); $query = pg_query("INSERT INTO chatterprofileinfo(email, lastLogin) VALUES('$email', now())";); $_SESSION['$userNameSet'] = $email; header('Location: signup_step2.php'.$rdruri); } anyone see what I did wrong??? sorry for being so unspecific but ive been staring at it for 10 mins and I can't figure it out.

    Read the article

  • [hibernate - jpa] @OneToOne annotoation problem (i think...)

    - by blow
    Hi all, im new in hibernate and JPA and i have some problems with annotations. My target is to create this table in db (PERSON_TABLE with personal-details) ID ADDRESS NAME SURNAME MUNICIPALITY_ID First of all, i have a MUNICIPALITY table in db containing all municipality of my country. I mapped this table in this ENTITY: @Entity public class Municipality implements Serializable { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) private Long id; private String country; private String province; private String name; @Column(name="cod_catasto") private String codCatastale; private String cap; public Municipality() { } ... Then i make an EMBEDDABLE class Address containing fields that realize a simple address... @Embeddable public class Address implements Serializable { @OneToOne(cascade=CascadeType.ALL) @JoinColumn(name="id_municipality") private Municipality municipality; @Column(length=45) private String address; public Address() { } ... Finally i embedded this class into Person ENTITY @Entity public class Person implements Serializable { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) private Long id; private String name; private String surname; @Embedded private Address address; public Person() { } ... All works good when i have to save a new Person record, in fact hibernate creates a PERSON_TABLE as i want, but if i try to retrieve a Person record i have an exception. HQL is simply "from Person" The excpetion is (Entities is the package containing all classes above-mentioned): org.hibernate.AnnotationException: @OneToOne or @ManyToOne on Entities.Person.address.municipality references an unknown entity: Entities.Municipality Is the @OneToOne annotation the problem? Thanks.

    Read the article

  • Calling member method on unmanaged C++ pointer from C# (I think)

    - by Jacob G
    I apologize in advance if this is a trivial question... I'm pretty C++ / unmanaged dumb. Here's a simplified analog to my setup: --In myUnmanagedObject.h in DLL: class myUnmanagedObject { public: virtual void myMethod(){} } --In MyControl.h in Assembly #1: #pragma make_public(myUnmanagedObject) [event_source(managed)] public ref class MyControl : public System::Windows::Forms::UserControl { public: myUnmanagedObject* GetMyUnmanagedObject(); } --in C# in Assembly #2: unsafe { MyControl temp = new MyControl(); myUnmanagedObject* obj = temp.GetMyUnmanagedObject(); obj-myMethod(); } I get a compile error saying that myUnmanagedObject does not contain a definition for myMethod. Assembly #2 references Assembly #1. Assembly #1 references DLL. If I compile the DLL with /clr and reference it directly from Assembly #2, it makes no difference. How, from C#, do I execute myMethod ?

    Read the article

  • Need Help with Page Life Cycle(I think it is screwing me up)

    - by chobo2
    Hi I have dragged a empty asp.net table onto my webform. I generate all the rows in the code behind those. Now my table gets filled up and has dropdown lists. When the user hits save I go through all the rows and update the values from the dropdownlist in the db. This works all great. However if 2 columns have each have "Present" then those 2 columns should be not be shown anymore and 2 new columns get put in its place with other dropdown lists. This all works. However you have to refresh the entire page to for the 2 columns that should go away to go away. So what I tried to do is at the end of the button click event. Clear the whole table and then regenerate it. However when I do this then my values are not saved to the database anymore for whatever reason. if (IsPostBack == false) { // check if dummy variables exist in db- If true just generate tables with values in db. If not generate them. } else { // grab the values from the database // generate tables with the values } btn click event { go through all rows in table(foreach loop) update each column in the database with cells in each row. while in foreach loop. //done } So this is how it goes and it works expect(all correct values are saved) the table is just not updated to the user. Does not work if (IsPostBack == false) { // same code as above } // if postback is true do nothing. By the time it gets to the click event it says there is zero rows in the table so nothing happens. btn click event { // same code } Fails also. if (IsPostBack == false) { // same code as above } else { // same code as above but moved into its own method. gernerateTable(); } btn click event { // update all rows // once done clear the Tables rows // call generateTable() } This last one does nothing as for some reason it does not update anything. I don't understand why. So what am I doing wrong with this life cycle something in my process is wrong. The code works just not when I want the table to be updated right away.

    Read the article

  • A think on sum(X, 1)

    - by Runner
    >> X = [0 1 2 3 4 5] >> sum(X, 1) ans = 3 5 7 sum(X, 1) should sum along the 1st dimension(row) as per the document says: S = SUM(X,DIM) sums along the dimension DIM. But why does it actually sums along the 2nd dimension(column)?

    Read the article

  • What do you think of WinDev?

    - by vIceBerg
    I have a job opportunity. They use WinDev. I did some research about it and, although it seams pretty prometting, the website claims that it's used by only 100,000 developpers. Have you worked with this language? What's your thoughts?

    Read the article

  • CALayer Border is appearing above subview (Z-order related, I think)

    - by kurisukun
    I have searched but could not find the reason for this behavior. I have a UIButton whose image I am setting. Here is how the button should appear. Note that this is just a photoshop of the intended button design: Essentially, it is a square custom UIButton with a white border and a little surrounding shadow. In the upper right corner, there is a "X" mark, that will be added programmatically as a subview. Here is the screenshot of the button within the actual app. At this point, I have only added a shadow and the X mark as a subview: How, when I try to add the white border, here is what it looks like: It seems that the white border is appearing above the X mark sublayer. I don't know why. Here is the code that I am using: // selectedPhotoButton is the UIButton with UIImage set earlier // At this point, I am adding in the shadow [selectedPhotoButton layer] setShadowColor:[[UIColor lightGrayColor] CGColor]]; [[selectedPhotoButton layer] setShadowOffset: CGSizeMake(1.0f, 1.0f)]; [[selectedPhotoButton layer] setShadowRadius:0.5f]; [[selectedPhotoButton layer] setShadowOpacity:1.0f]; // Now add the white border [[selectedPhotoButton layer] setBorderColor:[[UIColor whiteColor] CGColor]]; [[selectedPhotoButton layer] setBorderWidth:2.0]; // Now add the X mark subview UIImage *deleteImage = [UIImage imageNamed:@"nocheck_photo.png"]; UIImageView *deleteMark = [[UIImageView alloc] initWithFrame:CGRectMake(53, -5, 27, 27)]; deleteMark.contentMode = UIViewContentModeScaleAspectFit; [deleteMark setImage:deleteImage]; [selectedPhotoButton addSubview:deleteMark]; [deleteMark release]; I don't understand why the border is appearing above the deleteMark subview. Is there any way to get the intended effect? Thank you!

    Read the article

  • "Parsing" I think is the word.

    - by Anonymous the Great
    I'm working on a little parsing thing to color objects. For an example, you could type red:Hi!: and "Hi!" would be red. This is my not working code: <script type="text/javascript"> function post() { var preview = document.getElementById("preview"); var submit = document.getElementById("post"); var text = submit.value; <?php str_replace("red:*:",'<i class="red">*</i>',text); ?> preview.value = text; } </script>

    Read the article

  • Sed substitution not doing what I want and think it should do

    - by nategoose
    I have am trying to use sed to get some info that is encoded within the path of a file which is passed as a parameter to my script (Bourne sh, if it matters). From this example path, I'd like the result to be 8 PATH=/foo/bar/baz/1-1.8/sing/song I first got the regex close by using sed as grep: echo $PATH | sed -n -e "/^.*\/1-1\.\([0-9][0-9]*\).*/p" This properly recognized the string, so I edited it to make a substitution out of it: echo $PATH | sed -n -e "s/^.*\/1-1\.\([0-9][0-9]*\).*/\1/" But this doesn't produce any output. I know I'm just not seeing something simple, but would really appreciate any ideas about what I'm doing wrong or about other ways to debug sed regular expressions.

    Read the article

  • jQuery Syntax Question, pretty easy I think..

    - by Fuego DeBassi
    Hi all, question: <script type="text/javascript"> $(document).ready(function() { $(".module .caption").hide(); $(".module").hover(function() { $(this).find(".caption").slideDown(); },function() { $(this).find(".caption").slideUp(); }); }); </script> This snippet works great for my purposes, the only caveat is that I need the .module hover function to simultaneously add a class of "under" to all other ".caption"'s that are not $this, and then remove them when the hover ends. So basically I don't want the "module" that is hovered to get the class, I want it to do exactly what I am showing here...sliding .caption up and down on end hover, I just want all other ".caption"s to get the under class when any ".module" is hovered. Just hitting a dead end with what I have been trying, want to do it in the same function. Any ideas?

    Read the article

  • g++ doesn't think I'm passing a reference

    - by Ben Jones
    When I call a method that takes a reference, g++ complains that I'm not passing a reference. I thought that the caller didn't have to do anything different for PBR. Here's the offending code: //method definition void addVertexInfo(VertexInfo &vi){vertexInstances.push_back(vi);} //method call: sharedVertices[index]->addVertexInfo(VertexInfo(n1index, n2index)); And here's the error: GLUtils/GLMesh.cpp: In member function 'void GLMesh::addPoly(GLIndexedPoly&)': GLUtils/GLMesh.cpp:110: error: no matching function for call to 'SharedVertexInfo::addVertexInfo(VertexInfo)' GLUtils/GLMesh.h:93: note: candidates are: void SharedVertexInfo::addVertexInfo(VertexInfo&)

    Read the article

  • Either .each do or .all isn't working how I think it should

    - by user1299656
    So whenever someone rates a shop, I want the Shop model to calculate its new average rating and store that in the database (instead of calculating the average every time someone looks at it). So I wrote the segment of code that follows, and it doesn't work. The loop always iterates exactly once, no matter how many shop_ratings in the database exist that have the shop's id as their shop_id. I played around with it a bit and found that every time a new rating is submitted the function is called successfully, but it only runs the loop once and sets the average to what the first rating was. I don't know if the "query" that sets the ratings variable is wrong or if it's the loop that's wrong. class Shop < ActiveRecord::Base has_many :shop_ratings attr_accessible :name, :latitude, :longitude validates_presence_of :name validates_presence_of :latitude validates_presence_of :longitude def distance_to(lat, long) return (self.longitude - long) + (self.latitude - lat) end def find_average total = 0 count = 0 ratings = ShopRating.all(:conditions => {:shop_id => id}) ratings.each do |submission| total = total + submission.rating count = count + 1 end update_attribute :average_rating, total/count end end

    Read the article

  • What do you think of Visual Studio 2010?

    - by George Edison
    Since it came out a few days ago, I am sure at least some members of SO had a chance to try it out. For those that did, I wonder if you could share the following: Whether you liked/disliked it What you liked/disliked Whether it's worth upgrading To ensure fairness (and to make the mods happy) I will make this CW.

    Read the article

  • I think I don't understand git branches

    - by Hans
    Salutations everyone, I have been working on a bash script as a small summer project to learn more about UNIX scripting and on using git. This has been the first time that I have used branches in git, normally I just stick to master. I was viewing the git log with the graph (git log --graph) when I noticed that my 'develop' branch seemed to have merged with 'master'. Something like this: master ----1--------3----4----5----6----HEAD develop \---2---/ but commits 3 onwards were done within the develop branch. Doing git checkout master and git checkout develop showed this to be true. What exactly is going on? Is this what is known as fast-forwarding? P.S.: Commits 1 and 2 are also a mystery to me being that commit 2 is actually an amendment of commit 1 (as far I thought, I used this advice)

    Read the article

  • sql query help join (i think)

    - by milan
    I am having trouble figuring our how I can get results only when products.published, product_types.published, and product_cats.published = 1 but my query isn't working. Please help: SELECT `products`.`title`, `products`.`menu_id`, `products`.`short_description`, `products`.`datasheet_icon`, `products`.`datasheet`, `products`.`ordering`, `products`.`product_type_id`, CASE WHEN CHAR_LENGTH(`products`.`alias`) THEN CONCAT_WS(':', `products`.`id`, `products`.`alias`) ELSE `products`.`id` END AS slug FROM `products`, `product_cats`, `product_types` WHERE `products`.published=1 AND `product_cats`.published=1 AND `product_types`.published=1 AND `products`.`product_cat_id`='42' AND `product_types`.`id` IN (1,40,48,49,50) GROUP BY `products`.`id` ORDER BY `product_types`.`ordering`, `products`.`ordering`

    Read the article

  • Do you think that exposure to BASIC can mutilate your mind? [closed]

    - by bigown
    It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration -- Edsger W. Dijkstra I have deep respect to Dijkstra but I don't agree with everything he said/wrote. I disagree specially with this quote on linked paper wrote 35 years ago about the Dartmouth BASIC implementation. Many of my coworkers or friends programmers started with BASIC, questions below have answers that indicate many programmers had their first experience on programming at BASIC. AFAIK many good programmers started at BASIC programming. I'm not talking about Visual Basic or other "modern" dialects of BASIC running on machines full of resources. I'm talking about old times BASIC running on "toy" computer, that the programmer had to worry about saving small numbers that need not be calculated as a string to save a measly byte because the computer had only a few hundreds of them, or have to use computed goto for lack of a more powerful feature, and many other things which require the programmer to think much before doing something and forcing the programmer to be creative. If you had experience with old time BASIC on a machine with limited resources (have in mind that a simple micro-controller today has much more resources than a computer in 1975, do you think that BASIC help your mind to find better solutions, to think like an engineer or BASIC drag you to dark side of programming and mutilated you mentally? Is good to learn a programming language running on a computer full of resources where the novice programmer can do all wrong and the program runs without big problems? Or is it better to learn where the programmer can't go wrong? What can you say about the BASIC have helped you to be a better/worse programmer? Would you teach old BASIC running on a 2KB (virtual) machine to a coming programmer? Sure, only exposure to BASIC is bad. Maybe you share my opinion that modern BASIC doesn't help too much because modern BASIC, as long other programming languages, gives facilities which allow the programmer doesn't think deeper. Additional information: Why BASIC?

    Read the article

  • How I might think like a hacker so that I can anticipate security vulnerabilities in .NET or Java before a hacker hands me my hat [closed]

    - by Matthew Patrick Cashatt
    Premise I make a living developing web-based applications for all form-factors (mobile, tablet, laptop, etc). I make heavy use of SOA, and send and receive most data as JSON objects. Although most of my work is completed on the .NET or Java stacks, I am also recently delving into Node.js. This new stack has got me thinking that I know reasonably well how to secure applications using known facilities of .NET and Java, but I am woefully ignorant when it comes to best practices or, more importantly, the driving motivation behind the best practices. You see, as I gain more prominent clientele, I need to be able to assure them that their applications are secure and, in order to do that, I feel that I should learn to think like a malevolent hacker. What motivates a malevolent hacker: What is their prime mover? What is it that they are most after? Ultimately, the answer is money or notoriety I am sure, but I think it would be good to understand the nuanced motivators that lead to those ends: credit card numbers, damning information, corporate espionage, shutting down a highly visible site, etc. As an extension of question #1--but more specific--what are the things most likely to be seeked out by a hacker in almost any application? Passwords? Financial info? Profile data that will gain them access to other applications a user has joined? Let me be clear here. This is not judgement for or against the aforementioned motivations because that is not the goal of this post. I simply want to know what motivates a hacker regardless of our individual judgement. What are some heuristics followed to accomplish hacker goals? Ultimately specific processes would be great to know; however, in order to think like a hacker, I would really value your comments on the broader heuristics followed. For example: "A hacker always looks first for the low-hanging fruit such as http spoofing" or "In the absence of a CAPTCHA or other deterrent, a hacker will likely run a cracking script against a login prompt and then go from there." Possibly, "A hacker will try and attack a site via Foo (browser) first as it is known for Bar vulnerability. What are the most common hacks employed when following the common heuristics? Specifics here. Http spoofing, password cracking, SQL injection, etc. Disclaimer I am not a hacker, nor am I judging hackers (Heck--I even respect their ingenuity). I simply want to learn how I might think like a hacker so that I may begin to anticipate vulnerabilities before .NET or Java hands me a way to defend against them after the fact.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >