Posts

Showing posts from February, 2011

trayicon - prevent more than one tray icon in c# -

i developing application in c#.net,and writing code display icon in system tray,and whenever new message arrives balloon tooltip shown there,which has click event open new message arrived,everything works fine,but problem getting multiple numbers of icon generated in system tray,which shuld one,how can prevent it?i found on internet how dispose them,but couldn't find way prevent more one.or there better way show notifications newly received message..please me if know solution.. there better custom solutions available see here , here examples. however, system tray doesn't refresh automatically. if show/hide multiple system tray icons, can mess tray up. disposed icons disappear when mouse hover. however, there way refresh system tray programmatically. reference here . note : sendmessage function, sends specified message window or windows. sendmessage function calls window procedure specified window , not return until window procedure has processed message. ...

sorting - Keep Views Filters from stacking -

on d7 site have list of items displayed in view. view filtered several different taxonomy vocabularies, each displayed exposed filter ex: culture medium origin artist my problem is, when select, say, drop-down culture, , choose tag, yemenite, view filtered items tagged yemenite. if click drop-down medium, , choose tag, metalwork, view filtered show items tagged both yemenite , metalwork. this far specific, can't find way make filters operate independently when choose medium, filter culture reset, , metalwork shown. filter groups , and/or specifiers create long chains of qualifiers rather resetting , re-filtering. i'm sure can done using jquery, i'm on tight schedule, , experience overriding select lists jquery, , dealing cross-browser issues created has been pretty negative. create elaborate tag hierarchy , display whole thing single filter, clutter isn't viable, it's problematic on mobile. if has thoughts or pointers appreciate help. i...

shell - bash unix incremental script backup issue with omitting directories -

i working on incremental backup backup files modified in last 24 hours. trying avoid copying directories can seeing tree command. maybe it's cpio doing it. don't know alternative of ignoring folders. backup works fine copies directories starting root , destination of files. can copy files , not directories within entire $bksource. #!/bin/bash bkdest="/home/user/backup/incremental" bksource="/home/user/documents" target=${bkdest}/bk.inc.$(date +%y_%m_%d_%h_%m_%s) mkdir -p $target find "$bksource" -type f -mtime 0 | cpio -mdp "$target" here tree after backup. seeing last 24 hours modified files brought folders directories backups last modified files in documents good. [user@localhost bk.inc.2015_08_02_21_56_41]$ tree . └── home └── user └── documents ├── newinc1 ├── newinc2 └── newinc3 if has solution, a...

ruby on rails - Custom Spree Devise Registration - Admin Authorization Failure -

i have added name, surname , birthdate fields devise registration. here link original question. adding name spree devise registration it seems on frontend side works. authorization failure alert when try access admin. here console log: started "/admin/orders" ::1 @ 2015-07-21 13:25:16 -0500 processing spree::admin::orderscontroller#index html spree::preference load (0.3ms) select "spree_preferences".* "spree_preferences" "spree_preferences"."key" = $1 limit 1 [["key", "spree/backend_configuration/locale"]] spree::user load (0.5ms) select "spree_users".* "spree_users" "spree_users"."deleted_at" null , "spree_users"."id" = $1 order "spree_users"."id" asc limit 1 [["id", 6]] (0.7ms) select count(*) "spree_roles" inner join "spree_roles_users" on "spree_roles"."id" ...

regex - How to strip &_escaped_fragment_=?view=classic type parameters off of end of incoming url requests in .htaccess -

