Posts

Showing posts from February, 2015

html5 - Can we use figcaption element now? -

html5 - Can we use figcaption element now? - there still discussions , doubts whether <figcaption> remain in html5 or not. used , seems nice , semantic. should stop using it, or can go on investing on incorporating element projects? well, personally, i'd wouldn't utilize it. not because of discussions, because of browser compatibility. example, ie9 has worst html5 score (according http://html5test.com/results.html) of modern web browser (ie, firefox, chrome, safari, etc.). so, never know if might not back upwards html5 well. recommend using javascript setup html validation scheme (or whatever want phone call it). web page (through javascript) figure out useragent string web browser end-user uses connect site. if useragent string 1 of ones listed somewhere in website, utilize html5. if it's not on list (or on no-html5 list), should utilize standard html (4.01). there few new html5 macros i'm using. when html5 becomes official, i'll start...

SQL - Count with LEFT OUTER JOIN is incorrect -

SQL - Count with LEFT OUTER JOIN is incorrect - i'm trying retrieve fields issue table along related record counts comment table , issue_assigneduser table. if there 2 comments , 6 assigned users, values 12 both counts. thought how remedy this? select issue.issueid, count(comment.commentid) countofcomments, count(issue_assigneduser.userid) countofassignedusers, issue.title, issue.detail, issue.enteredby, issue.datetimeentered, issue.assignedto, issue.categoryid, issue.severityid, issue.statusid, issue.lastcommentdatetime lastcommentdatetime, issue.lastcommentbyuserid, users.initials lastcommentuserinitials, lookupstatus.status status, lookupcategory.category category, lookupseverity.severity severity, getutcdate() utcdatetime issue inner bring together lookupcategory on issue.categoryid = lookupcategory.categoryid inner bring together lookupseverity on issue.severityid = lookupseverity.severityid inne...

Ipad tableview doubts -

Ipad tableview doubts - i have problem code scroll=[[uiscrollview alloc] initwithframe:cgrectmake(0, 0, 320, 460)]; scroll.backgroundcolor=[uicolor clearcolor]; scroll.pagingenabled=yes; scroll.contentsize = cgsizemake(320*5, 460); cgfloat x=0; for(int i=1;i<6;i++) { uitableview *table = [[uitableview alloc]initwithframe:cgrectmake(x+10, 10, 300, 440) style:uitableviewstylegrouped]; table.delegate=self; table.datasource=self; [scroll addsubview:table]; [table release]; x+=320; } [self.view addsubview:scroll]; scroll.showshorizontalscrollindicator=no; [scroll release]; this code pagination through scrollview tableview,but need set info in these 5 tableview cells create above.how set info through these tableviews.(data xml parsing) thanks advance you've correctly set self tableview's info source , delegate. the table views inquire info , need implement uita...

Exclamation(!) operator used on a number in vb.net, what does this do? -

Exclamation(!) operator used on a number in vb.net, what does this do? - i'm looking @ inherited code , found in vb.net windows form: new system.drawing.sizef(6.0!, 13.0!) my question is, significance of ! (exclamation) operator here? of searching exclamation operator ends returning recordset format or ! gets ignored in search , hundreds of unrelated items. it's forcefulness literal single. visual basic supports type characters: in add-on specifying info type in declaration statement, can forcefulness info type of programming elements type character. type character must follow element, no intervening characters of kind. and: literals can utilize identifier type characters (%, &, @, !, #, $), can variables, constants, , expressions. however, literal type characters (s, i, l, d, f, r, c) can used literals. vb.net

JSON/GSON with changing keys into Java -

JSON/GSON with changing keys into Java - i'm trying process json java object using beans , gson. however, keys in json code using can alter on time, based on traded. can manually create bean file includes each currency code, in end, can different, , programme broken. here code: from main class: public void updatedata() { info data; string s = null; seek { s = datagetter.getjson("http://bitcoincharts.com/t/weighted_prices.json"); } grab (exception e) { // todo auto-generated grab block e.printstacktrace(); } s = s.replaceall("7d", "week"); s = s.replaceall("30d", "month"); s = s.replaceall("24h", "day"); s = s.tolowercase(); info = new gson().fromjson(s, data.class); } data.java: package tehsusenoh.bittick.get; import java.util.arraylist; import java.util.list; public class info { public enum currency { usd, aud,...

php - posts overlapping -

php - posts overlapping - now dont know if simple or hard. if css or php code need have posting scheme , users can comment on posts. in comments page shows orginal post , 1 users have left (the comments) had 1 in there , fine added , looked this... [1]: http://i.stack.imgur.com/2fixd.jpg can see completly different! heres code it... <?php mysql_connect("localhost", "root", ""); mysql_select_db("test"); echo "<a href='untitled9.php'>go back...</a>"; ?> <br/><br/> <div class="message"> <?php $sql = mysql_query("select * threads id = '". mysql_real_escape_string($_get['id']) . "'") or die(mysql_error()); while($r = mysql_fetch_array($sql)) { $posted = date("js m y h:i",$r['posted']); echo "".$r['author']." &nbsp; $posted"; ?> ...

coldfusionbuilder - Cannot start server in coldfusion builder 2 -

coldfusionbuilder - Cannot start server in coldfusion builder 2 - i have installed adobe coldfusion builder 2 , able set up, using tutorial http://www.adobe.com/devnet/coldfusion/articles/setup_dev.html after restarted computer (for updates take effect), unable start server added using coldfusion builder (cfserver). next error - 'starting cfusion' has encountered problem ensure server not running, or application not using webserver port. does know this? lost edit: error console prints out [cfusion]:07/13 12:50:14 error [thread-13] - platform, locale, , platform name must not null if using vista or windows 7 used have problem trying start coldfusion server unless launched cfb administrator privileges , ran in xp compatability mode. coldfusion coldfusionbuilder

.net - sql Left join with linq lampda expression -

.net - sql Left join with linq lampda expression - i have problem in making left/right bring together linq. i have lets say public class client { prop string customerid { get; set; } prop string languageguid { get; set; } } public class readonlycustomer { prop string customerid { get; set; } prop string languageguid { get; set; } } i have lot of customers in readonlycustomer table. in case dont have customers in client table. cant utilize join, dont inner join. need left or right join. var test = db.customer.join(db.readonlycustomer, p => p.customerid, o => o.customerid, (c, o) => new readonlycustomer() { customerid = c.customerid, languageguid = o.languageguid ?? c.languageguid }); at point, null pointer, because query cant bring together on null ref. how can left bring together equal sql left join, null value not exist in datasource. this needs in lampda not comprehensing syntax (from o in ....) // dennis you need utilize group...

Difficulty in understanding jQuery's Event Objects -

Difficulty in understanding jQuery's Event Objects - i'm learning jquery , stuck in event objects i'm not getting 4 event objects,i've gone through jquery docs i'm not getting where 4 event object in action pratically ? preventdefault() isdefaultprevented() stoppropagation() ispropagationstopped() hoping quick , positive response.. preventdefault() used stop default action event beingness fired. example, if attached custom callback link's click event, preventdefault() prevent page opening (perhaps create ajax call?). stoppropagation() used stop event bubbling dom parent element. example, if had tree menu , wanted apply custom callback hover event, not parents, utilize function. the other 2 check whether above 2 have been used yet. jquery

c - Are there known implementations of the CIEDE2000 or CIE94 Delta-E color difference calculation algorithm? -

c - Are there known implementations of the CIEDE2000 or CIE94 Delta-E color difference calculation algorithm? - i need calculate delta-e distance between 2 colors. algorithm 2 colors in cielab color space looks this: are there known open-sourced implementations of algorithm? it's not hard implement, lastly effort of implementing color-space conversion algorithm i'd prefer not re-develop wheel when it's on road , tested. ciede2000 nice , more accurate, might overkill on iphone. cie94 fine guess. i typed in equation (for mutual lisp code see @ bottom) , ran few random evaluations. parameters listed in order: l*1 a*1 b*1 l*2 a*2 b*2 deltae* i'm not sure results correct. if code gives same results, it's sufficient. ((53.0 0.65 0.15 33.0 -0.45 -0.1 20.03112) (42.0 -0.3 0.1 74.0 -0.2 -0.15 32.001118) (12.0 -1.0 -0.45 32.0 0.3 0.9 20.084782) (94.0 -0.1 -0.55 77.0 0.5 0.45 17.03928) (75.0 -0.8 0.35 46.0 -0.6 -0.85 29.02483) (...

php - SESSION Cart adding 2 + or -2 problem -

php - SESSION Cart adding 2 + or -2 problem - so edited own shop im having issues it, illustration add together 2 instead of 1 or removes 2 instead of 1, you can see how looks on www.neobotmx.org/test/tienda.php <<< not opwn public yet >> thats why on test folder the shop code : <?php $product_id = $_get[id]; //the product id url $action = $_get[action]; //the action url //if there product_id , product_id doesn't exist display error message if($product_id && !productexists($product_id)) { die("error. product doesn't exist"); } switch($action) { //decide case "add": $_session['cart'][$product_id]++; //add 1 quantity of product id $product_id break; case "remove": $_session['cart'][$product_id]--; //remove 1 quantity of product id $product_id if($_session['cart'][$product_i...

iis 7 - restarting Application Pool every specific duration asp.net. IIS7 -

iis 7 - restarting Application Pool every specific duration asp.net. IIS7 - my application pool gets stopped every , coz of problem in code or wrong on page, want restart application pool every 5 mins, dont have open iis , restart everytime gets stopped. there way can start application pool if stops. asp.net iis-7 application-pool

ruby on rails - How do I create a dropdown of the valid values set by validates_inclusion_of? -

ruby on rails - How do I create a dropdown of the valid values set by validates_inclusion_of? - i have user model object permission attribute restricted validates_inclusion_of ['user','org_admin','site_admin'] . when designing create/edit form object, don't want duplicate list, in case changes later. there "rails way" this, or should extract list of valid values attribute accessible outside of instance? if wanted work strings define user::permissions constance includes mentioned permissions. class user < activerecord::base permissions = ['user','org_admin','site_admin'] validates_inclusion_of :permission, :in => permissions end a simplified form (using simple_form in example) simple_form_for(@user) |f| f.input :permission, :as => :select, :collection => user::permissions end it neater create permissions model , save permission_id when create new user. there improve ways i...

actionscript 3 - Flex: moving a point with rotation doesnt change the point XY? -

actionscript 3 - Flex: moving a point with rotation doesnt change the point XY? - i have follow issue : i have point setted @ border on component, changed transform point center of component in order match component rotation. the of import part when seek point xy after rotation - remains same before rotation. how xy, after rotation ( changeing point.rotation property specific degrees of rotaion ) if want point after rotation, cos(r) * x, sin(r) * y easiest way. if want point after transformations, should able utilize displayobject.transform.transformpoint(x, y) . there's displayobject.localtoglobal . in case phone call localtoglobal(x, y) , localtoglobal(0, 0) , calculate difference. see transform livedocs , displayobject livedocs flex actionscript-3

IllegalArgumentException when calling invoke method using Java Reflections -

IllegalArgumentException when calling invoke method using Java Reflections - i have class has method follows :- public void setcurrencycode(list<string> newcurrencycode){ this.currencycode = newcurrencycode; } i using java relections invoke method follows :- try { list<string> value = new arraylist<string>(); value.add("gb"); class<?> clazz = class.forname( "com.xxx.currency" ); object obj = clazz.newinstance(); class param[] = { list.class }; method method = obj.getclass().getdeclaredmethod( "setcurrencycode", param ); method.invoke( value ); } catch(exception e) { system.out.println( "exception : " + e.getmessage() ); } however, exception raised on "invoke" phone call :- java.lang.illegalargumentexception: object not instance of declaring class any ideas? thanks sarah this means value object pass invoke not instance of class on method de...

trouble with short Makefile -

trouble with short Makefile - i have short makefile. uname coming uname command, purposes of example, hardcoded. i'd check if uname starts string "mingw32_nt", code within if should execute. uname := linux # mingw32_nt-6.1 ifneq ( $(findstr mingw32_nt, $(uname)) , "" ) uname := mingw32 endif info: @echo compiling "$(uname)" edit: problem quotes , spaces. ;-) ifneq ($(findstring mingw32_nt, $(uname)),) assuming you're using gnu make, function should findstring . also, rules strings , spaces little strict in makefile . next works: uname := linux # mingw32_nt-6.1 ifneq ($(findstring mingw32_nt,$(uname)),) uname := mingw32 endif info: @echo compiling "$(uname)" (note removed spurious spaces in ifneq test.) makefile

model view controller - mvc - post xml to another site (and redirect to it) -

model view controller - mvc - post xml to another site (and redirect to it) - i using mvc 2 , .net 3.5. i have 2 mvc sites. how can post xml message action/page in site 1 page in site 2? , @ same time redirect user site 1 page in site 2. thank much probably easiest way modify site 2 , add together controller action take application/x-www-form-urlencoded request (a.k.a. simple form post): <form action="http://site2.com/" method="post"> <%= html.hiddenfor(x => x.xmldata) %> <input type="submit" value="go site 2" /> </form> and on site 2 within newly created action serve entry point fetch xml string , process it: [httppost] [validateinput(false)] // <-- that's necessary posting xml public actionresult index(string xmldata) { // posted xml, , redirect or straight render view } model-view-controller http asp.net-mvc-2

android - Problem with audio -

android - Problem with audio - in android app can record sound , save on phone/sdk. checked audible , clear when play on phone. size of sound file created 5.9kb(.amr format). next upload file server, stores sound on sql db. upload successful. when uploaded sound played, garbled... in database store sound in column datatype image , of length 16. my question ..why noise garbled after upload. how verify sound saved correctly without noise added. code file upload inputstream = new datainputstream(new fileinputstream( filename)); byte[] responsedata = new byte[10000]; int length = 0; stringbuffer rawresponse = new stringbuffer(); while (-1 != (length = inputstream.read(responsedata))) rawresponse.append(new string(responsedata, 0, length)); string finalstring = rawresponse.tostring(); voicedataarray = finalstring.getbytes(); your problem much due utilize of stringbuffer ...

php - Convert mysql result (big associative array) to nested arrays -

php - Convert mysql result (big associative array) to nested arrays - i have simple query this select hometeam.name hometeamname, hometeam.shortname hometeamshortname, roadteam.name roadteamname, roadteam.shortname roadteamshortname, smatch.startdate smatch bring together team hometeam on smatch.hometeamid = hometeam.uid bring together team roadteam on smatch.roadteamid = roadteam.uid which default returns 1 dimensional array, this: array(5) { ["hometeamname"] => "brasil" ["hometeamshortname"] => "bra" ["roadteamname"] => "norway" ["roadteamshortname"]=> "nor" ["startdate"]=> "1309709700" } question is, there mysql-way allow result nested array, structure following? result => hometeam => name shortname roadteam => name shortname st...

Django User Profile Inline Creation Integrity Error on Save -

Django User Profile Inline Creation Integrity Error on Save - i'm having issues user profiles in django currently. i followed recommendations , created user profile: class userprofile(models.model): user = models.onetoonefield(user) is_teacher = models.booleanfield(verbose_name = "teacher", help_text = "designates whether user teacher , can administer , add together students , classes") school = models.foreignkey(school) def __unicode__(self): homecoming self.user.username def save(self, *args, **kwargs): if not self.pk: try: p = userprofile.objects.get(user=self.user) self.pk = p.pk except userprofile.doesnotexist: pass super(userprofile, self).save(*args, **kwargs) i inlined user profile user admin page. utilize create sure user profile created along user: def create_user_profile(sender, instance, created, **kwargs): "...

objective c - How can I add TTTableViewDragRefreshDelegate only for one page in UITabBarController? -

objective c - How can I add TTTableViewDragRefreshDelegate only for one page in UITabBarController? - hi have tabbar controller includes 2 pages , b. want add together tttableviewdragrefreshdelegate page a. if set code: - (id<tttableviewdelegate>) createdelegate { tttableviewdragrefreshdelegate *delegate = [[tttableviewdragrefreshdelegate alloc] initwithcontroller:self]; homecoming [delegate autorelease]; } into uitabbarcontroller both , b got refresh, set above code a's view controller , phone call a's view controller in uitabbarcontroller this: if (_page == apage) { aviewcontroller *_aviewcontroller = [[[aviewcontroller alloc] init] autorelease]; self.datasource = _aviewcontroller.datasource; ... } but seems not work, page still not drag , refresh. how can tttableviewdragrefreshdelegate page in uitabbarcontroller ? this aviewcontroller init code: - (id)init { if (self = [super init]) { self.variableheight...

PayPal Sandbox Code Integration IPN Problem with Asp.net/C# -

PayPal Sandbox Code Integration IPN Problem with Asp.net/C# - i need help regarding paypal code integration asp.net/c# on paypal sandbox, using paypal ipn , code same provided paypal. working on local host. payment has gone fine on paypal , have received amount on paypal sandbox business relationship when paypal redirects website page shows me next exception: "unable connect remote serversystem.net.sockets.socketexception (0x80004005): connection effort failed because connected party did not respond after period of time, or established connection failed because connected host has failed respond 192.168.10.9:8080 @ system.net.sockets.socket.doconnect(endpoint endpointsnapshot, socketaddress socketaddress) @ system.net.servicepoint.connectsocketinternal(boolean connectfailure, socket s4, socket s6, socket& socket, ipaddress& address, connectsocketstate state, iasyncresult asyncresult, int32 timeout, exception& exception) @ system.net.httpwebrequest.getrequestst...

java - Request based intrusion detection in Tomcat -

java - Request based intrusion detection in Tomcat - i'm wondering if there way force tomcat requests through custom class (e.g without having heavily modify codebase) things running regex check xss , sql injection attacks , deny them/sanitize them based on knowledge. thanks of course of study - utilize filter: http://www.google.com/search?sourceid=chrome&ie=utf-8&q=java+xss+filter http://www.google.com/search?sourceid=chrome&ie=utf-8&q=java+servlet+filter java tomcat java-ee intrusion-detection

xml - How to make xsd element extend another -

xml - How to make xsd element extend another - i have 3 different xml elements have mutual tags. for e.g: person has name, age, sex have manager, employee share 3 fields person has plus manager, employee specific fields managerno, employeeno etc. can write in xsd this 1. declare person element <xsd:element name="person"> <xsd:annotation> <xsd:documentation>person request</xsd:documentation> </xsd:annotation> <xsd:complextype> <xsd:sequence> <xsd:element name="personname" type="xsd:string" minoccurs="1" maxoccurs="1" /> <xsd:element name="age" type="xsd:integer" minoccurs="1" maxoccurs="1" /> </xsd:sequence> </xsd:complextype> </xsd:element> use above person declaration , extend manager elemen...

Rails custom css links are not working - following tutorial in http://ruby.railstutorial.org -

Rails custom css links are not working - following tutorial in http://ruby.railstutorial.org - i'm new rails , working way tutorial here: http://ruby.railstutorial.org/ruby-on-rails-tutorial-book i've added design css bundle public/stylesheets directory , added custom.css file cannot seem stylesheet load. understanding fo setup page should have bluish background , other little changes. in app/views/layouts/application.html.erb file i've added next line: <%= stylesheet_link_tag 'stylesheets/custom', :media => 'screen' %> which believe should cause css /public/custom.css load. in tutorial content of custom.css file located in section 5.1.2 (sorry i'm able post 2 hyperlinks here) . , content of app/views/layouts/application.html.erb file here: http://ruby.railstutorial.org/chapters/filling-in-the-layout#sec:adding_to_the_layout when view source on page there link custom.css file here: but clicking brings "routing e...

c# - How can i get picture by having the URL? -

c# - How can i get picture by having the URL? - i need find way show image on application form having url of image. how can ? the application silverlight application , url can image facebook for winform utilize system.net.httpwebrequest class. have @ link. for silverlight do uri uri = new uri("http://test.com/abc.jpg"); //just dummy uri yourimage.source = new bitmapimage(uri); c# silverlight facebook

sql server - Visual Studio database project won't deploy to SQL Azure -

sql server - Visual Studio database project won't deploy to SQL Azure - i've ran problem similar this. have .dbproj visual studio database project. deploys fine in sql server express. want deploy sql azure - alter connection parameters deployment fails next text: c:\program files\msbuild\microsoft\visualstudio\v10.0\teamdata\microsoft.data.schema.tsqltasks.targets(120,5): error deploy01234: target database schema provider not determined. deployment cannot continue. done executing task "sqldeploytask" -- failed. is deploying .dbproj projects sql azure supported? how create visual studio deploy database sql azure? other ways accomplish more or less same results except recreating database manually using azure portal? as far know, database projects still not supported windows azure. can deploy project local sql server , utilize "generate scripts" feature port database sql azure. see link. sql sql-server visual-studio-2010 azure s...

Is IP address authentication safe for web service / site? -

Is IP address authentication safe for web service / site? - we're building web service users subscribe to, , thinking of authenticating users based on ip address. i understand creates hassle, eg, if client's ip changes, wanted know security point of view if safe? i'm not sure how hard spoof ip addresses, thinking if happened wouldn't end sending info attacker. any thoughts? thanks! think proxies , vpn's. , if user utilize site other pc? you might wan't utilize browser fingerprints (toghetter ip) ithis safer, thy must utilize same browser... conclusion, not idea web-services authentication ip

Get a file's path from a file chooser dialog in Ruby on Rails -

Get a file's path from a file chooser dialog in Ruby on Rails - i import csv files in application, application needs total path of file. if hard-code file's path in application, works well, want user himself take own file file chooser dialog (like jfilechooser in java). this, path of selected file. there can help me ? thanks lot ! nobody else answered ??? the simplest way gem green_shoes install with gem install green_shoes see http://ashbb.github.com/green_shoes/ then in script require 'green_shoes' filename = ask_open_file that's it ruby-on-rails file csv path openfiledialog

java - Trying to call a method using reflection and automatically parsing input -

java - Trying to call a method using reflection and automatically parsing input - i'm trying allow user phone call method on server using sockets , reflection. client knows method names , number of parameters, not actual parameter types. every method on server takes 0 or more primitive arguments (including strings) , returns primitive. i'm taking input user in client using scanner, string, , i'm using .split(" ") separate parameters. how automatically parse these strings right types (int, double, boolean, char, etc) on server? here's i'm doing on server. clientoutput , clientinput objectoutputstream , objectinputstream on socket, , m method i'm calling. class<?>[] parametertypes = m.getparametertypes(); clientoutput.writeobject(parametertypes.length); clientoutput.flush(); object[] parameters = (object[]) clientinput.readobject(); (int = 0; < parametertypes.length; i++) { //some sort of if statement? way handle booleans or ...

javascript - Extracting strings from an input field using regular expressions and jQuery -

javascript - Extracting strings from an input field using regular expressions and jQuery - i trying match string in input field using regular look /[1-9][a-za-z]/ , insert <p> tag using jquery. i modified this illustration jquery api docs include next if statement. when type '1a' in input field works, want exclude rest of string <p> includes matched string portion. $("input").keyup(function () { if($(this).val().match(/[1-9][a-za-z]/)){ var value = $(this).val(); }; $("p").text(value); }).keyup(); did explain clearly? point me in right direction? much appreciated, so doing in above code if value of input field matches regular expression, assign value <p> tag. since, want assign matched string <p> tag, should do: $("input").keyup(function () { var match = $(this).val().match(/[1-9][a-za-z]/); if(match){ var valu...

c# - How do I append child node in an Internet Explorer BHO extension? -

c# - How do I append child node in an Internet Explorer BHO extension? - i porting firefox extension , trying append button node on web page. nil occurs on page. believe has conversion between htmldomnode , htmlelement. don't errors within console using ie dev add together on. my code: public void ondocumentcomplete(object pdisp, ref object url) { htmldocument document = (htmldocument)webbrowser.document; var fblike = document.getelementbyid("likepluginpagelet"); var button = document.createelement("input"); button.setattribute("value", "mybutton"); button.setattribute("onclick", "dosomething()"); ((ihtmldomnode)fblike).appendchild((ihtmldomnode)button); } you need create fblike dynamic. public void ondocumentcomplete(object pdisp, ref object url) { htmldocument document = (htmldocument)webbrowser.document; var fblike = document.gete...

ruby on rails - no memory error, failed to allocate memory -

ruby on rails - no memory error, failed to allocate memory - i'm new in ruby on rails each time create error (in function instance), computer (xubuntu 10.10) totally freezes. actually can't except waiting , got "no memory error -> failed allocate memory" error after 5 or 10 minutes. i utilize rails 3 , mongodb. i'm developping existing project many gems, there consequences ? thank ! possible diagnosis: you using ruby installed ubuntu packages you have bad physical ram these days it's practice install rubies through rvm: http://beginrescueend.com/ if want test if ram bad seek memtest86: http://www.memtest86.com/ i'd go installing rvm. ruby-on-rails ruby ruby-on-rails-3 rubygems

animation - Isotope animating inserts from top-left of container -

animation - Isotope animating inserts from top-left of container - for isotope container, whenever insert new item container... appears in top-left of container (so in position of first item) , animates moving downwards place should go based on sorts. here illustration of happen though: http://jsfiddle.net/aaairc/h4zmv/5/. see in example, new item zooms in starting position going take within container. i haven't been able replicate issue i'm seeing locally on jsfiddle yet, thought might have initial suggestion or point me in jsfiddle illustration enabling insert have nice zoom in functionality. default? related css? also, not sure if relevant, container items of isotope instance or jpgs. it had how specify css. when changed css on worked how expected like. /**** isotope css3 transitions ****/ .isotope, .isotope .isotope-item { -webkit-transition-duration: 0.8s; -moz-transition-duration: 0.8s; transition-duration: 0.8s; } .isotope { ...

android - How to connect to mysql database using only ajax and javascript? -

android - How to connect to mysql database using only ajax and javascript? - i trying create app using phone gap makes users login in. know how connect mysql database using php have no clue on how connect using ajax. hope show how done or if there way connect mysql database in phonegap. thank you you can't straight connect mysql database client side.. not right (but i've heard people doing similar mongodb). anyway, right approach is: you have have server side code (web service) methods connect database, perform crud operations. application api. in client utilize api. if on javascrip, using of jquery best. javascript android mysql ajax cordova

actionscript - Microphone amp using flex/AS -

actionscript - Microphone amp using flex/AS - is there amplifier kind of version written in action script or flex please lead me relevant examples it.. amplifier meaning alter command frequency pitch etc.... can 1 give me links it?? maybe can help http://www.kelvinluck.com/2008/11/first-steps-with-flash-10-audio-programming/ i have seen as3 libraries well, if interested can post them regards, oliver flex actionscript flash mxml mxmlc

clojure - A "hello world" using Netbeans 7.0 Enclojure 1.5 -

clojure - A "hello world" using Netbeans 7.0 Enclojure 1.5 - i started learning clojure. utilize netbeans have no thought how setup simple app spits out anything. followed setup enclojure plugin , seems good. can give short tutorial or hint 1 on setup. prerequisites: netbeans 7 enclojure plugin maven set correctly maven installed maven proxy setup if behind proxy netbeans: tools > options > miscellaneous > maven project setup: menu file > new project > clojure > clojure 1.2 maven project projectname= helloworld default namespace= com.jfcorbet.helloword browse project: projects window > source packages > com.jfcorbet > helloworld.clj you'll see: (ns com.jfcorbet.helloworld ;(:import ) ;(:require ) ) add: (defn hello "prints hello , name parameter" [name] (println (str "hello " name))) (hello "jean-françois") and save. now rightclick project ...

F# constructor doesn't accept tuples? -

F# constructor doesn't accept tuples? - i tried utilize tuple create new instance of class defined in f#. duplicate problem, tried next code. type test(x: int, y:int) = allow distance = x * x + y * y |> float |> sqrt new (x: int, y:int, z:int) = new test(x, y) allow args = 1, 2 allow test2 = new test(args) it complains error 1 fellow member or object constructor 'test' not take 1 argument(s). overload found taking 2 arguments. if remove non-default constructor, things fine. don't understand why becomes two/three arguments instead of tuples. thank much. this subtle, per spec. here's old email response dug asked similar question: ... at play, there (subtle) difference between "tuples" (in f# language) , "syntactic tuples" (in f# specification). method application resolution different when there overloads. if there none, decomposition of argument (i.e. "stuff" s...

c# - NHibernate GenericADOException -

c# - NHibernate GenericADOException - sesion.get(id); produces genericadoexception: could not load entity: [pfc__servidor.entidades.usuario#10][sql: select usuario0.us_id us1_1_0_, usuario0_.us_email us2_1_0_, usuario0_.us_contrasena us3_1_0_ public.usuario usuario0_ usuario0_.us_id=?] any known problem? why not fails? pd: sorry english. act1: inner exception: [system.nullreferenceexception] "object reference not set instance of object" sometimes is session shared among threads? if so, death. sessions not thread safe. c# c#-4.0

asp.net mvc - Is T4MVC compatible with Portable Actions? -

asp.net mvc - Is T4MVC compatible with Portable Actions? - t4mvc works nice traditional asp.net mvc structure. work portable areas (feature mvccontrib)? do portable areas contain files in app (controllers , views)? if so, expect t4mvc work. if running specific issue, please update question more info. asp.net-mvc t4mvc

visual c++ - Weird movss instruction -

visual c++ - Weird movss instruction - i found line in code generated msvc compiler visual studio 2008, while trying figure out seems compiler bug: movss dword ptr [this], xmm2 although not think related bug looking for, bleep? storing float value (completely unrelated this btw) in [this] ? what line do? because sure can't create sense of it! or disassembly view playing tricks on me? providing more assembly and/or source code help, see @ to the lowest degree 2 possibilities: this not pointer, random register pointing memory area. disassembler named such because used pointer in function or other reason. this point class instance, , class has floating-point field first fellow member , no virtual methods. visual-c++ assembly 64bit sse

asp.net mvc - get parameters from referrer -

asp.net mvc - get parameters from referrer - is there easy way extract parameters of referrer url contained in request.urlreferrer? there way parameters used referrer? query?blahid=3&name=blah i refering getting blahid , name url. can done bunch of string manipulations, hoping there easier way. use httputility.parsequerystring system.web . should work: string blahid = string.empty; if(request.urlreferrer != null) { var q = httputility.parsequerystring(request.urlreferrer.query); blahid = q["blahid"]; } asp.net-mvc

playframework - Loosing session between requests in Play 1.2.2 -

This summary is not available. Please click here to view the post.

iphone - how do I keep buttons on a XIB view in the same relative position after orientation change? -

iphone - how do I keep buttons on a XIB view in the same relative position after orientation change? - how maintain buttons on xib view in same relative position after orientation change? so have: the base of operations application based on xcode 4 template "utility application", has mainview & flipsideview controller on main view here have on xib interface builder design layout in portrait (a) button in bottom left, (b) uilabel in bottom middle, , (c) on bottom right little "i" button flick on flipsideview i note when go portrait landscape templates's "i" button in bottom right still stays on bottom right, buttons (i.e. & b above) aren't keeping relative position. so how maintain these buttons in bottom left , bottom centre respectively after orientation change? achievable in ib or require code somewhere (if little code illustration nice)? there tab in interface builder can set resizing options, had simular problem...

shell - Scripting on Linux -

shell - Scripting on Linux - i trying create script run programme on each file in list. have been trying using .csh file (i have no clue if best way), , started simple hello world echo "hello world" the problem cannot execute script, or verify works correctly. (i trying ./testscript.csh wrong). haven't been able find explains how run c scripts, , i'm guessing there's improve way too. need alter work? you need mark executable; unix doesn't execute things arbitrarily based on extension. chmod +x testscript.csh also, strongly recommend using sh or bash instead of csh , or larn idiosyncrasies of csh 's looping , command flow constructs (some things work within them if done particular way, in particular single-line versions things very limited). linux shell csh

Need guidance on getting data to Silverlight app via ASP.NET/WCF -

Need guidance on getting data to Silverlight app via ASP.NET/WCF - first of give thanks help. have looked extensively , haven't found sure solution, here am... basically developing asp.net (4.0) app. 1 webform represents study , divided 2 pieces: - div acts command panel contains textboxes, comboboxes, calendars, etc. provide parameters query, , button data. - div holds silverlight command host. silverlight app contains custom datagrid control. so, imagine, user provides values parameters , clicks button info silverlight app's custom datagrid control. -i know you're asking yourself, why don't add together controls silverlight app , utilize ria services. without going much detail, want newer datagrid can slap of our existing asp.net pages. i don't know best practice this. i've looked extensively , there several options have considered , got feet wet experimenting (with no success). what think have wcf service sends info silverlight cl...

javascript - I want a similar effect with the one from this website. Can it be done with jQuery? -

javascript - I want a similar effect with the one from this website. Can it be done with jQuery? - i need jquery effect similar 1 website: [site removed] if go hover right menu (right of slider), top visit smwf see slider changing. want similar. anyone knows jq plugin or @ to the lowest degree can share how it? can done in jquery? thanks lot! well, 'good start' hope. demo fiddle download jsbin $('#nicemenu ul li>img').clone().appendto('#imgholder'); $('#nicemenu img').addclass('thumb'); $('#nicemenu li:eq(0)').addclass('hovered'); $('#nicemenu li').mouseenter(function(){ var imgsliderw = $('#imgslider').width(); $('#imgholder').width( imgsliderw * ($('#imgholder img').length) ); $(this).addclass('hovered').siblings().removeclass('hovered'); var liindex = $(this).index(); $('#imgholder').animate({left: '-'+ imgsliderw ...

zend framework - How to set M:1 cascade to null using Doctrine2 associations? -

zend framework - How to set M:1 cascade to null using Doctrine2 associations? - q bit dubious, pardon that. i want remove song enitity: my 1:m associations works fine cascade = all. e.g. ratings associated song can deleted. my m:1 don't know how do. i'm setting properties null, persist properties, remove song. e.g album , artist should stay, it's associated other songs. excerpt: /** * owning side * @var my\entity\album * @manytoone(targetentity="album", inversedby="songs") */ private $album; /** * inversed side * @var doctrine\common\collections\arraycollection * @onetomany(targetentity="similar", mappedby="songa", cascade={"all"}) * @orderby({"id" = "desc"}) */ private $similarsa; i wish maintain using association cascading , not on db level. advice on using $em->remove($song) without persisting of m:1 nulls? i found following: in song (parent) entity: /** @pr...

c++ - Is this the correct way of using a void* member pointer? -

c++ - Is this the correct way of using a void* member pointer? - can utilize method dosomething this; first having assigned pointer class void* fellow member of b? class { public: a(int); int m_x; int dosomething(){}; }; class b { public: void* m_y; }; #include "x.h" using namespace std; a::a(int x) { m_x = x; } int main() { //create 2 pointers , b b *b; *a; b = new b(); = new a(15); b->m_y = a; ((a*)b->m_y)->dosomething(); delete a; delete b; homecoming 0; } stay away void* why not have pointer a in b (or even, b owns instance of a ), or b holds smart pointer instance of a - there many other better ways of doing things. c++

javascript - changing Jquery Ui Toggle Panel Icons -

javascript - changing Jquery Ui Toggle Panel Icons - i using jquery ui toggle panel mentioned here: http://jsbin.com/eqape i want utilize icons triangle circle-arrow which has 2 classes circle-arrow-e , circle-arrow-s (selected). how alter next javascript. $("#notaccordion").addclass("ui-accordion ui-accordion-icons ui-widget ui-helper-reset") .find("h3") .addclass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-top ui-corner-bottom") .hover(function() { $(this).toggleclass("ui-state-hover"); }) .prepend('<span class="ui-icon ui-icon-triangle-1-e"></span>') .click(function() { $(this) .toggleclass("ui-accordion-header-active ui-state-active ui-state-default ui-corner-bottom") .find("> .ui-icon").toggleclass("ui-icon-triangle-1-e ui-icon-triangle-1-s").end() .next().toggleclass("ui-acco...

make - Why does my makefile not do what I want - clash between implicit and explicit rules? -

make - Why does my makefile not do what I want - clash between implicit and explicit rules? - the website building sources consists of 2 groups of files. firstly, set of html files include php processing instructions process php at build time part of producing localized markup files. said way, html file source directory processed php pipes output html file in build directory same name. the processing of said html files involves set of php files of own. these files carry actual localization texts substitute placeholders in source html files. these php files in turn generated corresponding xml files. because have chosen xml original carrier localization texts, project part of larger 1 rather heterogenous regards technology used, , went xml, aid ourselves in rapid translation. secondly , lastly, have sec grouping of files can phone call "static" assets, need copied verbatim froms source build directory. i struggling write concise makefile utilize gnu create expre...

Google Maps label a marker with KML -

Google Maps label a marker with KML - i wondering, i've got kml file of points @ locations. when upload kml , direct google maps file, show points. is possible in kml file label point, google maps when search airports or plumbers? illustration this: http://localhostr.com/files/bonhheb/capture.png want markers numbers instead of letters. is possible using kml? or have script this? yes can using styles , adding <styleurl> each placemark see: http://code.google.com/intl/nl-nl/apis/kml/documentation/kml_tut.html#custom_styles or http://econym.org.uk/gmap/kml.htm if want show number in each placemark have create custom image (and style) each one. google-maps kml

javascript - How to add this html in a div, escaping the quotes? -

javascript - How to add this html in a div, escaping the quotes? - i have html code want add together dynamically div in page. my div is: <div id="my_div" class="my_class"> </div> this html code want add together above div, when click on button, using jquery onclick event. <div id="content"> 'hello world 123' <br> <img src='player.gif' width='200' height='100'> morning... have nice day... </div> so far, tried general way, when onclick event invoked: document.getelementbyid("my_div").innerhtml = '<div id="content"> 'hello world 123' <br> <img src='player.gif' width='200' height='100'> morning... have nice day... </div>'; but can see, code error prone, quotes mismatched , breaks. how can escape quotes , add together content div efficiently? this should j...

javascript - Is it possible to make HTML code on a page a PHP variable? -

javascript - Is it possible to make HTML code on a page a PHP variable? - i have table gets rows value of inputs in form submitted on previous page. example input be: <input id="somepath/12345.jpg" class="1" type="hidden" value="<tr class='order'> <td class='imgsrc'>somepath/12345.jpg</td> <td class='imgsize'>4x6</td><td class='imgcount'>1</td> </tr> <tr></tr>" name="order[]"> i using javascript add together cost, shipping, etc rows in table, adding additional rows. there anyway me reference newly built table variable email using php's mail() function? or need go drawing board? from title: can't. however think input value wrong, should htmlspecialchared $your_var = '<input id="somepath/12345.jpg" class="1" type="...

visual studio 2008 - Using OpenCV 2.3 with Qt in QtCreator -

visual studio 2008 - Using OpenCV 2.3 with Qt in QtCreator - as release of opencv 2.3 out, wanted compile , install latest release on system. work qt , qtcreator of course of study wanted able utilize in qt projects. i've tried several methods hours errors: first try: compiling opencv 2.3 with_qt first wanted did 2.2 release worked fine me. followed guide: http://knowtheabc.wordpress.com/2011/02/25/windows-opencv-and-qt-creator/ downloaded source code set cmake , told create mingw makefiles , specified paths g++.exe , gcc.exe , qmake.exe in c:\qt... paths, checked with_qt , generated makefiles release. built , installed in shell using mingw32-make , mingw32-make install after completed successfully, needed add together paths ".pro" file , able build nice software uses opencv (back @ time used 2.2 release). lastly part described here: http://knowtheabc.wordpress.com/2011/02/25/opencv-in-qt/ so tried same 2.3 release compiled old release. builds ill...

replication - MySQL Master at the same time slave? -

replication - MySQL Master at the same time slave? - i have 3 mysql servers (5.1). on server , b set master-master replication databases, lets dx , dy. now have 3rd server database dz. want replicate database dz server , b. in end, server , b replicates dx , dy. on server c there dz replicates server , b. it of import databases dx , dz available on server , b , didn't replicated server c. normally configure server , b slaves server c single database. master-master replication works server slave server b. , server b slave server a. , looks not possible configure more 1 master, different databases? is correct, or there solution replicate database dz server c server , b, if server , b have master-master replication running? as far can see in versions upto 5.6, change master to command can accomodate 1 master , alter existing master. think right, can't currently. mysql replication

javascript - scrollHeight not working with position:absolute -

javascript - scrollHeight not working with position:absolute - i trying retrieve body's scrollheight in order reset size of div id="background1". if in external css set id position:absolute scrollheight returns 0. if set position:relative scrollheight gives me right value. there of course of study many more selectors in css 1 other of set position:absolute - leaving such doesn't alter above behavior. code : <script type="text/javascript"> function getelement(elem) { var art; if ( document.all ) { // way old msie versions work fine art = document.all[elem]; } else if ( document.layers ) { // way nn4 works fine art = document.layers[elem]; } else if ( document.getelementbyid ) { // way standards work fine art = document.getelementbyid( elem ); } homecoming art; } function togglearticledisplay(elem) { var artarray = docume...

iphone - Image downloaded with NSURLConnection displays correctly on simulator, not at all on iPod -

iphone - Image downloaded with NSURLConnection displays correctly on simulator, not at all on iPod - i'm downloading image (.jpg) webserver , displaying total screen in uiimageview. in simulator image displayed correctly, when loaded application on ipod (ios 4.3.2) blank white page. nsdata image nsurlconnection , set in viewdidload code: uiimage *map = [uiimage imagewithdata:thedata]; mapview.image = map; my mapview setup without image in uiview in interface builder. have toolbar isn't showing on device, uiimageview shows expected on simulator. has seen similar behavior? would seek code? - (void)viewdidload { uiimage *img = [[uiimage imagewithdata:[nsdata datawithcontentsofurl:[nsurl urlwithstring:@"http://xxxxxxx/xxxx.jpg"]]] retain]; if (img != nil) { mapview.image = img; [img release]; } [super viewdidload]; } it perchance not ok you, try... iphone ios uiimageview ipod-touch

javascript - -moz-user-focus equivalent for Chrome -

javascript - -moz-user-focus equivalent for Chrome - i have custom model dialog command used popups in our web pages. when dialog initialized, rest of page grayed out using jquery expose . adding next styles mask div prevent selection on grayed out area. -moz-user-focus: ignore; -moz-user-select: none; -webkit-user-select: none; -khtml-user-select: none; -o-user-select: none; user-select: none; on dialog, pressing ‘esc’key closes dialog , pressing ‘enter’ key works clicking on ok or yes button. if user clicks anywhere on grayed out area; above css prevents focus going onto command in grayed out area in firefox. ie,i programatically handling follows $('#exposemask').attr("contenteditable", "false"); $('#exposemask').attr("unselectable", "on"); but chrome, above css -webkit-user-select prevents selection not help prevent focus. i tried google find solution count not find helpful links. there styl...

java - Replace "^" char -

java - Replace "^" char - i'm trying replace "^" character on string using: string text = text.replaceall("^", "put text"); if text next value: "x^my string" the resulting string is: "put textx^my string" this happens in case of ^ character why this? just utilize non-regex version string.replace() instead of string.replaceall() : text = text.replace("^", "put text"); java regex string character

syntax - Why so many semicolons in JavaScript? -

syntax - Why so many semicolons in JavaScript? - i tend prolific user of semicolons in javascript: var x = 1; var y = 2; if (x==y){do something}; i noticed looking @ lot of javascript doesn't have semicolons next if statements. occurred me don't know preferred syntax semicolons in js , after googling learned (rather surprisingly) there no need semicolons @ aside splitting statements on 1 line. so, question...where did habit of people using semicolons come from? remnant popular language in utilize @ time javascript came play? practice in general? me? i'm going stick no other reason it's nice when writing jquery chains spot end. update: thanks answers, everyone! looks like, summarize things, reason see lot of semicolons in js when not needed comes various variables: older js minimizer's produce broken code if did not insert semicolons many other languages utilize them, it's carried-over habit on occasion, semicolon can alter logic some pr...