Daily Archives

Articles indexed Sunday November 10 2013

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

  • postgres store with composite value type, or a better way of attributing an inverted index

    - by Hassan Syed
    can't seem to figure out the syntax for populating a hstore with a value of composite type -- note: I do not want to convert a record to a hstore. select hstore('hello => ROW(1,2)'); I know it's something simple; However, google is not my friend today. use case : custom inverted index. The data is modelling an inverted index of lexemes, the composite data types are various probabilities related to the lexemes which I will use to implement document clustering. Does anyone know a better way of doing this ? I'm open to using an external system if it allows attaching attributes to key-posting pairs in the inverted index. I'd use something external if it had solid support for what I am trying to do, I suspect that sticking 3-10k lexemes per tuple and then doing batch processing on them is gonna be nasty as the whole hstore will have to be parsed and converted .

    Read the article

  • Increment the number of times an article has been read

    - by r.sendecky
    I have a situation where I need to increase the number of time article has been read. Once someone opens an article it should be reflected in the database by incrementing number of reads by one. Simple. Sending POST request to the server increments the number of reads by one. The article in question is supplied via URL parameter. Doing it manually by typing the URL in a browser works as expected. So server side is not at fault. My problems start with the javascript side of it or rather jquery. I hook the event to the article link. So every time a user clicks on the article link it increments the number of reads like so: $('#list-articles .article-link').click(function(e){ var oid = $(this).parent().parent().attr('data-oid').toString(); //Get the article id $.post( "/articles/viewed/" + oid ); }); Now this does not work! Number is not increased. I don't prevent default action since I need the link to actually open and display the article. Now if I put an alert right after the post like this: $('#list-articles .article-link').click(function(e){ var oid = $(this).parent().parent().attr('data-oid').toString(); //Get the article id $.post( "/articles/viewed/" + oid ); alert(oid); }); This variant works. After I dismiss the alert window, the number is incremented. Why is this so?? How can I fix this to actually work without the alert event present?

    Read the article

  • adding Json to mutable array resolves in crash

    - by user2957713
    Hello guys I am new to Xcode/iOS developing I trying to add json data to the mutable array , and it results in app crash :( so far here is my code: if(! [defaults objectForKey:@"Person1"]) [defaults setObject:[PersonsFromSearch objectAtIndex:index] forKey:@"Person1"]; else { NSMutableArray *Array = [[NSMutableArray alloc]init]; id object = [defaults objectForKey:@"Person1"]; Array = [object isKindOfClass:[NSArray class]] ? object : @[object]; [Array addObject:[PersonsFromSearch objectAtIndex:index]];//crash here :(( [Array moveObjectFromIndex:[Array count] toIndex:0]; } Crash Dump: * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFDictionary addObject:]: unrecognized selector sent to instance 0xbf98dc0' what is wrong here ? can you please help me to resolve this issue Array contains this (Json?) { Address = "\U05d3\U05e8\U05da \U05d4\U05e9\U05dc\U05d5\U05dd 53"; CellPhone = "052-3275381"; EMail = "[email protected]"; EnglishPerson = "Yehuda Konfortes"; FaceBookLink = ""; Fax1 = "03-7330703"; Fax2 = ""; FileNAme = "100050.jpg"; HomeEMail = ""; HomeFax = ""; HomePhone1 = ""; HomePhone2 = ""; PersonID = 100050; PersonName = "\U05d9\U05d4\U05d5\U05d3\U05d4 \U05e7\U05d5\U05e0\U05e4\U05d5\U05e8\U05d8\U05e1"; Phone1 = "03-7330733"; Phone2 = ""; ZipCode = ""; }

    Read the article

  • Dynamic Dropdown menu through php

    - by Code_Ed_Student
    I visited a website a few weeks ago and came across a dynamic drop down menu. I came across a functionality that I am now trying to replicate but do not know how. In the dropdown you picked the desired number of cars and then it reiterated input fields according to the number of cars chosen. I believe this was done through javascript and a loop was involved. Is there a term for this action or way to display things? Also an example of how to accomplish something similar would help?

    Read the article

  • urlopen error [errno 111] connection refused

    - by Ui-Gyun Jeong
    I am doing python exercise with a book 'headfirst python' and making android app by using python and sl4a my code is import android import json import time from urllib import urlencode from urllib2 import urlopen hello_msg = "Welcome to Coach Kelly's Timing App" list_title = 'Here is your list of athletes:' quit_msg = "Quitting Coach Kelly's App." web_server = 'http://127.0.0.1:8080' get_names_cgi = '/cgi-bin/generate_name.py' def send_to_server(url, post_data=None): if post_data: page = urlopen(url, urlencode(post_data)) else: page = urlopen(url) return(page.read().decode("utf8")) app = android.Android() def status_update(msg, how_long=2): app.makeToast(msg) time.sleep(how_long) status_update(hello_msg) athlete_names = sorted(json.loads(send_to_server(web_server + get_names_cgi))) app.dialogCreateAlert(list_title) app.dialogSetSingleChoiceItems(athlete_names) app.dialogSetPositiveButtonText('Select') app.dialogSetNegativeButtonText('Quit') app.dialogShow() resp = app.dialogGetResponse().result status_update(quit_msg) this is my code and the result is what is the problem??? I can not figure out what the problem is...

    Read the article

  • Turning logical expression around

    - by BluePrint
    I have the following code: bool s = true; for (...; ...; ...) { // code that defines A, B, C, D // and w, x, y, z if (!(A < w) && s == true) { s = false; } if (!(B < x) && s == true) { s = false; } if (!(C < y) && s == true) { s = false; } if (!(D < z) && s == true) { s = false; } } This code is working well. However, I want to, for several (unimportant) reasons, change the code so that I can initiate s = false; and set it to true inside the if-statement. It tried the following: bool s = false; for (...; ...; ...) { // code that defines A, B, C, D // and w, x, y, z if (A >= w && s == false) { s = true; } if (B >= x && s == false) { s = true; } if (C >= y && s == false) { s = true; } if (D >= z && s == false) { s = true; } } However, this is not working properly as the code above is working. I know thought wrong somewhere in the logic, but I can't figure out where. Does anbyone see my probably obvious error? EDIT: Added three more if-statemets. Missed them since they were commented away.

    Read the article

  • Get original element using .on

    - by RGraham
    When using jQuery's event delegation, is there a way to retrieve the element on which .on was called, as well as the element on which the event was called? jQuery: $(".item").on("click","a",function() { var link = $(this); // a tag var itemDiv = // what? }); HTML: <div class="item"> <a href="#">Link</a> <a href="#">Link</a> <a href="#">Link</a> <a href="#">Link</a> </div>

    Read the article

  • Content Box is a Little Off in IE9 ... How to Fix?

    - by Kelsey Nealon
    Hi there! I have a website at www.thetotempole.ca and when viewed in IE9... My websites content box (The green wooden backgrounded box with content inside) is moved slightly over to the left making a space between the actual container and the content box... Is there anyway I can fix this without harming any of the other browsers? Thanks! Screenshot: HTML: <!DOCTYPE html> <head> <title>The Totem Pole News - Movies</title> <!-- Start WOWSlider.com HEAD section --> <link rel="stylesheet" type="text/css" href="engine1/style.css" /> <script type="text/javascript" src="engine1/jquery.js"></script> <!-- End WOWSlider.com HEAD section --> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-45342007-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> <meta charset="utf-8"> <meta name="description" content="A totem pole themed news website posting articles on news, music, movies, video games, and health."> <link href="thecss2.css" rel="stylesheet" type="text/css"> <link rel="icon" type="image/ico" href="images/favicon.ico"> <meta http-equiv="X-UA-Compatible" content="IE=8" /> </head> <body> <div id="container"> <div id="contentbox" align="Center"> <a href="index.html"><div id="banner" align="Center"> </div></a> <div id="navbar"> <p><a href="index.html"><img src="images/home.png" width="65" height="54" alt="picture of a house to relate to the home page (content)" style="position: absolute; left: 23px; top: 16px; width: 57px; height: 48px;"><span style="position: absolute; left: 24px; z-index:2; top: 71px; height: 23px;">Content</span></a> <a href="#"><img src="images/eagleicon.gif" width="73" height="39" alt="An Eagle icon for the News section of the Totem Pole" style="position: absolute; left: 111px; top: 28px;"><span style="position: absolute; z-index: 2; left: 127px; top: 72px;">News</span></a> <a href="#"><img src="images/owlicon.gif" width="81" height="61" alt="An Owl icon for the Music section of the totem pole" style="position: absolute; left: 210px; top: 11px;"><span style="position: absolute; z-index:2; left: 226px; top: 73px;"><strong>Music</strong></span></a><a href="movies.html"><img src="images/wolficon.gif" width="88" height="54" alt="A Wolf icon for the Movies section of the totem pole" style="position: absolute; left: 320px; top: 15px;"><span style="position: absolute; left: 336px; top: 72px; z-index:2;"><strong>Movies</strong></span></a> <a href="#"><img src="images/hareimage.gif" width="60" height="56" alt="A Hare icon for Video Game section of the Totem Pole" style="position: absolute; left: 441px; top: 13px;"><span style="position: absolute; z-index:2; left: 428px; top: 73px;"><strong>Video Games</strong></span></a> <a href="#"><img src="images/bearicon.gif" width="91" height="57" alt="A bear icon for the Health section of The Totem Pole" style="position: absolute; left: 551px; top: 13px;"><span style="position: absolute; left: 580px; top: 72px; z-index:2;">Health</span></a></p> </div> <!--Nav Bar 2--> <div id="navbar2"> <a href="#">About Us</a> <a href="#">Feedback</a> <a href="#">Subscribe</a> </div> <!-- Atomz HTML for Search --> <div id="searchbar"> <form method="get" action="http://search.atomz.com/search/"> <input id="searchbox" size="13" name="sp_q" value="Search..." onFocus="if (this.value == 'Search...') {this.value=''}"> <input class="css_btn_class" type="submit" value="Search"> <input type="hidden" name="sp_a" value="sp1005092e"> <input type="hidden" name="sp_p" value="all"> <input type="hidden" name="sp_f" value="UTF-8"> </form> </div> <!-- Start WOWSlider.com BODY section --> <div id="mywowslider"> <div id="wowslider-container1"> <div class="ws_images"> <ul> <li><img src="images/anchor.jpg" alt="Ron Burgundy" title="Ron Burgundy" id="wows1_0"/>Played by Will Ferrell</li> <li><img src="images/anchor2.jpg" alt="Brian Fantana" title="Brian Fantana" id="wows1_1"/>Played by Paul Rudd</li> <li><img src="images/anchor3.jpg" alt="Brick Tamland" title="Brick Tamland" id="wows1_2"/>Played by Steve Carrell</li> <li><img src="images/anchor4.jpg" alt="Champ Kind" title="Champ Kind" id="wows1_3"/>Played by David Koechner</li> </ul> </div> <div class="ws_bullets"><div> <a href="#" title="Ron Burgundy"><img src="images/anchor.jpg" alt="Ron Burgundy"/>1</a> <a href="#" title="Brian Fantana"><img src="images/anchor2.jpg" alt="Brian Fantana"/>2</a> <a href="#" title="Brick Tamland"><img src="images/anchor3.jpg" alt="Brick Tamland"/>3</a> <a href="#" title="Champ Kind"><img src="images/anchor4.jpg" alt="Champ Kind"/>4</a> </div> </div> <span class="wsl"><a href="http://wowslider.com"></a></span> <div class="ws_shadow"></div> </div> <script type="text/javascript" src="engine1/wowslider.js"></script> <script type="text/javascript" src="engine1/script.js"></script> </div> <!-- End WOWSlider.com BODY section --> <!-- AddThis Smart Layers BEGIN --> <!-- Go to http://www.addthis.com/get/smart-layers to customize --> <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5279b96309e7df24"></script> <script type="text/javascript"> addthis.layers({ 'theme' : 'transparent', 'share' : { 'position' : 'left', 'numPreferredServices' : 5 } }); </script> <!-- AddThis Smart Layers END --> <div id="sources"><p> Source(s): <a href="http://en.wikipedia.org/wiki/Anchorman_2:_The_Legend_Continues">wikipedia.com</a></p></div> <div id="infocontent"> <p align="left"><em><strong> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Anchorman 2: The Legend Continues</strong></em> is an upcoming American comedy film being released on December 20, 2013, also a sequel to the 2004 film <em>Anchorman: The Legend of Ron Burgandy</em>. On March 28, 2012, actor Will Ferrell officially announced the sequel dressed in character as Ron Burgundy on the late-night talk-show <em>Conan</em>. As with the original film, it is directed by Adam McKay, produced by Judd Apatow, stars Will Ferrell and is written by Adam McKay and Will Ferrell. Unlike the original film, which was distributed by DreamWorks Pictures, <em>The Legend Continues</em> will be distributed by Paramount Pictures.</p> <p align="left"><em><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</strong></em>The movie now has a website at <a href="www.anchormanmovie.com">www.anchormanmovie.com</a> where a countdown for the release of this film can be seen. By the looks of these images, I think we can expect big things when the movie comes out this December. Enjoy the poster photos and trailers all posted below, and don't forget to submit your vote in the poll!</p> </div> <div id="trailer1"><iframe width="560" height="315" src="//www.youtube.com/embed/Elczv0ghqw0?rel=0" frameborder="0" allowfullscreen></iframe></div> <div id="trailer2"> <iframe width="560" height="315" src="//www.youtube.com/embed/mZ-JX-7B3uM?rel=0" frameborder="0" allowfullscreen></iframe> </div> <div id="poll"> <form method="post" action="http://poll.pollcode.com/763294"><table style="border: black 1px solid;" border="1" width="175" bgcolor="EEEEEE" cellspacing="2" cellpadding="0"><tr><td colspan="2" height="10"><font face="Verdana" size="2" color="000000"><b>What Rating Do You Think This Will Recieve</b></font></td></tr><tr><td width="5"><input type="radio" name="answer" value="1" id="763294answer1"></td><td>&nbsp;<font face="Verdana" size="2" color="000000"><label for="763294answer1">10</label></font></td></tr><tr><td width="5"><input type="radio" name="answer" value="2" id="763294answer2"></td><td>&nbsp;<font face="Verdana" size="2" color="000000"><label for="763294answer2">9</label></font></td></tr><tr><td width="5"><input type="radio" name="answer" value="3" id="763294answer3"></td><td>&nbsp;<font face="Verdana" size="2" color="000000"><label for="763294answer3">8</label></font></td></tr><tr><td width="5"><input type="radio" name="answer" value="4" id="763294answer4"></td><td>&nbsp;<font face="Verdana" size="2" color="000000"><label for="763294answer4">7</label></font></td></tr><tr><td width="5"><input type="radio" name="answer" value="5" id="763294answer5"></td><td>&nbsp;<font face="Verdana" size="2" color="000000"><label for="763294answer5">6</label></font></td></tr><tr><td width="5"><input type="radio" name="answer" value="6" id="763294answer6"></td><td>&nbsp;<font face="Verdana" size="2" color="000000"><label for="763294answer6">5</label></font></td></tr><tr><td width="5"><input type="radio" name="answer" value="7" id="763294answer7"></td><td>&nbsp;<font face="Verdana" size="2" color="000000"><label for="763294answer7">4</label></font></td></tr><tr><td width="5"><input type="radio" name="answer" value="8" id="763294answer8"></td><td>&nbsp;<font face="Verdana" size="2" color="000000"><label for="763294answer8">3</label></font></td></tr><tr><td width="5"><input type="radio" name="answer" value="9" id="763294answer9"></td><td>&nbsp;<font face="Verdana" size="2" color="000000"><label for="763294answer9">2</label></font></td></tr><tr><td width="5"><input type="radio" name="answer" value="10" id="763294answer10"></td><td>&nbsp;<font face="Verdana" size="2" color="000000"><label for="763294answer10">1</label></font></td></tr><tr><td colspan="2" height="10"><center><input type="submit" value=" Vote ">&nbsp;&nbsp;<input title="Clicking this will send you to a new page" type="submit" name="view" value=" View "></center></td></tr><tr><td colspan="2" align="right"><font face="Verdana" height="5" size="1" color="000000"></font></td></tr></table></form></div> <span style="position: absolute; left: 0px; top: 225px; width: 1000px; border-bottom: 2px black double; height: 58px;"> <h1 style="font-weight: normal; font-size:28px"><em>Anchorman 2 Arrives Soon</em></h1></span> <div id="contentbox2"></div> <!--Footer Div --> <center><div id="footer"><a href="#">Sitemap</a> <a href="#">About Us</a> <a href="#">Feedback</a></div></center> <div id="disqus"><div id="disqus_thread"></div> <script type="text/javascript"> /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */ var disqus_shortname = 'thetotempoleanchorman2'; // required: replace example with your forum shortname /* * * DON'T EDIT BELOW THIS LINE * * */ (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })(); </script> <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> <a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a></div> <!-- This is the end of the contentbox --></div> <!-- This is the end of the container div --> </div> </body> </html> CSS: html { background: url(images/pine.jpg) no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/pine.jpg', sizingMethod='scale'); -ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='images/pine.jpg', sizingMethod='scale')"; } body { margin-bottom:0px; font-family: Verdana, Geneva, sans-serif; } a { outline : none; border: none; } a:hover { color: #0FC; } #container { width: 1000px; height:1924px; position:relative; margin-right: auto; margin-left: auto; z-index:1; margin-bottom: 50px; } #facebook { position:fixed; right:100px; z-index:15; } #twitter { position:fixed; z-index:16; right:120px; } #google { position:fixed; top:7px; right: 135px; } #socialmediaplugins { text-align: right; position: fixed; background: rgb(125,126,125); /* Old browsers */ background: -moz-linear-gradient(top, rgba(125,126,125,1) 0%, rgba(247,247,247,1) 100%); /* FF3.6+ */ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(125,126,125,1)), color-stop(100%,rgba(247,247,247,1))); /* Chrome,Safari4+ */ background: -webkit-linear-gradient(top, rgba(125,126,125,1) 0%,rgba(247,247,247,1) 100%); /* Chrome10+,Safari5.1+ */ background: -o-linear-gradient(top, rgba(125,126,125,1) 0%,rgba(247,247,247,1) 100%); /* Opera 11.10+ */ background: -ms-linear-gradient(top, rgba(125,126,125,1) 0%,rgba(247,247,247,1) 100%); /* IE10+ */ background: linear-gradient(to bottom, rgba(125,126,125,1) 0%,rgba(247,247,247,1) 100%); /* W3C */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#7d7e7d', endColorstr='#f7f7f7',GradientType=0 ); /* IE6-9 */ margin: 0px; top: 0px; left: 0px; right: 0px; z-index:14; } #searchbox { background-color:#01bff6; border-radius:4px; } #searchbox:hover { background-color:#76b618; border-radius:4px; } #searchbox:active { background-color:#01bff6; border-radius:4px; } #contentbox { background-color:black; background-image:url(images/wooden.jpg); width: 1000px; margin-bottom:50px; height: 1924px; box-shadow:2px 2px 10px 10px #060606; -webkit-box-shadow:2px 2px 10px 10px #060606; -moz-box-shadow:2px 2px 10px 10px #060606; /* For IE<9 */ filter: progid:DXImageTransform.Microsoft.Shadow(color=#060606,direction=0,strength=5), progid:DXImageTransform.Microsoft.Shadow(color=#060606,direction=45,strength=2), progid:DXImageTransform.Microsoft.Shadow(color=#060606,direction=90,strength=5), progid:DXImageTransform.Microsoft.Shadow(color=#060606,direction=135,strength=5), progid:DXImageTransform.Microsoft.Shadow(color=#060606,direction=180,strength=10), progid:DXImageTransform.Microsoft.Shadow(color=#060606,direction=225,strength=5), progid:DXImageTransform.Microsoft.Shadow(color=#060606,direction=270,strength=5), progid:DXImageTransform.Microsoft.Shadow(color=#060606,direction=315,strength=2); } #contentbox2 { background-image:url(images/woodenmovies.jpg); top:299px; width: 1000px; margin-bottom:50px; height: 1625px; position: absolute; } #banner { background-image:url(images/totempolebanner.gif); position:absolute; top:25px; width:768px; height:120px; left:116px; } #navbar { float: left; position: absolute; top: 146px; left: 76px; width: 844px; height: 158px; font-weight:bold; } #navbar a { color:#0C6; font-size: 13px; } #navbar a:hover { color:#0F9; font-size: 13px; } #navbar2 a:hover { color:#0F9; } #navbar2 a{ text-decoration:none; color:#0C6; } #navbar2 { position: absolute; top: 4px; left: 766px; width: 273px; height: 24px; font-size: 11px; } #searchbar { position: absolute; top: 23px; left: 885px; width: 118px; height: 69px; } .css_btn_class { font-size:9px; position: relative; top:0px; right:4px; width:90px; height:25px; font-family:Verdana; font-weight:normal; -moz-border-radius:7px; -webkit-border-radius:7px; border-radius:7px; border:1px solid #35d914; padding:7px 24px; text-decoration:none; background:-webkit-gradient( linear, left top, left bottom, color-stop(5%, #ff9d00), color-stop(100%, #ffe711) ); background:-moz-linear-gradient( center top, #ff9d00 5%, #ffe711 100% ); background:-ms-linear-gradient( top, #ff9d00 5%, #ffe711 100% ); background-color:#ff9d00; color:#ff0000; display:inline-block; text-shadow:0px 0px 1px #117cff; -webkit-box-shadow: 0px 0px 0px 0px #117cff; -moz-box-shadow: 0px 0px 0px 0px #117cff; box-shadow: 0px 0px 0px 0px #117cff; background-image: url(images/unnamed.gif); background-repeat:no-repeat; background-position:right; }.css_btn_class:hover { width:90px; background:-webkit-gradient( linear, left top, left bottom, color-stop(5%, #ffe711), color-stop(100%, #ff9d00) ); background:-moz-linear-gradient( center top, #ffe711 5%, #ff9d00 100% ); background:-ms-linear-gradient( top, #ffe711 5%, #ff9d00 100% ); background-color:#ffe711; background-image: url(images/unnamed.gif); background-repeat:no-repeat; background-position:right; }.css_btn_class:active { position:relative; width:90px; top:1px; background-image: url(images/unnamed.gif); background-repeat:no-repeat; background-position:right; } /* This css button was generated by css-button-generator.com */ img {border:none;} #eagle { position:relative; right: 144px; top:299px; } #owl { top:624px; position:absolute; left:0px; } #wolf { top:949px; position:absolute; right:0px; } #hare { top:1274px; position:absolute; left:0px; } #bear { top:1599px; position:absolute; right:0px; } #footer { position: absolute; left: 393px; top: 1941px; width: 251px; color: #0F9; } #footer a { color: #0f9; } .atss { left: 0; } #infocontent { position: absolute; z-index: 3; left: 15px; top: 333px; height: 348px; width: 789px; } #mywowslider { position: absolute; z-index: 3; left: 640px; top: 684px; } #poll { position: absolute; z-index: 3; left: 815px; top: 344px; } #trailer1 { position: absolute; z-index: 3; left: 40px; top: 598px; } #trailer2 { position: absolute; z-index: 3; left: 40px; top: 948px; } #trailer1header { position: absolute; z-index: 3; left: 200px; top: 550px; width: 240px; font-style: italic; font-weight: normal; } #trailer2header { position: absolute; z-index: 3; left: 200px; top: 898px; width: 241px; height: 51px; font-style: italic; font-weight: normal; } #disqus { position: absolute; z-index: 3; left: 0px; top: 1340px; } #sources { position: absolute; z-index: 3; left: 394px; top: 1249px; width: 212px; }

    Read the article

  • jQuery Form Validation being bypassed

    - by user1953681
    Can someone tell me what is wrong with my jQuery validation? It is not validating my form, rather, just ignoring the code resulting in no check of the inputs. Form: <form class="form" accept-charset="UTF-8" action="URL-to-complete-form" method="POST" onsubmit="return validateForm();"> <input class="form-name" type="text" placeholder="Name"></div> <input class="form-email" type="text"placeholder="Email"></div> <input style="background-color: #fc8f12;" type="submit" value="Subscribe"> </div> </form> Javascript: function validateForm() { // Validate Name var title = $(".form-name").val(); if (title=="" ||title=="Name" || title==null) { } else { alert("Please enter a name!"); } // Validate Email var email = $(".form-email").val(); if ((/(.+)@(.+){2,}\.(.+){2,}/.test(email)) || email=="" || email=="Email" || email==null) { } else { alert("Please enter a valid email"); } return false; } Thank you all for your time and help.

    Read the article

  • Counting characters in an Access database column using SQL

    - by jzr
    I have the following table col1 col2 col3 col4 ==== ==== ==== ===== 1233 4566 ABCD CDEF 1233 4566 ACD1 CDEF 1233 4566 D1AF CDEF I need to count the characters in col3, so from the data in the previous table it would be: char count ==== ===== A 3 B 1 C 2 D 3 F 1 1 2 Is this possible to achieve by using SQL only? At the moment I am thinking of passing a parameter in to SQL query and count the characters one by one and then sum, however I did not start the VBA part yet, and frankly wouldn't want to do that. This is my query at the moment: PARAMETERS X Long; SELECT First(Mid(TABLE.col3,X,1)) AS [col3 Field], Count(Mid(TABLE.col3,X,1)) AS Dcount FROM TEST GROUP BY Mid(TABLE.col3,X,1) HAVING (((Count(Mid([TABLE].[col3],[X],1)))>=1)); Ideas and help are much appreciated, as I don't usually work with Access and SQL.

    Read the article

  • session variables in an ASP.NET

    - by Beep
    hi guy i am trying to place my session in to a drop down, any help would be great. at the moment it puts the data in to a label, i wish to put it into a dropdown with it adding a new string every time i click button without getting rid of the last default page protected void Button1_Click1(object sender, EventArgs e) { Session["Fruitname"] = TbxName.Text; // my session i have made } output page protected void Page_Load(object sender, EventArgs e) { var fruitname = Session["Fruitname"] as String; // my session ive made fruit.Text = fruitname; // session used in lable } Have Tried var myFruits = Session["Fruitname"] as List<string>; myFruits.Add(listbox1.Text); but i get error when i try to run the program Broken glass thanks for your help, it is still not doing what i need but its getting there. var fruitname = Session["Fruitname"] as String; // my session ive made fruit.Text = string.Join(",", fruitname); // session used in lable this is what is working. i need a dropdown to display all the strings put into TbxName.Text; to output into fruit

    Read the article

  • how to update the table in sql database from a Paradox DB table using delphi

    - by Sreenath Krishnakumar
    I am doing a project in Delphi6 which enables the user to update the table in SQL server database ; if there is any changes in the table of Paradox DB. An update button has been created and whenever the user clicks it, all the changes made in the paradox db table have to be updated in the SQL server table. Only if there is any changes the table need to be updated else ; it should close automatically. For that I have created a table, "Schedule" ,both in Paradox DB and SQL server. But I am stuck with this Paradox DB thing. Which component can I drop in the form for connecting the table in Paradox DB ? For SQL server I used ado table component. For this Paradox also can I use that ? I am not a regular programmer so I am not well versed this Delphi6 also. So I am seeking a help for this. Can anybody give me an example coding also ?

    Read the article

  • In Magento, is it possible to populate your product models from an external API instead of the Magento DB?

    - by James Pelton
    I currently have Magento 1.7 CE installed. I want to use the Magento Product Models, except I want to get the price for the product from an external API (our pricing exists outside of Magento). I know what I could use the Magento API to import all the prices from our existing database, but our pricing changes very often, and we would then need to maintain two databases. Basically I'm wondering if there is something in Magento I can overwrite to call our API instead of the DB?

    Read the article

  • Return parent of node in Binary Tree

    - by user188995
    I'm writing a code to return the parent of any node, but I'm getting stuck. I don't want to use any predefined ADTs. //Assume that nodes are represented by numbers from 1...n where 1=root and even //nos.=left child and odd nos=right child. public int parent(Node node){ if (node % 2 == 0){ if (root.left==node) return root; else return parent(root.left); } //same case for right } But this program is not working and giving wrong results. My basic algorithm is that the program starts from the root checks if it is on left or on the right. If it's the child or if the node that was queried else, recurses it with the child.

    Read the article

  • CSS repeat pattern with linear gradient

    - by luca
    I'm on my first approach with photoshop patterns.I'm buildin a webpage where I want to use my pattern to give a nice effect to my webpage background. The pattern I found is 120x120 px If I was done here I should use this css: background-imag:url(mypattern.jpg); background-repeat:repeat; But Im not done.Id like to *add to my page's background a linear gradient(dir=top/down col=light-blue/green) with the pattern fill layer on top of it, with blending mode=darken *. This is the final effect: I come to the point. QUESTION: Combining linear vertical-gradient effect and my 120x120 pattern is it possible to find a pattern that I could use to repeat itself endlessly both vertical and horizontal??which is a common solution in this case? Hope It's clear thanks Luca

    Read the article

  • Gave a talk at SoCal Code Camp at USC today titled “Linq to Objects A-Z”

    - by dotneteer
    I gave a talk at SoCal Code Camp on Linq to Objects. With careful categorization of Linq functions, I was able to cover the entire set of Linq functions in only 35 minutes. I was able to spend the rest time on demos. In my first demo, I show I was able to write a top 20 URL type of query using 4 lines of library code and 9 line of Linq code without tools like Log Parser. I also demonstrated that I only need to change 2 lines of code from querying a single log file to a whole directory of log files. It would be as simple to run the query against multiple servers in parallel. In my second demo, I discussed how to turn into graph depth-first-search (DFS) and breath-first-search (BFS) in the a Linq queryable problem. The class LingToGraph contains the only DFS and BFS code I ever have to write; the rest could be done the the lambda passed to the DFS or BFS calls. In future blogs, I will provide more details explanation of code. Links: Link to Powerpoint slides. Link to demos.

    Read the article

  • Persisting settings without using Options dialog in Visual Studio

    - by Utkarsh Shigihalli
    Originally posted on: http://geekswithblogs.net/onlyutkarsh/archive/2013/11/02/persisting-settings-without-using-options-dialog-in-visual-studio.aspxIn one of my previous blog post we have seen persisting settings using Visual Studio's options dialog. Visual Studio options has many advantages in automatically persisting user options for you. However, during our latest Team Rooms extension development, we decided to provide our users; ability to use our preferences directly from Team Explorer. The main reason was that we had only one simple option for user and we thought it is cumbersome for user to go to Tools –> Options dialog to change this. Another reason was, we wanted to highlight this setting to user as soon as he is using our extension.   So if you are in such a scenario where you do not want to use VS options window, but still would like to persist the settings, this post will guide you through. Visual Studio SDK provides two ways to persist settings in your extensions. One is using DialogPage as shown in my previous post. Another way is to use by implementing IProfileManager interface which I will explain in this post. Please note that the class implementing IProfileManager should be independent class. This is because, VS instantiates this class during Tools –> Import and Export Settings. IProfileManager provides 2 different sets of methods (total 4 methods) to persist the settings. They are LoadSettingsFromXml and SaveSettingsToXml – Implement these methods to persist settings to disk from VS settings storage. The VS will persist your settings along with other options to disk. LoadSettingsFromStorage and SaveSettingsToStorage – Implement these methods to persist settings to local storage, usually it be registry. VS calls LoadSettingsFromStorage method when it is initializing the package too. We are going to use the 2nd set of methods for this example. First, we are creating a separate class file called UserOptions.cs. Please note that, we also need to implement IComponent, which can be done by inheriting Component along with IProfileManager. [ComVisible(true)] [Guid("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX")] public class UserOptions : Component, IProfileManager { private const string SUBKEY_NAME = "TForVS2013"; private const string TRAY_NOTIFICATIONS_STRING = "TrayNotifications"; ... } Define the property so that it can be used to set and get from other classes. public bool TrayNotifications { get; set; } Implement the members of IProfileManager. public void LoadSettingsFromStorage() { RegistryKey reg = null; try { using (reg = Package.UserRegistryRoot.OpenSubKey(SUBKEY_NAME)) { if (reg != null) { // Key already exists, so just update this setting. TrayNotifications = Convert.ToBoolean(reg.GetValue(TRAY_NOTIFICATIONS_STRING, true)); } } } catch (TeamRoomException exception) { TrayNotifications = true; ExceptionReporting.Report(exception); } finally { if (reg != null) { reg.Close(); } } } public void LoadSettingsFromXml(IVsSettingsReader reader) { reader.ReadSettingBoolean(TRAY_NOTIFICATIONS_STRING, out _isTrayNotificationsEnabled); TrayNotifications = (_isTrayNotificationsEnabled == 1); } public void ResetSettings() { } public void SaveSettingsToStorage() { RegistryKey reg = null; try { using (reg = Package.UserRegistryRoot.OpenSubKey(SUBKEY_NAME, true)) { if (reg != null) { // Key already exists, so just update this setting. reg.SetValue(TRAY_NOTIFICATIONS_STRING, TrayNotifications); } else { reg = Package.UserRegistryRoot.CreateSubKey(SUBKEY_NAME); reg.SetValue(TRAY_NOTIFICATIONS_STRING, TrayNotifications); } } } catch (TeamRoomException exception) { ExceptionReporting.Report(exception); } finally { if (reg != null) { reg.Close(); } } } public void SaveSettingsToXml(IVsSettingsWriter writer) { writer.WriteSettingBoolean(TRAY_NOTIFICATIONS_STRING, TrayNotifications ? 1 : 0); } Let me elaborate on the method implementation. The Package class provides UserRegistryRoot (which is HKCU\Microsoft\VisualStudio\12.0 for VS2013) property which can be used to create and read the registry keys. So basically, in the methods above, I am checking if the registry key exists already and if not, I simply create it. Also, in case there is an exception I return the default values. If the key already exists, I update the value. Also, note that you need to make sure that you close the key while exiting from the method. Very simple right? Accessing and settings is simple too. We just need to use the exposed property. UserOptions.TrayNotifications = true; UserOptions.SaveSettingsToStorage(); Reading settings is as simple as reading a property. UserOptions.LoadSettingsFromStorage(); var trayNotifications = UserOptions.TrayNotifications; Lastly, the most important step. We need to tell Visual Studio shell that our package exposes options using the UserOptions class. For this we need to decorate our package class with ProvideProfile attribute as below. [ProvideProfile(typeof(UserOptions), "TForVS2013", "TeamRooms", 110, 110, false, DescriptionResourceID = 401)] public sealed class TeamRooms : Microsoft.VisualStudio.Shell.Package { ... } That's it. If everything is alright, once you run the package you will also see your options appearing in "Import Export settings" window, which allows you to export your options.

    Read the article

  • Investing in Servers by Intel

    - by Koushal Deshpande
    Originally posted on: http://geekswithblogs.net/BizTalkAndOtherTechs/archive/2013/10/31/investing-in-servers-by-intel.aspxA nice article reference from Intel, refer here. Referees to cloud as well. Choose correctly what you need. 1 Do determine right server for your company. There is no use getting a server that has redundant services but still add to the costs. 2 Do get servers that can be upgraded. A server with limited memory and storage may not be able to keep up with your business growth. The basic memory and storage options might not be sufficient. Consider at least 8GB of RAM and 1 terabyte of hard disk space. 3 Do check the server has at least one Gigabit Ethernet port. This allows high speed transferring of files and increases productivity for your employees. USB and Firewire ports may not be enough as their transfer speed is too low and will affect the productivity of your company. Infinite Technologies is ready to help perform this upgrade. Contact Infinite Technologies now View our other resellers » 4 Do verify that the server comes with documentation. Documentation allows you to make a claim when your server breaks down and is supported by a warranty. 6 Do check the support options for the server from the manufacturer. Different manufacturer has different support options such as maintenance plans and software upgrades. 5 Do always look into the warranty. Get an enhanced warranty that guarantees response and repair time to avoid disruption. 7 Do get server management tools that can be used on any computer. Server management tools should be cross compatible across different operating systems to take into account future PC replacements. 8 Do check the power usage of the servers. Get the right power supply to avoid damaging server hardware and consider the Intel® Xeon® E3 processor to help save on your electricity bills. 9 Do check what built-in security packages are available. Ensure that your server is protected. Built-in security1 helps you save on getting add on security packages.

    Read the article

  • KVM vs Hyper-V. Which hypervisor is best for windows guests?

    - by user198851
    I am currently testing openstack for windows guests (XP and 7). I have deployed openstack "all in one" on system with following specs Processor corei5. (4 physical cores and 8 Threads with HT Technology) RAM 8 GB. HD 500 GB. I have created 4 windows xp guests with 512MB RAM and 1VCPU. On each windows guest i have installed visual studio 2008 only. In nova.conf CPU Over-Commit ratio is 2 for better performance (as mentioned in openstack operation guide). Using KVM as hyerpvisor. I have observed poor performance when simultaneously using visual studio in four windows instances. How i can improve performance ? Should i use KVM or Hyper-V ? or any other suggestion ?

    Read the article

  • Exchange 2013 - DNS Records for Accepting Multiple Domains

    - by William
    I have an Exchange 2013 server accepting two domains: domain1.com and domain2.com. All of the exchange services (OWA, ECP, POP3, SMTP, etc.) can be found via the address mail.domain1.com. So, in the DNS records for domain1, I have the following entries: MX Record mail.domain1.com A Record mail.domain1.com - (IP Address of Server) CNAME Record autodiscover.domain1.com - mail.domain1.com Now, for domain2.com, how would I set up the DNS records? Would I have the autodiscover just be a cname for autodiscover.domain1.com? Would this allow me to leverage the certificates that I have installed for domain1?

    Read the article

  • Force RAID to read exiled disk?

    - by user198847
    user user197015 asked on 1th of November the following question: "We have a RAID 6 array (Infortrend EonStor DS S16F) that recently had two disks fail. Immediately prior to replacing these two disks, a third, good, disk was accidentally ejected from the array. After reinserting this disk it is marked as "exiled" by the array's firmware, and so even after replacing the two failed disks with new ones the array refuses to rebuild the logical volume and remains inaccessible. Since the temporarily-ejected disk is still functional and nothing has been written to the array since it was ejected, it seems that it should theoretically be possible to recover all the data on the array, but how can we convince the array to use the data from the "exiled" disk? Thanks for any help or advice you can offer." Now I've got quite the same problem. The post has been deleted by the user, so I don#t know if he was successful. Is there anybody who can help me? Thank you!

    Read the article

  • Jetty - 401 Unauthorized when using basic authentication

    - by JP.
    I am running SOLR on jetty in Ubuntu (a bitnami VM, if that helps) and am trying to lock down access to both the admin pages and the update/delete/etc. pages using basic authentication. When I attempt to connect to the admin console via a web browser I am prompted for a user name and password, but the username and password I use simply does not work. For test purposes I am using foo:bar as the credentials, but I receive a '401 Unauthorized' response. I see the following in my request log. 127.0.0.1 - - [10/Nov/2013:05:35:46 +0000] "GET /solr/ HTTP/1.1" 401 1376 Am I doing something wrong and/or is there anything obviously incorrect with the below configuration? Any help is greatly appreciated. Jetty.xml <Call name="addBean"> <Arg> <New class="org.eclipse.jetty.security.HashLoginService"> <Set name="name">solr</Set> <Set name="config"><SystemProperty name="jetty.home" default="."/>/etc/realm.properties</Set> <Set name="refreshInterval">5</Set> </New> </Arg> </Call> /etc/realm.properties foo: bar, solr_admin webdefault.xml <security-constraint> <web-resource-collection> <url-pattern>/</url-pattern> </web-resource-collection> <auth-constraint> <role-name>solr_admin</role-name> </auth-constraint> </security-constraint> <login-config> <auth-method>BASIC</auth-method> <realm-name>solr</realm-name> </login-config>

    Read the article

  • Getting file not found error with pdebuild

    - by user35042
    I am attempting to build a Debian package using pdebuild on my main development server (running Debian wheezy). Here is the command I run: pdebuild --pbuilder cowbuilder --buildresult .. \ --debbuildopts -i -- \ --basepath /var/cache/pbuilder/base-wheezy.cow \ --distribution wheezy --configfile /etc/pbuilder/wheezy This works on other servers, but on one server I get this output: I: using cowbuilder as pbuilder dpkg-buildpackage: source package libexample-orange-util-perl dpkg-buildpackage: source version 0.08 dpkg-buildpackage: source changed by John User <[email protected]> dpkg-source -i --before-build libexample-orange-util-perl fakeroot debian/rules clean dh clean dh_testdir dh_auto_clean dh_clean dpkg-source -i -b libexample-orange-util-perl dpkg-source: info: using source format `3.0 (native)' dpkg-source: info: building libexample-orange-util-perl in libexample-orange-util-perl_0.08.tar.gz dpkg-source: info: building libexample-orange-util-perl in libexample-orange-util-perl_0.08.dsc dpkg-genchanges -S >../libexample-orange-util-perl_0.08_source.changes dpkg-genchanges: including full source code in upload dpkg-source -i --after-build libexample-orange-util-perl dpkg-buildpackage: source only upload: Debian-native package File not found: ../libexample-orange-util-perl_0.08.dsc There is no file ../libexample-orange-util-perl_0.08.dsc, but on other build servers no such file is needed (it gets created by the package build). What is causing this "file not found" error?

    Read the article

  • pgAdmin cannot connect to PostgreSQL 9.1

    - by Nyxynyx
    I am trying to use pgAdmin on Windows to connect to postgresql 9.1.8 running on localhost's Ubuntu 12.04 VM. The host's port 5432 forwards to VM's port 5432. pgAdmin Error: Error connecting to the server: could not receive data from server: Software caused connection abortion (0x00002745/10053) postgresql.conf #------------------------------------------------------------------------------ # CONNECTIONS AND AUTHENTICATION #------------------------------------------------------------------------------ # - Connection Settings - listen_addresses = '*' port = 5432 pg_hba.conf local all postgres peer # TYPE DATABASE USER ADDRESS METHOD host all all 0.0.0.0/0 md5 host all all 127.0.0.1/32 md5 host all all ::1/128 md5 netstat -nlp | 5432 tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 29035/postgres unix 2 [ ACC ] STREAM LISTENING 50823 29035/postgres /var/run/postgresql/.s.PGSQL.5432 iptables rule iptables -I INPUT -p tcp --dport 5432 -j ACCEPT PostgreSQL service has been restarted and pgAdmin still gives the error. Any ideas what have caused it?

    Read the article

  • Openstack keystone issue

    - by kevin
    i am having an issue with keystone,keystone is configured with users nova,glance and admin user and their endpoints are also defined. when performing keystone token-get it is showing token,but for commands like keystone user-list its showing No handlers could be found for logger "keystoneclient.client" Unable to communicate with identity service: 404 Not Found The resource could not be found. . (HTTP 404) but after setting these env variables it worked export SERVICE_ENDPOINT=http://192.168.10.15:35357/v2.0 export SERVICE_TOKEN=token but after that for keystone token-get its showing 'Client' object has no attribute 'service_catalog' Why is it so?How can it be fixed any ideas

    Read the article

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