google appending following parameters (among others) end of search listings , website cannot handle , need them stripped off code in .htaccess file: &_escaped_fragment_=?view=classic &_escaped_fragment_=?view=flipcard &_escaped_fragment_=?view=magazine &_escaped_fragment_=?view=mosaic &_escaped_fragment_=?view=snapshot &_escaped_fragment_=?view=timeslide i have received response @croises remove other parameters adding , current code follows: rewriteengine on rewritecond %{query_string} ^.+$ rewriterule (.+\.html?)$ $1? [nc,r=301,l] how should modify code above handle &_escaped_fragment_=?view=... parameters too? @anubhava, want me implement, code first in list? again! rewriteengine on rewritecond %{query_string} ^view=[^&]+ [nc] rewriterule ^(.+?)&_escaped_fragment_= /$1? [nc,ne,r=301,l] rewritecond %{query_string} ^.+$ rewritecond %{request_uri} !.*wp-admin.* rewritecond %{request_uri} !.*wp-content.* rewriterule (.+\.html?)$ $1? [n...

c# - Populate View selected record ViewModel -

i trying use viewmodel way validates. my viewmodel: public class ccvm { [required(errormessage = "please enter name")] public string cardholdername { get; set; } [required(errormessage = "please enter credit card number")] public string cardnumber { get; set; } [required(errormessage = "please enter expiration date mmyy")] [stringlength(4, errormessage = "expiration date format mmyy", minimumlength = 4)] public string cardexpirtydate { get; set; } public wholesale wholesale { get; set; } } how can pass selected person in wholesaler , card info view? my controller: public actionresult pay() { if (session["wid"] == null) { return redirecttoaction("index"); } viewbag.step = 2; if (session["wid"] == null) { return new httpstatuscoderesult(httpstatuscode.badrequest); } //wholesale wholesale = db.wholesales.find(session["wid...

java - Spring Boot default test throws an IllegalStateException -

i starting play spring boot , have problems fresh new installation. i have created initial project using http://start.spring.io .. here build.gradle: buildscript { ext { springbootversion = '1.2.5.release' } repositories { mavencentral() } dependencies { classpath("org.springframework.boot:spring-boot-gradle-plugin:${springbootversion}") classpath("io.spring.gradle:dependency-management-plugin:0.5.2.release") } } apply plugin: 'java' apply plugin: 'eclipse' apply plugin: 'idea' apply plugin: 'spring-boot' apply plugin: 'io.spring.dependency-management' jar { basename = 'springboot-demo1' version = '0.0.1-snapshot' } sourcecompatibility = 1.8 targetcompatibility = 1.8 repositories { mavencentral() } dependencies { compile("org.springframework.boot:spring-boot-starter-jdbc") runtime("mysql:mysql-con...

database schema - Building a proper table where multiple images will be uploaded per User ID -

i new php , mysql. have gone through , made basic schema relational database pageant website trying make. confused on how set 1 table 7 images (1 headshot , 6 candid shots) uploaded each contestant , thumbnail created each image upon successful upload. images stored in directroy , not in database. want make sure build table correctly application. not sure how create table. right have table set these fields (photoid(pk), yearid(fk), photo, thumbnail) i think should store entry head shots, , fields like: (photoid(pk), yearid(fk), headshot(imagename), headshot_thumbnail, candid1_thumbnail, candid2_thumbnail, candid3_thumbnail, candid4_thumbnail, candid5_thumbnail, candid6_thumbnail) the name of candid images in directory should stored headshot(imagename)_x => x number of candid shot ranging 1 6. this way not have create new tuple candid shots, corresponding thumbnails stored in table.

amazon ec2 - How to run user scripts at termination of windows ec2 instance? -

i want send email @ termination of windows instance userdata using sns . there chance run scripts send sns message once give command termination? in linux , read there option put script. there way same in windows instances . tried cloudtrail feature, can't userdata not displayed. there other option? in windows, depending on windows version can set policy run script during shutdown. following link describes how run script when windows 7 professional shutdown. windows shutdown script you have fetch userdata , send sns in script.

Laravel 5: Elixir. How to reference a css file from node_modules directory -

i using css file import through npm. respectively saved in "/node_modules" directory. i want compile file other scss files elixir , searching way, how include properly. the options is: rename file file.css file.scss , import in app.scss copy file.css file "resources/assets/" directory, rename scss , include in sass compilation this: now want know, if there way reference file "node_modules" directory, without touching file, because want other people download project , use "composer install" , "npm install" , running. or common way handle this, copy every required file "node_modules" directory resources/assets folder? seems odd, since included bootstrap file of laravel framework added through scss import in app.scss file. now want same, scss files can't import css files, have in case, require me rename it, not work out of box on other environment, since "node_modules" directory not included in ...

android - Does Sugar ORM take serialized name for the column name? -

i want know if sugar orm take serialized name column name in database. eg.. in pojo, public class mypojo implements serializable{ @serializedname("id") string program_id; ..... } what sugar orm take columnname, "id" or "program_id" ? keep in mind @serializedname mapping between gson , objects. underlying sqlite database sugar manages, still have correspondence: string program_id ----> "program_id" sources: https://github.com/satyan/sugar/issues/86

javascript - bootstrap modal dialog box not appearing -

i have modal dialog box supposed show up, code follows: <span style="vertical-align:top;"><a href="#mymodal" role="button" class="btn btn-small btn-red" data-toggle="modal"> delete league </a></span> <!-- start of modal dialog box --> <div class="modal hide fade" id="mymodal"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button> <h3>modal header</h3> </div> <div class="modal-body"> <p>lorem ipsum dolor sit amet, consectetur adipiscing elit. </p> <p>ut nunc libero, sodales venenatis gravida nec, posuere quis ante. phasellus lobortis molestie felis, vitae sagittis ipsum vehicula lobortis. </p> <p>quisque lacus mi, gravida vel facili...

regex - how to replace the bracket only with space in php for the image name -

my text variable $text="518609136buddha_flag-copy-(copy)1.jpg"; i want replace ( ) space "518609136buddha_flag-copy- copy 1.jpg" i use $text=preg_replace('/[^a-za-z]+/', ' ', $text); but output 518609136buddha_flag-copy- copy 1 jpg you can use str_replace $text="518609136buddha_flag-copy-(copy)1.jpg"; str_replace(array( '(', ')' ), '', $text);

Import Bootstrap theme into Odoo -

good day, learn how import custom boostrap themes own odoo website, packaging them theme_modules. in particular, need enlarge building block library more snippets. so created new empty theme_module following documentation started copy paste code blocks free test bootrap theme have (you can find , download here i'm stuck. please me showing me how import them or @ least leading me tutorial/documentation (free) i followed bit this guide didn't much: that's manual process can done in several steps, need creativity separate usefull , functional blocks code. try migrate plainly demo pages on theme, creting pages on odoo. try include css (i recommend use less instead) css work. just when 1 , 2 working start split them. advice: buy 1 of paid themes , read code there several techniques , give access several cool private modules (like website_less automagically convert less in css writting css). i hope helps.

sql - How do I order by a column in a subquery with a distinct clause? -

i have extremely large query need include comma delimited list in. i'm accomplishing subqueries so: stuff(( select distinct ',' + t1.name t2 inner join t1 on t1.id = t2.id t2.otherfield = 12345 order t2.id xml path(''), type).value('.','varchar(max)'), 1, 1, '') talentname in particular case need add distinct clause (as shown). however, when following error: msg 145, level 15, state 1, line 2 order items must appear in select list if select distinct specified. i understand why error occurs, i'm not sure it. t2.id cannot included in select statement returned part of resultset. cannot remove order clause because comma delimited list must in order matches list i'm generating of ids. how can insure comma delimited list both distinct , in proper order? end goal to clarify i'm trying accomplish, qu...

Angularjs data binding when passing a reference? -

sometimes, when 2 variables refer same variable, not binding this: var option = 1; $scope.a = option; $scope.b = option; when change $scope.a, $scope.b not change. see plunker however, binding together, example happens me in modal this: angular.module('plunker', ['ui.bootstrap']); var modaldemoctrl = function($scope, $modal, $log) { $scope.testdataarray = [{ "name": "doe" }, { "name": "deer" }, { "name": "female" }]; $scope.open = function(testdata) { var modalinstance = $modal.open({ templateurl: 'mymodalcontent.html', controller: modalinstancectrl, resolve: { data: function() { return testdata; } } }); modalinstance.result.then(function(selecteditem) { $scope.scopedata = selecteditem; }, function() { $log.info('modal dismissed at: ' + new date()); }); }; }; // plea...

str replace - How to remove brackets (chevrons) in php -

out there, have question: i want remove chevrons (brackets) string in php : example: string= ">autor</" want remove < , </ , how this? i tried this: $result = ">autor</"; $result = str_replace(arr0ay(">","</"),"",$result); echo $result; but won't remove characters want removed, have idea? thanks in advance edit: //list contains attributes, autor, titel foreach($list $show){ $show = trim($show); $text=htmlspecialchars($xml->hits->hit[$j]->info); echo $show." = "; preg_match ("/$show.*$show/", $text, $result); $result = implode($result); $result = str_replace(array("$show",">","</"),"",$result); $result = str_replace(array(">","</"),"",$result); echo $result; } so found out, how it, , if else have same problem got, know how it: you need str_replace("oldstri...

C++ Calculator With Unlimited Inputs -

hi beginner c++ language , know if there way of writing program unlimited inputs. example: want write calculator program add numbers. that's easy enough there way user can add many numbers wants without being asked how many numbers wants. such if wants add 3 numbers can type "1+1+1" or if wants add 4 numbers adds "+1" end of previous line.like user not stuck fixed number of inputs or doesn't need asked how many inputs wants. functions in c++ need know in order you can use while loop read standard input. (std::cin) basic code read while loop, , add input sum follows: #include <iostream> #include <string> #include <cstdlib> int main(){ std::string line = ""; double sum = 0.0; while(line != "end"){ std::cout<<"the current sum is: "<<sum<<std::endl; std::cout<<"enter number add or \"end\" exit: "; std::cin>>line; ...

python - django model instance in form without model -

i have form say: class profileeditform(forms.form): first_name = forms.charfield(max_length=20) last_name = forms.charfield(max_length=20) email = forms.emailfield(max_length=50) address = forms.charfield(max_length=100) i want pass model instance on when user tries edit profile existing data on form. for reasons not using modelform lets have instance user = user.objects.get(pk=pk) and want pass instance form = profileeditform(instance=user) i googled , found can use instance model form can use in form not model ? thank you try this: user = user.objects.filter(pk=pk).values('first_name','last_name','email','address') form = profileeditform(user[0])

javafx 8 - How to set a Stage in java FX8 always show override on another stage -

i have 2 stage. first stage set full-screen , have button call second stage,the second stage design same dialog confirm . when call second stage want show override on first stage (currently. second stage show , when click on first stage first stage override on second stage) please me. thank! if understand question correctly, need second stage on top of first stage. you can achieve same setting stage.initowner() along modality.window_modal second stage : stage.initowner(firststage); stage.initmodality(modality.window_modal);

javascript - OpenLayers 3 Vector wrong position with zoom -

i try draw vector image on map using openlayers 3. image behaves strange when using zoom on map. demonstrate made jsffidle: http://jsfiddle.net/aderbas/8kpoqoow/ var iconstyle = new ol.style.style({ image: new ol.style.icon(/** @type {olx.style.iconoptions} */ ({ opacity: 0.75, src: '//cdn4.iconfinder.com/data/icons/pictype-free-vector-icons/16/location-alt-32.png' })) }); to happen use zoom in/out. know why that? you didn't make clear mean "behaves strange", i'm assuming it's marker "floating" after zooming in , out. caused fact you're using custom marker image has tip on bottom, openlayers default sets centre of icon in middle (since has no way of inferring "pointy" side is). you can solve problem defining anchor. there multiple ways specify anchor should be , using anchor straightforward in case: var iconstyle = new ol.style.style({ image: new ol.style.icon(/** @type {o...

javascript - Why do ajax request fire after the window/container is destoryed? -

my question better understand following answer: how handle incoming ajax request after destorying window i facing same issue, don't believe solutions in above answer needed if using extjs correctly.from understanding of destruction phase last step unregister instance of componenet component manager , clear events. if framework taking care of shouldn't request/callback cancelled? ajax request should handled controller, not view. can find informations mcv in extjs here : http://docs.sencha.com/extjs/4.2.1/#!/guide/application_architecture

telephonymanager - Is there any way to know the postpaid bill amount from android phone? -

is there way know postpaid bill amount android phone. think there no api access sort of information sim card in android. if possible 1 suggest me there way know postpaid bill amount phone. this information not stored in sim card on provider's servers, need call api (different each operator). i'm not sure allows third parties access kind of data.

javascript - How do I make onclick event skip to offclick? -

i making virtual keyboard touchscreen computer. using angular, html, , css only. how make when touch key, if holding key down, click forced "lift mouse up." the reason asking because when touching 2 characters within 500ms-1000ms, ends not registering click. if have tips improving touchscreen usability feel free comment :) open demo on touch device test: http://jsbin.com/nibohe/4/ to native app feel (touch / mouse) ux: $keybkeyelement.on("touchstart mousedown", function( event ){ event.preventdefault(); // capture key // send character textarea // other stuff }); if use click event on touchscreen have to wait user's ~300+ ms up movement ~400ms delay browser make valid click event. where touchstart end event.preventdefault kill click , mousedown or other events used on desktop (non/touch) machines.

Sharepoint 2013 flowchart workflow custom code -

i'am sharepoint 2013 beginner , have project need create workflow (with visual studio), started workflow flowchart workflow @ point needed write custom code (like db) couldn't find anyway (i can't call class's functions), whereas in 2010's sequential workflow wf has code behind class. so question is: there anyway call custom code in sequential workflows !? note: added class , tried use "invokemethod" it, couldn't reach class's functions. use httpsend-activity. microsoft forcing write restful endpoints. , thing. go far should avoid deploying services on sharepoint server. microsoft pretty clear here. 1) server 2) deploy wcf-service uses sharepoint client object model stuff done 3) use httpsend-activity httpsend https://msdn.microsoft.com/en-us/library/office/dn532193.aspx

java - For Loop error as method -

i trying write code changes value either -1 or +1 depending on random chance. person moving through blocks. starts 6 , if ends in 1 wins if ends in 11 loses. final output this: here go again... time walk! walked 37 blocks, , landed @ home here go again... time walk! walked 19 blocks, , landed in jail here go again... time walk! walked 13 blocks, , landed in jail here go again... time walk! walked 25 blocks, , landed in jail i have written following code: public class drunk { public int street; public double move; public int i; public boolean jail; public static void drunkwalk() { { street = 6; move = math.random(); i++; if (move > 0.5) { street++; } else { street--; } } while (street != 1 && street != 11); if ( street == 1) { jail = false; } else { jail = true; ...

ios - How to create a hex color string UIColor initializer in Swift? -

this question has answer here: how can create uicolor hex string? 41 answers i using code create uicolor hex value. working perfectly. extension uicolor { convenience init(red: int, green: int, blue: int) { assert(red >= 0 && red <= 255, "invalid red component") assert(green >= 0 && green <= 255, "invalid green component") assert(blue >= 0 && blue <= 255, "invalid blue component") self.init(red: cgfloat(red) / 255.0, green: cgfloat(green) / 255.0, blue: cgfloat(blue) / 255.0, alpha: 1.0) } convenience init(nethex:int) { self.init(red:(nethex >> 16) & 0xff, green:(nethex >> 8) & 0xff, blue:nethex & 0xff) } } usage: var textcolor = uicolor(nethex: 0xffffff) this code works int hex code. needs hex code 0xffffff int type. having hex code web service. ...

c - SSL_CTX_new:unable to load ssl2 md5 routines -

we having trouble running program built openssl. specific error encountering is: global error: ssl context init failed error:140a90f1:ssl routines:ssl_ctx_new:unable load ssl2 md5 routines . the context c library being wrapped perl library using swig. error occurs when attempting connect https address using perl library. for example, code cause error: #these imports felt relevant problem use lwp::useragent; use http::request; use lwp::protocol::https; use io::socket::ssl; sub test_can_connect_to_bitpay_api { $uri = "https://www.google.com"; $pem = business::onlinepayment::bitpay::keyutils::bpgeneratepem(); $sin = business::onlinepayment::bitpay::keyutils::bpgeneratesinfrompem($pem); $request = http::request->new(post => $uri); $ua = lwp::useragent->new; $response = $ua->request($request); ok($response->is_success, "test connection"); } but same code not error if call bpgeneratesinfrompem() not made. bpgeneratesinfrompem...

service - AngularJS update view after $resource remove() -

i having trouble updating view after $resource remove() . element get's removed, can see change after refreshing page. controller this.getdata = function() { var query = someservice.query() query.$promise.then(function(res) { this.data = res; // gets data view }.bind(this)); } this.removedata = function(id) { var query = someservice.remove({data_id: id}) query.$promise.then(function(res) { this.getdata() // makes request doesn't update view console.log(this.data) // returns data, removed element }.bind(this)) } factory .factory('someservice', ['api_url', '$resource', function (api_url, $resource) { return $resource(api_url + '/data', null, { create: {method: 'post'}, update: {method: 'put'}, }); any idea missing? ok, i've found culprit.. using ngdialog , apparently, creating 2 different instances of same controller assigning same controlleras dialog. like: ngdi...

windows - Visual Studio 2010 error linking Winsock library (C) -

i'm trying build c server program, , keep getting these errors: http://i.imgur.com/cavkpaf.png the common fix i'm seeing link ws2_32.lib, i'm doing already(properties > linker > input > additional dependencies). i've included winsock2.h. have windows sdk, , no errors saying can't find ws2_32.lib. i've tried linking directly .lib in windows sdk directory, still have same problem. dll in correct place (c:\windows\syswow64), , syswow64 directory listed in configuration properties > vc++ directories > executable directories. i have same problem visual studio 2013 any ideas? thanks.

click - Javascript - prompt keeps coming back after Ok is pressed -

i have following javascript configuration. works when loads , keeps working first time click on button id buttonkernel . should run function onpageload , resets grid presented on screen , reload event handlers. second time click button thought, after clicking ok on prompt, keeps prompting again. if insist, work. i'm new javascript, don't know if self calling function can @ root of problem. $(document).ready(function(){ onpageload(16); }); function onpageload(size){ gendiv(size); $('.gridsquare').hover(function(){ $(this).css('background-color', 'red'); }); $('#buttonkernel').click(function(){ $(".gridsquare").css('background-color', 'yellow'); var input = prompt ("enter size grid", "16"); size = checkinp(input); var list = document.getelementsbyclassname("row"); (var = list.length - 1; 0 <= i; i--) ...

java - Finding Upper Case in String Array and extracting it out -

i have array input email id in reverse order along data: moc.oohay@abc.pqrqwertysddd moc.oohay@ab.jklasddbfn moc.oohay@xz.jkgposddbfn i want output come as moc.oohay@abc.pqr moc.oohay@ab.jkl moc.oohay@xz.jkg how should filter string since there no pattern? there pattern, , upper case character followed either upper case letter, period or else @ character. translated, become this: string[] input = new string[]{"moc.oohay@abc.pqrqwertysddd","moc.oohay@ab.jklasddbfn" , "moc.oohay@xz.jkgposddbfn"}; pattern p = pattern.compile("([a-z.]+@[a-z.]+)"); for(string string : input) { matcher matcher = p.matcher(string); if(matcher.find()) system.out.println(matcher.group(1)); } yields: moc.oohay@abc.pqr moc.oohay@ab.jkl moc.oohay@xz.jkg

php - How to access JSON values returned by AJAX call -

i have written ajax code fetch mysql data , show on html page. output not showing on page. what doing wrong? php: function nav() { $this->dbconnect(); $qry="select pid, ptitle pages pagepub='1' order porder asc"; $result=mysqli_query($this->connect,"$qry") or die('mysql error! ' . mysqli_error()); $results = array(); while($row=mysqli_fetch_row($result)) { $results[] = $row; } echo json_encode($results); $this->dbclose(); } here output of php file : [ { "pid":"1", "ptitle":"one time registration tips" }, { "pid":"2", "ptitle":"first men in india" }, { "pid":"3", "ptitle":"first women in india" } ] javascript / html: <div id="output">this element accessed jquery , text rep...

What is an efficient way to read data from an image with an arbitrary number of pixel components? (Python, PIL) -

i working on project in python requires me able pixel values across entire image, in order weigh similarity (it image segmentation project). using pil image module (and every other package in anaconda). much of our algorithim developed, though returning because of right can handle grayscale images. done so: self.dataimage = image.open(self.file, mode = 'r') self.data = self.dataimage.getdata() i later inspect with print("data: {}".format(list(data.getimagedata()))) this returns sequence of integers corresponding intensity of each pixel of image. wanted make simple modification allow if accept rgb images also, making each item in sequence array instead of single integer, able support images arbitrary number of pixel components (such 3, rgb). is there simple way through pil image module? looked through documentation , here on stackoverflow, , best find: self.allpixels = self.dataimage.load() self.data = [] in range(self.width): j in ran...

ios - What will happen when I scroll up and down UITableView because it's related to a bug I am trying to figure it out -

i want know happen when scroll uitableview , down. because facing bug related this. situation this, when click button, cell's avaudioplayer play audio url, , when scroll table view , down, view freeze. don't know what's caused this. trying figure out. according dequeuereusablecellwithidentifier: documentation : for performance reasons, table view’s data source should reuse uitableviewcell objects when assigns cells rows in tableview:cellforrowatindexpath: method. table view maintains queue or list of uitableviewcell objects data source has marked reuse. call method data source object when asked provide new cell table view. method dequeues existing cell if 1 available or creates new 1 using class or nib file registered. if no cell available reuse , did not register class or nib file, method returns nil. that means: when cell disappears , cell b appears , have same identifier, uikit reuse cell , returned dequeuereusablecellwithidentif...

javascript - Safari refresh prevents jQuery execution -

i'm working on drupal 7 site, mobile version of site uses bootsrap theme. there custom block (created w/ drupal) using jquery move elements on page, changing classes , ids. block works fine. my problem in custom module renders block. have jquery code in module's template not running on refresh in safari, runs if go on address bar , hit "go" on keyboard. edit: ie , chrome seem have problem, jquery code runs sometimes, doesn't matter if refresh, clear cache or whatever. nothing special in browser's console. my jquery code supposed move elements in page, on jquery(document).ready , not working simple alert . p.s.: jquery in custom module's template doesn't have code or html elements affected custom block, thought maybe mention it. i hope can understand issue :) thanks. i using jquery(document).ready execute code. changed jquery(window).load , works fine. code executes on first page load , on every refresh.

c# - No parameterless constructor defined for type of.. Error while Ajax JQuery call -

Image
i getting below error when execute ajax jquery: below code using: iprrequest.cs class code(.dll) public static bool isvalidbarcodetest(guid? requestid, string barcode) { bool result = true; dictionary<string, object> input = new dictionary<string, object>() { {"@requestid", requestid}, {"@barcodeno", barcode} }; data data = new data(); datatable dt = data.executequery(commandtype.storedprocedure, "invoice.usp_tbl_request_select_checkduplicatebarcode_test", input); if (dt.rows.count > 0) { result = helper.getdbvalue<int>(dt.rows[0][0]) == 0; } return result; } .aspx.cs page code: public abstract class check { public abstract guid? requestid { get; set; } public abstract string barcode { get; set; } } [webmet...

javascript - Why doesn't Twitter's follow button widget remember me? -

Image
i follow people. go check out sites. many have 'follow' button counter 1 but if am following person button should 'grayed' out time but once refresh page or return @ later time looks not follower. instead, need click 'follow' button on site, twitter's dialog box comes tell me 'following' and when mouse on button says 'unfollow' in red. do twitter have sort of follower.event.subscribe function can recognise people when on site 'follow.' if can recognize follow numbers on site why not remember followers? it come's down cookies. if token not in browser history how twitter know have clicked it? what might find if sign twitter first , go sites , hit refresh change following. also if me have tiny cache browser kills on refresh or close not stand chance @ remembering because killing cookie instantly. update it seem twitter have changed how use follow buttons now. before if logged twitter , pres...