Search Results

Search found 21991 results on 880 pages for 'going crazy'.

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

  • Clientside going serverside with node.js

    - by Sveisvei
    Hello, I`ve been looking for a serverside language for some time, and python got my attention somewhat. But as I already know and love javascript, I now want learn to code on the server with js and node.js. Now, what books and what subjects do I need to learn to understand the serverside world better? (let me know if Im to vague)

    Read the article

  • Complicted ActiveRecord Association. Going through a 4th table

    - by Dex
    I have kind of a complicated case and am wondering how this would work in rails: I want to categories the genres of some singers. Singers can belong to more than one genres, and users can assign tags to each genre For example: singers <-- singers_genres -- genres <-- genres_tags -- tags SQL would look something like: SELECT * FROM singers S INNER JOIN singers_genres SG ON S.id=SG.singer_id INNER JOIN genres G ON G.id = SG.genre_id LEFT OUTER JOIN genre_tags GT ON G.id = GT.genre_id INNER JOIN tags T ON GT.tag_id = T.id

    Read the article

  • Django Social Registration - Twitter Callback going to example.com

    - by user578888
    I have been working through installing django social registration on my webfaction account. So far I have the facebook login working. When I attempt to log in to to twitter I get the correct login page but after choosing "Allow" I am forwarded to the following URL: http://example.com/social/twitter/callback/.... where "example.com" is the actual URL it is forwarding to. I have setup the twitter app and have entered a valid oauth callback URL. I have searched the code on my developer machine for references to "example.com" but have not found any. Any help nailing this down will be greatly appreciated.

    Read the article

  • Uncompress a TIFF file without going through BufferedImage

    - by Gert
    I am receiving large size CCITT Group 4 compressed TIFF files that need to be written elsewhere as uncompressed TIFF files. I am using the jai_imageio TIFF reader and writer to do that and it works well as long as the product _width * height_ of the image fits in an integer. Here is the code I am using: TIFFImageReaderSpi readerSpi= new TIFFImageReaderSpi(); ImageReader imageReader = readerSpi.createReaderInstance(); byte[] data = blobManager.getObjectForIdAndVersion(id, version); ImageInputStream imageInputStream = ImageIO.createImageInputStream(data); imageReader.setInput(imageInputStream); TIFFImageWriterSpi writerSpi = new TIFFImageWriterSpi(); ImageWriter imageWriter = writerSpi.createWriterInstance(); ImageWriteParam imageWriteParam = imageWriter.getDefaultWriteParam(); imageWriteParam.setCompressionMode(ImageWriteParam.MODE_DISABLED); //bufferFile is created in the constructor ImageOutputStream imageOutputStream = ImageIO.createImageOutputStream(bufferFile); imageWriter.setOutput(imageOutputStream); //Now read the bitmap BufferedImage bufferedImage = imageReader.read(0); IIOImage iIOImage = new IIOImage(bufferedImage, null, null); //and write it imageWriter.write(null, iIOImage, imageWriteParam); Unfortunately, the files that I receive are often very large and the BufferedImage cannot be created. I have been trying to find a way to stream from the ImageReader directly to the ImageWriter but I cannot find out how to do that. Anybody with a suggestion?

    Read the article

  • Java - Runtime.getRuntime().exec() what's going on?

    - by kunkanwan
    Hi, I have problem with Runtime.exec() in Java My code: String lol = "/home/pc/example.txt"; String[] b = {"touch", lol}; try { Runtime.getRuntime().exec(b); } catch(Exception ex) { doSomething(ex); } It's working good but when I trying changle variable "lol" files doesn't create in hard disk for instance: String lol = x.getPath(); where getPath() returns String What should I do ? Thanks for your reply :)

    Read the article

  • How to log all sql going through JBoss datasource with log4j

    - by Ichorus
    I've looked at log4jdbc (which does not support datasources), p6spy which seems to be what I am looking for but it has not been updated since 2003 which makes me nervous and lists only JBoss 3.x (we use JBoss 5), and JAMon which seems heavyweight for what I am trying to accomplish (a simple log of all SQL statements running through a JBoss application server). I was hoping that JBoss itself would have a switch to log all the sql (as Websphere does) but I cannot find any documentation for it so that functionality might not exist.

    Read the article

  • Devision in c# not going the way i expect

    - by Younes
    Im trying to write something to get my images to show correctly. I have 2 numbers "breedtePlaatje" and "hoogtePlaatje". When i load those 2 vars with the values i get back "800" and "500" i expect "verH" to be (500 / 800) = 0,625. Tho the value of verH = 0.. This is the code: int breedtePlaatje = Convert.ToInt32(imagefield.Width); int hoogtePlaatje = Convert.ToInt32(imagefield.Height); //Uitgaan van breedte plaatje if (breedtePlaatje > hoogtePlaatje) { double verH = (hoogtePlaatje/breedtePlaatje); int vHeight = Convert.ToInt32(verH * 239); mOptsMedium.Height = vHeight; mOptsMedium.Width = 239; //Hij wordt te klein en je krijgt randen te zien, dus plaatje zelf instellen if (hoogtePlaatje < 179) { mOptsMedium.Height = 179; mOptsMedium.Width = 239; } } Any tips regarding my approach would be lovely aswell.

    Read the article

  • How to decide on going into management?

    - by Rob Wells
    I read the transcript of a speech by Richard Hamming included as a part of this SO question and the speech had a quote that got me thinking about when someone should move into development. When your vision of what you want to do is what you can do single-handedly, then you should pursue it. The day your vision, what you think needs to be done, is bigger than what you can do single-handedly, then you have to move toward management. And the bigger the vision is, the farther in management you have to go. Any other suggestions as to how you can decide if you want to move away from the coal face and into management?

    Read the article

  • Using install_name_tool what's going wrong?

    - by 0x80
    I'm trying to change the install path of a dylib after it has been build. I use "otool -L" to check what the current path is. And then I do: $ install_name_tool -change /my/current/path/libmine.dylib /my/new/path/libmine.dylib libmine.dylib I don't get an error, but nothing changes. If I check the path again the old one is still there. Also the new path is a lot shorter then the old one, so no problem there, and I think the lib is even compiled with extra flag for more filepath space. Any ideas?

    Read the article

  • Facebook like button not going back side on the fixed div

    - by Lahiru Chathuranga
    I added a Facebook like button to my website.My website has a fixed div on top of the page(blue color div in the image). The like button is below that(in a div which can scroll) My problem is when the page is scroll down the like button comes on top of the fixed div(blue color).I want to scroll it from the backside of the div.How can I do that? There are couple of screenshots I added Before Scroll After Scroll Here is my code of the fixed div <script type="text/javascript"> function got_to_signup(){ window.location.href = "view/policy"; } </script> <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1&appId=368003049941951"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> <div style="width:100%;background-color:#0094d6;" > <div id="dd" style="background-color:#0094d6; width:100%; height:75px;position:fixed; " class="center "><div id="a" style="width:1010px; height:75px; background-color:#000000;background:url(xx.png); background-repeat:no-repeat; font-family:Arial, Helvetica, sans-serif; font-size:11px; color:#003; " class="inner div_border"> <table width="1010" border="0" > <tr > <td width="15%" rowspan="2"><a href="" style="cursor:pointer; cursor:hand;"><div style="width:200px; height:50px;background-color:none;"></div></a></td> <td width="22%" height="14">&nbsp;</td> <td width="5%">&nbsp;</td> <td width="5%">&nbsp;</td> <td width="28%">&nbsp;</td> <td width="2%">&nbsp;</td> <td width="23%">&nbsp;</td> </tr> <tr> <td colspan="4"> </td> <td colspan="2"><span style="float: right; " ><div style="background-color:#006d9e;border-radius:3px; width:250px; height:34px; display: table; vertical-align: middle; color:#FFF; "> <table width="100%" border="0" > <tr > <td width="43%" style="text-align:center"> Start to bump !</td> <td width="29%"><div id='basic-modal'><span style="float: right; " ><input name="login_btn" type="button" class="login_button basic" id="login_btn" value="Sign in" /></span></div></td> <td width="28%"><span style="float: right; " ><form id="form_reg" method="post"><input name="register_btn" type="button" class="register_button" id="register_btn" value="Sign up" onclick="got_to_signup()"/></form></span></td> </tr> </table> </div></span></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td style="color:#FFF; font:Arial, Helvetica, sans-serif; font-size:9px; text-align:right;"> Beta Version </td> </tr> </table> </div></div></div> here is my facebook like button code </script> <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1&appId=368003049941951"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> <td height="21" colspan="2"> <table width="187" style="margin-left:3px;font-size:1px;background-image:url(share_back.png);background-repeat:no-repeat;border-radius:3px;" > <!--tweeter button--> <tr><td width="71"><a href="https://twitter.com/bump_lk" class="twitter-follow-button" data-show-count="false" style="float:right;">Follow @bump_lk</a> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script></td> <!--facebook like button--> <td width="48"><div class="fb-like" data-href="https://www.facebook.com/Bump.lk" data-send="false" data-layout="button_count" data-width="10" data-show-faces="false" style="position:relative;"></div> </td></tr></table></td> <td>&nbsp;</td> <td>&nbsp;</td> <td >

    Read the article

  • Problems when going from SQL 2005 to SQL 2008

    - by Nezdet
    Hi! I did go over from SQL server 2005 to 2008. Doing that gave me some problems with the fulltext search. This site is based on Fulltext search. It occurs more deadlocks, the search is slower and sometimes it return empty lists, don't know why. A lot of people has been writning about they having this problem with 2008. But I haven'tgot any solutions why 2005 worked better for my program.. PLS help me out!

    Read the article

  • Going "behind Hibernate's back" to update foreign key values without an associated entity

    - by Alex Cruise
    Updated: I wound up "solving" the problem by doing the opposite! I now have the entity reference field set as read-only (insertable=false updatable=false), and the foreign key field read-write. This means I need to take special care when saving new entities, but on querying, the entity properties get resolved for me. I have a bidirectional one-to-many association in my domain model, where I'm using JPA annotations and Hibernate as the persistence provider. It's pretty much your bog-standard parent/child configuration, with one difference being that I want to expose the parent's foreign key as a separate property of the child alongside the reference to a parent instance, like so: @Entity public class Child { @Id @GeneratedValue Long id; @Column(name="parent_id", insertable=false, updatable=false) private Long parentId; @ManyToOne(cascade=CascadeType.ALL) @JoinColumn(name="parent_id") private Parent parent; private long timestamp; } @Entity public class Parent { @Id @GeneratedValue Long id; @OrderBy("timestamp") @OneToMany(mappedBy="parent", cascade=CascadeType.ALL, fetch=FetchType.LAZY) private List<Child> children; } This works just fine most of the time, but there are many (legacy) cases when I'd like to put an invalid value in the parent_id column without having to create a bogus Parent first. Unfortunately, Hibernate won't save values assigned to the parentId field due to insertable=false, updatable=false, which it requires when the same column is mapped to multiple properties. Is there any nice way to "go behind Hibernate's back" and sneak values into that field without having to drop down to JDBC or implement an interceptor? Thanks!

    Read the article

  • wmd editor, why does it keep showing html instead of just going straight to markup

    - by Ke
    hi, im wondering how wmd is supposed to work, when i type in the textarea the text doesnt have html, but once the text is stored in db it turns to html. wmd also shows all this html when reloading the content? is it supposed to work like this? Do I have to sanitize the text before its put into the db? if so how? I thought wmd doesnt deal with html? except in code blocks. Also there are p tags being added Using the beneath html it gets added directly. I guess this could cause xss attacks? - (1) <a onmouseover="alert(1)" href="#">read this!</a> - (2) <p <script>alert(1)</script>hello - (3) </td <script>alert(1)</script>hello I wonder how is wmd supposed to work? I thought it was supposed to enter everything in its own mark up, store its on mark up and retrieve it etc. instead of storing plain html Chees Ke

    Read the article

  • Java: Preventing array going out of bounds.

    - by Troy
    I'm working on a game of checkers, if you want to read more about you can view it here; http://minnie.tuhs.org/I2P/Assessment/assig2.html When I am doing my test to see if the player is able to get to a certain square on the grid (i.e. +1 +1, +1 -1 .etc) from it's current location, I get an java.lang.ArrayIndexOutOfBoundsException error. This is the code I am using to make the move; public static String makeMove(String move, int playerNumber) { // variables to contain the starting and destination coordinates, subtracting 1 to match array size int colStart = move.charAt(1) - FIRSTCOLREF - 1; int rowStart = move.charAt(0) - FIRSTROWREF - 1; int colEnd = move.charAt(4) - FIRSTCOLREF - 1; int rowEnd = move.charAt(3) - FIRSTROWREF - 1; // variable to contain which player is which char player, enemy; if (playerNumber==1) { player= WHITEPIECE; enemy= BLACKPIECE; } else { player= BLACKPIECE; enemy= WHITEPIECE; } // check that the starting square contains a player piece if (grid [ colStart ] [ rowStart ] == player) { // check that the player is making a diagonal move if (grid [ colEnd ] [ rowEnd ] == grid [ (colStart++) ] [ (rowEnd++) ] && grid [ colEnd ] [ rowEnd ] == grid [ (colStart--) ] [ (rowEnd++) ] && grid [ colEnd ] [ rowEnd ] == grid [ (colStart++) ] [ (rowEnd--) ] && grid [ colEnd ] [ rowEnd ] == grid [ (colStart--) ] [ (rowEnd--) ]) { // check that the destination square is free if (grid [ colEnd ] [ rowEnd ] == BLANK) { grid [ colStart ] [ rowStart ] = BLANK; grid [ colEnd ] [ rowEnd ] = player; } } // check if player is jumping over a piece else if (grid [ colEnd ] [ rowEnd ] == grid [ (colStart+2) ] [ (rowEnd+2) ] && grid [ colEnd ] [ rowEnd ] == grid [ (colStart-2) ] [ (rowEnd+2) ] && grid [ colEnd ] [ rowEnd ] == grid [ (colStart+2) ] [ (rowEnd-2) ] && grid [ colEnd ] [ rowEnd ] == grid [ (colStart-2) ] [ (rowEnd-2) ]) { // check that the piece in between contains an enemy if ((grid [ (colStart++) ] [ (rowEnd++) ] == enemy ) && (grid [ (colStart--) ] [ (rowEnd++) ] == enemy ) && (grid [ (colStart++) ] [ (rowEnd--) ] == enemy ) && (grid [ (colStart--) ] [ (rowEnd--) ] == enemy )) { // check that the destination is free if (grid [ colEnd ] [ rowEnd ] == BLANK) { grid [ colStart ] [ rowStart ] = BLANK; grid [ colEnd ] [ rowEnd ] = player; } } } } I'm not sure how I can prevent the error from happening, what do you recommend?

    Read the article

  • UIButton stops responding after going into landscape mode - iPhone

    - by casey
    I've been trying different things the last few days and I've run out of ideas so I'm looking for help. The situation is that I'm displaying my in-app purchasing store view after the user clicks a button. Button pressed, view is displayed. The store shows fine. Inside this view, I have a few labels with descriptions of the product, and then below them I have the price and a Buy button which triggers the in-app purchase. Problem is when I rotate the phone to landscape, that Buy button no longer responds, weird. Works fine in portrait. The behavior in landscape when the I touch the button is nothing. It doesn't appear to press down and be selected or anything, just not responding to my touches. But then when I rotate back to portrait or even upside down portrait, it works fine. Here is the rough structure of my view in IB, all the rotating and layout is setup in IB. I set the autoresizing in IB so that everything looks ok in landscape and the Buy button expands horizontally a little bit. The only layout manipulation I do in my code is after loading, I set the content size of the scroll view. File Owner with view set to the scrollView / scrollView ----/ view --------/ label --------/ label --------/ label --------/ label --------/ label --------/ label --------/ label --------/ label --------/ uibutton (Buy) After orientation changes I printed out the userInteractionEnabled property of the scrollView and the button, and they were both TRUE at all orientations. Ideas? Or maybe some other way of displaying a buy button that won't be nonfunctional? I've already begun a branch that plays with a toolbar and placing the buy button there, but I can't seem to get the bar to stay in place while scrolling.

    Read the article

  • Arduino variable going blank after the first pass

    - by user541597
    I have an Arduino sketch that takes a timet and when that timet is equal to the current time it sets the new timet to timet + 2. For example: char* convert(char* x, String y) { int hour; int minute; sscanf(x, "%d:%d", &hour, &minute); char buf[6]; if (y == "6") { if (hour > 17) { hour = (hour+6)%24; snprintf(buf, 10, "%d:%d", hour, minute ); } else if (hour < 18) { //hour = hour + 6; minute = (minute + 2); snprintf(buf, 10, "%d:%d", hour, minute); } } if (y == "12") { if (hour > 11) { hour = (hour+12)%24; snprintf(buf, 10, "%d:%d", hour, minute ); } else if (hour < 12) { hour = hour + 12; snprintf(buf, 10, "%d:%d", hour, minute); } } if (y == "24") { hour = (hour+24)%24; snprintf(buf, 10, "%d:%d", hour, minute ); } return buf; } The sketch starts for example at 1:00am. timet is set to 1:02, at system time 1:02 timet is equal to the system time. My loops looks like this: if (timet == currenttime) { timet = convert(timet) } Whenever I check the value of timet it should equal 1:04, however I get the correct value at the first run after the execution of convert, however every time after that my timet value is blank. I tried changing the code instead of using the if loop. I only run the convert function when I send for example t through the serial monitor. This works fine and outputs the correct timet after the execution of the convert function, So I figured the problem is in the if loop... Any ideas?

    Read the article

  • mails going to junk box

    - by hohog
    so this morning, I get a call from a customer who says past 2 weeks of mail is in junk box...apparently emails from my domain is blocked ??? this is not the first time. and i fear that the reason i got no responses back from leads is due to my mails landing in junk box..... i am using google mail on a domain i had purchased a year ago. ever since, it has given me problems. the domain is new and created by me. how can i fix this problem ? is my domain somehow blacklisted ?

    Read the article

  • Difference in clientX and clientY when going out of the browser on ie/ff

    - by Py
    I just ran into a little problem with clientX and clientY. I put a little event to detect if the mouse goes out of the window and to know where it exits. And there come the trouble, it works fine with firefox, but only sends -1 as an answer in IE. Does someone know if there is a way to solve easily that problem and that without using a framework? A little bit of code to reproduce that: <html> <head> <script type="text/javascript"> document.onmouseout=function(e){ if (!e) var e = window.event; var relTarg = e.relatedTarget || e.toElement; if (!relTarg){ document.getElementById('result1').innerHTML="e.clientY:"+e.clientY+" e.clientX:"+e.clientX; } }; </script> </head> <body> <div id="result1">Not Yet</div> </body> </html> the results if I exit through the left of the window are: e.clientY:302 e.clientX:-130 on firefox e.clientY:-1 e.clientX:-1 on ie. Thanks in advance.

    Read the article

  • FB Connect going in an infinite loop with google chrome

    - by Mitesh
    Hi, I am having the following php code which i am trying for testing FB Connect <?php define('FACEBOOK_APP_ID', 'YOUR_APP_ID'); define('FACEBOOK_SECRET', 'YOUR_APP_SECRET'); function get_facebook_cookie($app_id, $application_secret) { enter code here $args = array(); parse_str(trim($COOKIE['fbs' . $app_id], '\"'), $args); ksort($args); $payload = ''; foreach ($args as $key = $value) { if ($key != 'sig') { $payload .= $key . '=' . $value; } } if (md5($payload . $application_secret) != $args['sig']) { return null; } return $args; } $cookie = get_facebook_cookie(FACEBOOK_APP_ID, FACEBOOK_SECRET); ? <!DOCTYPE html <html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml" <body <?php if ($cookie) { ? Your user ID is <?= $cookie['uid'] ? <br / Your Acess Token is <br / <?php $user = json_decode(file_get_contents( 'https://graph.facebook.com/me?access_token=' . $cookie['access_token'])); if($user) { echo "<br /Display Name = " . $user-name; echo "<br /First Name = " . $user-first_name; echo "<br /Last Name = " . $user-last_name; echo "<br /Birthday = " . $user-birthday; echo "<br /Home Town = " . $user-hometown-name; echo "<br /Location = " . $user-location-name; echo "<br /Email = " . $user-email . "<br /"; } ? <?php } else { ? <fb:login-button perms="email,user_birthday,publish_stream"</fb:login-button <?php } ? <div id="fb-root">&lt;/div> <script src="http://connect.facebook.net/en_US/all.js"></script> <script> FB.init({appId: '<?= FACEBOOK_APP_ID ?>', status: true, cookie: true, xfbml: true}); FB.Event.subscribe('auth.login', function(response) { window.location.reload(); }); </script> </body </html The problem faced by me is it works fine with IE and Firefox, however when done the same with google chrome I am running into an infinite loop when I click on reload/refresh button of chrome after logging in. Any hints as to why is it happening with chrome? Also how can it be avoided. Thanks, Mitesh

    Read the article

  • Bitmap Crashing upon going back and re-entering Activity

    - by dagonal
    Hello, I'm not sure what is causing this...I have two Activities, first has a button that goes to the second. The second creates a Bitmap object, assigns it a picture from the sdcard and loads it into an ImageView. Problem is when I go into the second Activity, then press the back button, and then go back into the second Activity, it crashes. I have no clue why. I did an extensive google search but to no avail. I can post the source code if you want. Please let me know. Thanks in advance! I got this from the LogCat: "E/dalvikvm( 4869): Unable to open stack trace file '/data/anr/traces.txt': Permission denied" I'm not sure how to get the stack trace.

    Read the article

  • Include models in Cakephp without going through index.php

    - by Nicklas Ansman
    Hey! I'm using CakePHP to build a site which has a crawler that mines data from different sites. The problem is that I would like to be able to call the crawler from command line (since it can take hours for it to finnish) and I would like to the use models in CakePHP when saving the data. Is there a file I could just include that includes the rest for me? If I just include the index.php it dispatches the call which I don't want. Regards Nicklas

    Read the article

  • Overcoming Inertia - How to Just Get Going on Stuff

    - by kronoz
    I wondered whether you guys could help me - I have a big problem with overcoming inertia, i.e. how to just get started on a project/work when you simply feel the inertia of not being in the right 'zone' to do work such that it really becomes pretty damn tough to actually get on with what you want to do. Forgive me quoting my blog post where I try to express the problem as best I can:- The problem is that it feels so damned difficult to exert the force required to shift from one mode to another, so much so that you find it almost inconceivable to do so at the time. You need to force yourself somehow, or at least find some sort of hack to trick yourself into it. Do you guys have any ideas/hacks as to how to overcome this? Thanks in advance, and hopefully the community feel this question is valid for stack overflow (I have set it community wiki due to its fairly subjective nature.)

    Read the article

  • Jquery slider going the wrong way

    - by Rob
    Im using a jquery slider and having an issue with what direction it scrolls on click. It seems to screw up after clicking the right arrow then left, but will scroll left if clicked first, weird. Is this a bug or am I missing something here? PS- Im using Chrome (Mac) but seems to behave the same with Firefox and Safari See example http://www.warface.co.uk/clients/warface.co.uk/blog/ Please click the red central arrow to reveal the slider. Many thanks Rob

    Read the article

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